Closed Bug 1756741 Opened 3 years ago Closed 3 years ago

Firefox 99.0a1 Crash Report [@ shutdownhang | XPTC__InvokebyIndex ]

Categories

(Toolkit :: Data Sanitization, defect)

Firefox 99
defect

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox98 --- unaffected
firefox99 --- fixed
firefox100 --- fixed

People

(Reporter: Gioxx, Unassigned)

References

(Regression)

Details

(Whiteboard: [Fixed by Bug 1755190])

Hey Giovanni,
We tried reproducing this issue on the latest versions of Firefox Nightly 99.0a1 (2022-02-24), beta 98.0b8 and release 97.0.1 but didn't encounter the crash following your steps.

Can you test the issue while in Safe Mode? You can find helpful info here : https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode .
Testing with a fresh new profile could help. You can find more about creating a new profile here : https://support.mozilla.org/en-US/kb/troubleshoot-and-diagnose-firefox-problems#w_6-create-a-new-firefox-profile .
If possible, you can test this issue on the nightly build as well. Download the build from : https://www.mozilla.org/en-US/firefox/nightly/all/ .

Flags: needinfo?(gf.solone)

I can reproduce this bug since the 14th. of february, everyday, even several times a day if I wish to reproduce it again (simply closing and reopening Firefox), this is the profile I use everyday on my Nightly and before the 14th. of feb. i never had this problem.
This is the new crash: https://crash-stats.mozilla.org/report/index/8ad95be9-9908-4c34-b914-43daa0220224 and this is the profiler analysis: https://share.firefox.dev/3BKSbWB

Flags: needinfo?(gf.solone)

Hi Gioxx,

Thanks for reporting. Does this issue only appear when there are updates to apply? Or every time you attempt to shutdown Firefox Nightly, even without pending updates?

Flags: needinfo?(gf.solone)

Ciao Mike, everytime, with or without pending updates available.

Flags: needinfo?(gf.solone)

A number of those crashes are happening while doing something with principals in the permissions manager.

Crash this morning (there were pending updates to run) and a short video capture of what happens in Task Manager when I close Firefox.
https://crash-stats.mozilla.org/report/index/238a64e5-d0e7-4bb1-b756-fbab30220225
https://capture.dropbox.com/GKgZo1AsgxwlvxAw

Hey valentin, the hang (at least in that last report) seems to ultimately be happening inside of nsStandardURL::Release... is this something for Necko to look at? Or Jens, is this more of a permission manager thing?

Flags: needinfo?(valentin.gosu)
Flags: needinfo?(jstutte)

I see in those stack traces often some frame with _tailMerge_d3dcompiler_47.dll, which I usually don't see in our stacks? Is that meaning something?

In any case Permission Manager is more Tim's playground.

Flags: needinfo?(jstutte) → needinfo?(tihuang)

This also crashes in nsStandardURL::SetSpec (the page URL seems to be gmail)
https://crash-stats.mozilla.org/report/index/309bb785-3532-44a8-90fb-acab80220222
I think there's a script running at shutdown (not sure why) that keeps creating and destroying URLs. d3dcompiler_47.dll could be involved.

Flags: needinfo?(valentin.gosu)

Hm... d3dcompiler_47.dll is, I believe, part of Direct3D... jrmuizel, is the graphics layer somehow involved here?

Flags: needinfo?(jmuizelaar)

I'm pretty sure the d3dcompiler stuff is not related here. I think it's just the nearest symbol or something.

Flags: needinfo?(jmuizelaar)

Yeah, those looks like frames where we have JIT code or the weird XPCOM call stuff, so I'm pretty sure it is junk. You see the tailcall stuff fairly often in crash stacks.

Yeah, the offsets from _tailMerge_d3dcompiler_47.dll are two large to be reasonable. I've filed bug 1757217 about the unwinding/symbolicating issue.

Depends on: 1757217

It looks to me that something is trying to get all permissions during the shutdown. But it's hard to tell from stack traces of those crash reports because they all link to _tailMerge_d3dcompiler_47.dll and it doesn't seem to be the right symbol. We should wait for bug 1757890 to get more details regarding this crash.

Flags: needinfo?(tihuang)

We should check if this is a regression of Bug 1681701, also see Bug 1755190. For the exception support we do iterate over all permissions on shutdown. Hannah is currently looking into it.

Can we see if the affected profiles have either network.cookie.lifetimePolicy or privacy.sanitize.sanitizeOnShutdown enabled?

Flags: needinfo?(hpeuckmann)

(In reply to Paul Zühlcke [:pbz] from comment #15)

We should check if this is a regression of Bug 1681701, also see Bug 1755190. For the exception support we do iterate over all permissions on shutdown. Hannah is currently looking into it.

Can we see if the affected profiles have either network.cookie.lifetimePolicy or privacy.sanitize.sanitizeOnShutdown enabled?

In my profile I have network.cookie.lifetimePolicy set to 0 and privacy.sanitize.sanitizeOnShutdown true.

Thank you, could you do me a favor and try to reproduce this crash with privacy.sanitize.sanitizeOnShutdown set to false?

Flags: needinfo?(hpeuckmann) → needinfo?(gf.solone)

(In reply to hpeuckmann@mozilla.com from comment #17)

Thank you, could you do me a favor and try to reproduce this crash with privacy.sanitize.sanitizeOnShutdown set to false?

AH! With privacy.sanitize.sanitizeOnShutdown set to false Firefox closed correctly without generating crashes!

Flags: needinfo?(gf.solone)

(In reply to Paul Zühlcke [:pbz] from comment #15)

We should check if this is a regression of Bug 1681701, also see Bug 1755190. For the exception support we do iterate over all permissions on shutdown. Hannah is currently looking into it.

Based on this I think we can move this bug under that component for now.

Component: Untriaged → Data Sanitization
Product: Firefox → Toolkit

We created Bug 1759579 to refactor the method in the sanitizer that is recursively calling the permission manager to get all permissions. Refactoring this to call the permission manager only once might also fix this crash.
Until fixed, Giovanni you can try to clear your history through about:preferences#privacy Clear history..., this will give you the option to clear your history not on shutdown and except you select the time range 'everything', the recursive method calling the permission manager should not be triggered.

Flags: needinfo?(gf.solone)

(In reply to hpeuckmann@mozilla.com from comment #20)

We created Bug 1759579 to refactor the method in the sanitizer that is recursively calling the permission manager to get all permissions. Refactoring this to call the permission manager only once might also fix this crash.
Until fixed, Giovanni you can try to clear your history through about:preferences#privacy Clear history..., this will give you the option to clear your history not on shutdown and except you select the time range 'everything', the recursive method calling the permission manager should not be triggered.

In the meantime I have created a clean profile from scratch, with my addons and my configurations and without the problem, but I also have the old profile I can use to make other tests to help you on "find and solve" the problem. Spring cleaning is sometimes good for the browser, especially when using Nightly :-)

Flags: needinfo?(gf.solone)

Hey Giovanni, I'm glad to hear you could fix this for your profile and thank you for offering your help with solving this. Could you help me out again? Could you check if you can still reproduce the issue with Nightly 100.0a1? We landed a small patch that has a positive impact on the performance of the shutdown data sanitization. If still crashing, could you try to make a performance profile of the shutdown? I actually don't know what happens to a shutdown performance profile if the shutdown crashes, but its worth a try.

Flags: needinfo?(gf.solone)

(In reply to hpeuckmann@mozilla.com from comment #22)

Hey Giovanni, I'm glad to hear you could fix this for your profile and thank you for offering your help with solving this. Could you help me out again? Could you check if you can still reproduce the issue with Nightly 100.0a1? We landed a small patch that has a positive impact on the performance of the shutdown data sanitization. If still crashing, could you try to make a performance profile of the shutdown? I actually don't know what happens to a shutdown performance profile if the shutdown crashes, but its worth a try.

Ciao, no problem, but the question is: should I first change the status of privacy.sanitize.sanitizeOnShutdown back to true to make this test? At the moment is set to false.

Flags: needinfo?(gf.solone)

(In reply to Giovanni [:Gioxx] (Mozilla Italia) from comment #23)

(In reply to hpeuckmann@mozilla.com from comment #22)

Hey Giovanni, I'm glad to hear you could fix this for your profile and thank you for offering your help with solving this. Could you help me out again? Could you check if you can still reproduce the issue with Nightly 100.0a1? We landed a small patch that has a positive impact on the performance of the shutdown data sanitization. If still crashing, could you try to make a performance profile of the shutdown? I actually don't know what happens to a shutdown performance profile if the shutdown crashes, but its worth a try.

Ciao, no problem, but the question is: should I first change the status of privacy.sanitize.sanitizeOnShutdown back to true to make this test? At the moment is set to false.

Hey, please set privacy.sanitize.sanitizeOnShutdown back to true .

(In reply to hpeuckmann@mozilla.com from comment #24)

Hey, please set privacy.sanitize.sanitizeOnShutdown back to true .

Done! Nightly configuration modified on the "problematic profile", the browser closing without any crashes. I think this is a good news :-)

Thanks for confirming!

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Regressed by: 1681701
Resolution: --- → FIXED
See Also: → 1755190
Whiteboard: [Fixed by Bug 1755190]

Set release status flags based on info from the regressing bug 1681701

Has Regression Range: --- → yes
Target Milestone: --- → 99 Branch
Depends on: 1755190
See Also: 1755190
Target Milestone: 99 Branch → 100 Branch
You need to log in before you can comment on or make changes to this bug.