Closed frankmorgner closed 6 years ago
It doesn't seem to help as __pkcs11h_forkFixup
is called inside the child handler, but the deadlock happens earlier (inside the "prepare" handler).
Thanks for the feedback, I've changed the code accordingly.
The deadlock is not caused by an already pending fork
: the mutex is locked inside pkcs11h_addProvider
for the first time, _g_pkcs11h_data->fork_pending
isn't set and the deadlock still happens at the first fork
inside C_Initialize
.
Hi, I will solve this at this weekend. Probably by assuming that recursive atfork will not happen. Thanks!
On Fri, Oct 19, 2018 at 3:54 PM Ignat Loskutov notifications@github.com wrote:
The deadlock is not caused by an already pending fork: the mutex is locked inside pkcs11h_addProvider https://github.com/OpenSC/pkcs11-helper/blob/pkcs11-helper-1.25.1/lib/pkcs11h-core.c#L702 for the first time, _g_pkcs11h_data->fork_pending isn't set and the deadlock still happens at the first fork inside C_Initialize.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/OpenSC/pkcs11-helper/pull/17#issuecomment-431353184, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNIrSx89K4hUmpcvlj5O1_W77PlH37Iks5umct1gaJpZM4XlCgX .
Hi, Please checkout #18, I hope it will resolve this specific opensc issue, however, opensc will get C_Finalized within the C_Initialize at child, I hope it will not dead lock there. Thanks!
fixes https://github.com/OpenSC/pkcs11-helper/issues/16