Put assertions in place to prevent NSS from being instanced during shutdown
Categories
(Core :: Networking, enhancement, P2)
Tracking
()
People
(Reporter: gsvelto, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged][necko-priority-next])
Attachments
(1 file)
We've often run into crashes where a piece of code would create a network request very late during shutdown and specifically after NSS had already shut down. This usually triggers the re-creation of the NSS service which fails with a deep stack. See bug 1707057 for an example but I've seen this happen a number of times already.
Would it make sense to put a MOZ_RELEASE_ASSERT()
call in nsNSSComponent::Init()
that would crash the calling process if shutdown has already begun? We know we would crash anyway but we'd do so with a shorter stack and a clear message (e.g. "Trying to re-create the NSS service during shutdown").
Comment 1•4 years ago
|
||
We have checks whether we are in shutdown later in the process of creating a channel and the calls would just fail. Also Already nsIOService have a flag (mShutdown). We should just fail earlier.
Updated•4 years ago
|
Comment 2•2 years ago
|
||
I will not have time to work on this bug, so I am unassigning myself.
Comment 3•1 year ago
|
||
I have a patch in https://phabricator.services.mozilla.com/D133065 that would work for this.
Comment 4•1 year ago
|
||
This might be good for Manuel.
Updated•1 year ago
|
Comment 5•1 year ago
|
||
Updated•1 year ago
|
Comment 6•1 year ago
|
||
Note that when trying to land this in the past, it broke SW by causing bug 1745043
When we try to land this again, we should make sure that doesn't happen. :)
Description
•