Closed Bug 993171 Opened 6 years ago Closed 6 years ago

B2G Desktop OOP crashes on shutdown in cycle collector assert

Categories

(Core :: XPCOM, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: qdot, Unassigned)

References

Details

Crash info:

[Parent 28071] WARNING: RemoveObserver() called for unregistered observer: file /share/mozbuild/gecko-dev/hal/Hal.cpp, line 204
[Parent 28071] WARNING: RemoveObserver() called for unregistered observer: file /share/mozbuild/gecko-dev/hal/Hal.cpp, line 204
--DOMWINDOW == 5 (0x7f408c21b800) [pid = 28071] [serial = 5] [outer = 0x7f409191d800] [url = resource://gre-resources/hiddenWindow.html]
[Parent 28071] WARNING: unable to Flush() dirty datasource during XPCOM shutdown: file /share/mozbuild/gecko-dev/rdf/base/src/nsRDFXMLDataSource.cpp, line 747
--DOMWINDOW == 4 (0x7f409191d800) [pid = 28071] [serial = 1] [outer = (nil)] [url = resource://gre-resources/hiddenWindow.html]
[Parent 28071] ###!!! ASSERTION: No PermissionManager available!: 'Error', file /share/mozbuild/gecko-dev/content/base/src/nsFrameLoader.cpp, line 2621
--DOMWINDOW == 3 (0x7f4088cecc00) [pid = 28071] [serial = 6] [outer = (nil)] [url = app://system.gaiamobile.org/index.html]
--DOMWINDOW == 2 (0x7f408c218400) [pid = 28071] [serial = 4] [outer = (nil)] [url = about:blank]
--DOMWINDOW == 1 (0x7f4093ea3800) [pid = 28071] [serial = 8] [outer = (nil)] [url = app://system.gaiamobile.org/index.html]
--DOMWINDOW == 0 (0x7f408c217800) [pid = 28071] [serial = 3] [outer = (nil)] [url = chrome://b2g/content/shell.html]
[Parent 28071] WARNING: '!compMgr', file /share/mozbuild/gecko-dev/xpcom/glue/nsComponentManagerUtils.cpp, line 59
Assertion failure: data, at /share/mozbuild/gecko-dev/xpcom/base/nsCycleCollector.cpp:3715

Program ./obj-test/dist/bin/b2g (pid = 28071) received signal 11.
Stack:
UNKNOWN [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x02753E9F]
UNKNOWN [/lib/x86_64-linux-gnu/libpthread.so.0 +0x0000F880]
NS_CycleCollectorSuspect3+0x00000047 [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x0090CE10]
UNKNOWN [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x0147E5FB]
UNKNOWN [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x0149C9C5]
UNKNOWN [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x0149C9E6]
UNKNOWN [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x00BAA5D2]
UNKNOWN [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x00BAD672]
UNKNOWN [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x008FA7C2]
UNKNOWN [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x008FA52F]
UNKNOWN [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x0211C4E0]
UNKNOWN [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x0212218E]
XRE_main+0x000000C0 [/share/mozbuild/gecko-dev/obj-test/dist/bin/libxul.so +0x02122396]
UNKNOWN [./obj-test/dist/bin/b2g +0x00003965]
__libc_start_main+0x000000F5 [/lib/x86_64-linux-gnu/libc.so.6 +0x00021B45]
UNKNOWN [./obj-test/dist/bin/b2g +0x00003A83]
UNKNOWN (nil)
Sleeping for 300 seconds.
Type 'gdb ./obj-test/dist/bin/b2g 28071' to attach your debugger to this thread.

#0  0x00007f40ab15e09d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f40ab15df34 in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:137
#2  0x00007f40a89de65f in ah_crap_handler (signum=11) at /share/mozbuild/gecko-dev/toolkit/xre/nsSigHandlers.cpp:88
#3  0x00007f40a89e72ad in nsProfileLock::FatalSignalHandler (signo=11, info=0x7fff14f666b0, context=0x7fff14f66580) at /share/mozbuild/gecko-dev/profile/dirserviceprovider/src/nsProfileLock.cpp:185
#4  0x00007f40a900de9f in AsmJSFaultHandler (signum=11, info=0x7fff14f666b0, context=0x7fff14f66580) at /share/mozbuild/gecko-dev/js/src/jit/AsmJSSignalHandlers.cpp:970
#5  <signal handler called>
#6  0x00007f40a71c6e10 in NS_CycleCollectorSuspect3 (n=0x7f4080a06b78, cp=0x0, aRefCnt=0x7f4080a06ba8, aShouldDelete=0x0) at /share/mozbuild/gecko-dev/xpcom/base/nsCycleCollector.cpp:3715
#7  0x00007f40a7d385fb in decr (shouldDelete=0x0, p=0x0, owner=0x7f4080a06b78, this=0x7f4080a06ba8) at ../../dist/include/nsISupportsImpl.h:183
#8  decr (shouldDelete=0x0, owner=0x7f4080a06b78, this=0x7f4080a06ba8) at ../../dist/include/nsISupportsImpl.h:171
#9  mozilla::dom::ContentParent::Release (this=0x7f4080a06800) at /share/mozbuild/gecko-dev/dom/ipc/ContentParent.cpp:2030
#10 0x00007f40a7d569c5 in ReleaseCallee (this=0x7f40844ebdc0) at /share/mozbuild/gecko-dev/ipc/chromium/src/base/task.h:317
#11 RunnableMethod<mozilla::dom::ContentParent, void (mozilla::dom::ContentParent::*)(bool), Tuple1<bool> >::~RunnableMethod (this=0x7f40844ebdc0, __in_chrg=<optimized out>) at /share/mozbuild/gecko-dev/ipc/chromium/src/base/task.h:302
#12 0x00007f40a7d569e6 in RunnableMethod<mozilla::dom::ContentParent, void (mozilla::dom::ContentParent::*)(bool), Tuple1<bool> >::~RunnableMethod (this=0x7f40844ebdc0, __in_chrg=<optimized out>)
    at /share/mozbuild/gecko-dev/ipc/chromium/src/base/task.h:303
#13 0x00007f40a74645d2 in MessageLoop::DeletePendingTasks (this=this@entry=0x7f40aaf619e0) at /share/mozbuild/gecko-dev/ipc/chromium/src/base/message_loop.cc:404
#14 0x00007f40a7467672 in MessageLoop::~MessageLoop (this=0x7f40aaf619e0, __in_chrg=<optimized out>) at /share/mozbuild/gecko-dev/ipc/chromium/src/base/message_loop.cc:168
#15 0x00007f40a71b47c2 in MessageLoopForUI::~MessageLoopForUI (this=0x7f40aaf619e0, __in_chrg=<optimized out>) at /share/mozbuild/gecko-dev/ipc/chromium/src/base/message_loop.h:459
#16 0x00007f40a71b452f in mozilla::ShutdownXPCOM (servMgr=<optimized out>) at /share/mozbuild/gecko-dev/xpcom/build/nsXPComInit.cpp:1038
#17 0x00007f40a89d64e0 in ScopedXPCOMStartup::~ScopedXPCOMStartup (this=0x7f40aaf79710, __in_chrg=<optimized out>) at /share/mozbuild/gecko-dev/toolkit/xre/nsAppRunner.cpp:1202
#18 0x00007f40a89dc18e in XREMain::XRE_main (this=this@entry=0x7fff14f66c38, argc=argc@entry=3, argv=argv@entry=0x7fff14f68f98, aAppData=aAppData@entry=0x420b00 <sAppData>) at /share/mozbuild/gecko-dev/toolkit/xre/nsAppRunner.cpp:4113
#19 0x00007f40a89dc396 in XRE_main (argc=3, argv=0x7fff14f68f98, aAppData=0x420b00 <sAppData>, aFlags=<optimized out>) at /share/mozbuild/gecko-dev/toolkit/xre/nsAppRunner.cpp:4300
#20 0x0000000000403965 in do_main (argv=0x7fff14f68f98, argc=3) at /share/mozbuild/gecko-dev/b2g/app/nsBrowserApp.cpp:163
#21 main (argc=<optimized out>, argv=<optimized out>) at /share/mozbuild/gecko-dev/b2g/app/nsBrowserApp.cpp:256
Repro: 

1. Apply patch from bug 914584
2. Run B2G Desktop
3. Close B2G Desktop

Expected:

Clean shutdown

Actual: 

See #0
Kyle, we're releasing a ContentParent late in shutdown, so I think this is a regression from your patch, or at least, that patch is the immediate cause.
Err, Kyle=khuey there, sorry. :)
Ok, this no longer requires the OOP patch to crash. B2G Desktop now just crashes no matter what on shutdown, OOP or not.
Kyle, that is probably a different crash. The stack here is clearly about ContentParent.
The "always crashes" probably is likely bug 993918.
This seems to have fixed itself at some point? As of today, no longer seeing crashes on shutdown with b2g desktop. Marking resolved, though could be related to work in bug 986113.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Nope. Just didn't have the right stash applied. Still happens. Oops.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Seems to be working now. Closing.
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.