curl-library
Re: problem with NSS backend and threads
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 17 Aug 2016 09:57:18 +0200 (CEST)
Date: Wed, 17 Aug 2016 09:57:18 +0200 (CEST)
On Wed, 17 Aug 2016, Peter Wang wrote:
> I have traced the problem to this line in nss_create_object():
>
> slot = PK11_FindSlotByName(slot_name);
>
> If I serialise the call then the error does not (seem to) occur,
> e.g. arbitrarily using nss_crllock:
>
> PR_Lock(nss_crllock);
> slot = PK11_FindSlotByName(slot_name);
> PR_Unlock(nss_crllock);
What an excellent and highly detailed report, thanks!
There's no docs for that NSS function available (sigh) but I took a look at
the code:
http://searchfox.org/nss/source/lib/pk11wrap/pk11slot.c#585
To me, it looks like there is locking done already and that it therefore
shouldn't have a threading problem! Not exactly sure how to proceed from
this...
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2016-08-17