I see two potential candidates for the failing k5_mutex_lock() call, based on the k5_mutex_lock() calls which occur in test_et after the last line of output is written: 1. com_err_terminate() -> krb5int_key_delete() -> k5_mutex_lock(&key_lock) 2. com_err_terminate() -> k5_mutex_lock(&et_list_lock) Candidate 2 seems unlikely as the destruction of et_list_lock clearly happens after the k5_mutex_lock() call. For candidate 1, If the libkrb5support finalizer runs before the libcom_err finalizer, key_lock would be destroyed before we lock it and we would get an EINVAL. Since AIX doesn't seem to do shared library dependencies, I guess it's not surprising that it would also not do library finalizer ordering. The best workaround is probably to avoid running library finalizers on AIX.