Closed Bug 1620157 Opened 5 years ago Closed 3 years ago

Crash in [@ shutdownhang | __pthread_cond_wait | <name omitted> | <name omitted> | mozilla::layers::CompositorThreadHolder::Shutdown]

Categories

(Core :: Graphics, defect, P3)

x86_64
Linux
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox-esr68 --- affected
firefox73 --- wontfix
firefox74 --- wontfix
firefox75 --- wontfix
firefox76 --- affected

People

(Reporter: emilghitta, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Keywords: crash)

Crash Data

This bug is for crash report bp-98dc2471-1bb2-4acf-8d14-346080200305.

Top 10 frames of crashing thread:

0 libpthread-2.27.so __pthread_cond_wait /build/glibc-OTsEL5/glibc-2.27/nptl/pthread_cond_wait.c:655
1 firefox-bin <name omitted> mozglue/misc/ConditionVariable_posix.cpp:109
2 libxul.so mozilla::ThreadEventQueue<mozilla::PrioritizedEventQueue>::GetEvent xpcom/threads/CondVar.h:57
3 libxul.so nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1148
4 libxul.so <name omitted> xpcom/threads/nsThreadUtils.cpp:486
5 libxul.so mozilla::layers::CompositorThreadHolder::Shutdown gfx/layers/ipc/CompositorThread.cpp:137
6 libxul.so gfxPlatform::ShutdownLayersIPC gfx/thebes/gfxPlatform.cpp:1419
7 libxul.so mozilla::ShutdownXPCOM xpcom/build/XPCOMInit.cpp:629
8 libxul.so ScopedXPCOMStartup::~ScopedXPCOMStartup toolkit/xre/nsAppRunner.cpp:1225
9 libxul.so XREMain::XRE_main toolkit/xre/nsAppRunner.cpp:4769

Affected Platforms

  • Ubuntu 18.04 64bit

Affected Versions

  • Firefox 74.0 (BuildId: 20200304223017)
  • Firefox 73.0.1
  • ESR 68.6.0(BuildId: 20200302183506)

This was also encountered while performing the following updates:

  • Updates from 74.0 (BuildId:20200302184608) to 74.0 (BuildId:20200304223017) -via release-localtest channel.
  • Updates from 73.0 to 74.0 (BuildId:20200304223017) -via release-localtest channel.
  • Updates from 73.0 to 73.0.1.

Unaffected Versions

  • Firefox 75.0a1 (BuildId:20200304161940).

Steps to reproduce

  1. Launch Firefox.
  2. Update Firefox via the "About Firefox" panel.

Or

  1. Launch Firefox.
  2. Restart via browser console.

Expected Result

  • Firefox updates successfully.

Actual Result

  • Firefox crashes.

Notes

  • I didn't managed to reproduce this issue on other Ubuntu 18.04 machines.
Has STR: --- → yes
Component: Application Update → DOM: Content Processes
Product: Toolkit → Core
Version: 74 Branch → Trunk

Gian-Carlo, can you or someone on your team try to reproduce and figure out what's going on? Thank you.

Flags: needinfo?(gpascutto)

It's a Compositor Shutdown hang that happens on one specific Ubuntu 18.04 machine but not on others (as per reporter). So likely it's related to the graphics and driver? (Adapter Device ID HD Graphics 530 with Mesa 18.2.8.0)

Flags: needinfo?(gpascutto)

Moving to Graphics component since this is a Compositor Shutdown hang.

kmag says we should get rid of nested event loops on shutdown. There is a recommended mechanism for that, though I don't remember what he said it was called.

Component: DOM: Content Processes → Graphics
Crash Signature: [@ shutdownhang | __pthread_cond_wait | <name omitted> | <name omitted> | mozilla::layers::CompositorThreadHolder::Shutdown] → [@ shutdownhang | __pthread_cond_wait | <name omitted> | <name omitted> | mozilla::layers::CompositorThreadHolder::Shutdown] [@ shutdownhang | __psynch_cvwait | <name omitted> | <name omitted> | mozilla::layers::CompositorThreadHolder::Shutdown]

Jessie, do we have the graphics hardware mentioned in comment 2 in the Toronto office?

Flags: needinfo?(jbonisteel)

Actually, wait, I have P530, let me see if I can reproduce this myself...

Flags: needinfo?(jbonisteel)

74.0 was able to update itself fine on my machine (Fedora 30, Mesa 19, Intel P530 graphics). I think most Linux users are going to get upgrades through their distribution.

Nical, if you have any insights into this, that'd be great.

Flags: needinfo?(nical.bugzilla)
Priority: -- → P3

In both reports the compositor thread is blocked inside of mozilla::ipc::MessageChannel::SynchronouslyClose() which "tells the IO thread to close the channel and wait for it to ACK" according to a comment in the code.

I am not very familiar with IPDL internals but the first question I would try to answer is what could cause the IO thread to hang or stop answering messages (especially synchronous ones).

gfxPlatform::ShutdownLayersIPC() runs before the shutdown of xpcom thread and IPDL machinery so messaging threads is expected to still be functional at this stage.

Flags: needinfo?(nical.bugzilla)

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

According to the crash report, Beta 75 and Nightly 76 are also affected.

It's not clear when and if this is a regression. Unmarking until we find out otherwise.

Keywords: regression
Crash Signature: [@ shutdownhang | __pthread_cond_wait | <name omitted> | <name omitted> | mozilla::layers::CompositorThreadHolder::Shutdown] [@ shutdownhang | __psynch_cvwait | <name omitted> | <name omitted> | mozilla::layers::CompositorThreadHolder::Shutdown] → [@ shutdownhang | __pthread_cond_wait | <name omitted> | <name omitted> | mozilla::layers::CompositorThreadHolder::Shutdown] [@ shutdownhang | __psynch_cvwait | <name omitted> | <name omitted> | mozilla::layers::CompositorThreadHolder::Shutdown] [@ shutd…
Blocks: 1633342
Depends on: 1740087

Closing because no crashes reported for 12 weeks.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.