Open Bug 1713749 Opened 4 years ago Updated 1 year ago

Put assertions in place to prevent NSS from being instanced during shutdown

Categories

(Core :: Networking, enhancement, P2)

enhancement

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").

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.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
Assignee: nobody → dd.mozilla
Status: NEW → ASSIGNED

I will not have time to work on this bug, so I am unassigning myself.

Assignee: dd.mozilla → nobody
Status: ASSIGNED → NEW

I have a patch in https://phabricator.services.mozilla.com/D133065 that would work for this.

This might be good for Manuel.

Whiteboard: [necko-triaged] → [necko-triaged][necko-priority-next]
Assignee: nobody → moz.valentin
Status: NEW → ASSIGNED

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. :)

Assignee: moz.valentin → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: