Closed Bug 1151168 Opened 11 years ago Closed 11 years ago

shutdown crash in TableTicker::FlushOnJSShutdown from null sRegisteredThreads->at(i)->Profile()->GetPseudoStack()

Categories

(Core :: Gecko Profiler, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: dbaron, Unassigned)

References

Details

(Keywords: crash)

Crash Data

Attachments

(4 files, 1 obsolete file)

I can reproduce a shutdown crash reliably by: * start firefox * go to about:config * type force-enabled in the search * toggle layers.acceleration.force-enabled *twice* * clear and type async-a in the search * close the window (Those steps can probably be reduced.) I have an rr recording of this, which I am debugging. #0 0x00002aaaafd6cf48 in TableTicker::FlushOnJSShutdown (this=0x2f378e0, aRuntime=0x6c0650) at /home/dbaron/builds/build-mozilla-central/mozilla/tools/profiler/TableTicker.cpp:386 #1 0x00002aaaafd6d058 in PseudoStack::flushSamplerOnJSShutdown ( this=this@entry=0x45bf60) at /home/dbaron/builds/build-mozilla-central/mozilla/tools/profiler/TableTicker.cpp:403 #2 0x00002aaaadef2051 in sampleRuntime (runtime=0x0, this=0x45bf60) at ../../dist/include/PseudoStack.h:356 #3 mozilla::ShutdownXPCOM (aServMgr=<optimized out>) at /home/dbaron/builds/build-mozilla-central/mozilla/xpcom/build/XPCOMInit.cpp:996 #4 0x00002aaaafed4eb6 in ScopedXPCOMStartup::~ScopedXPCOMStartup ( this=this@entry=0x4f4eb0, __in_chrg=<optimized out>) at /home/dbaron/builds/build-mozilla-central/mozilla/toolkit/xre/nsAppRunner.cpp:1329 #5 0x00002aaaafed9ee1 in XREMain::XRE_main (this=this@entry=0x7fffffffc448, argc=argc@entry=4, argv=argv@entry=0x7fffffffd978, aAppData=aAppData@entry=0x7fffffffc658) at /home/dbaron/builds/build-mozilla-central/mozilla/toolkit/xre/nsAppRunner.cpp:4275 The crash is on: 386 if (sRegisteredThreads->at(i)->Profile()->GetPseudoStack()->mRuntime != aRuntime) { and GetPseudoStack() returns null. (At least, gdb in rr says so, and the disassembly at least agrees that it's a null dereference.)
Hi David, could you see if the patch fixes the crash?
Flags: needinfo?(dbaron)
Hard to tell; I'm now seeing a different crash (which I might have been seeing some portion of the time before too, since I saw the double-free message some of the time then, but not the time I debugged).
Flags: needinfo?(dbaron)
Simpler STR: 1. Start browser with Gecko Profiler Addon. 2. Quit browser.
The double free was caused by trying to reset the buffer, which was deleting expired markers. However, the sampler thread (the signal sender on Linux) deletes markers each time around its own loop, so the marker list was getting corrupted.
Attachment #8588339 - Flags: review?(kvijayan)
Attachment #8588339 - Flags: review?(kvijayan) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Crash signatures are from my crash reports in the dupe.
Crash Signature: [@ TableTicker::FlushOnJSShutdown(JSRuntime*)] [@ jemalloc_crash | free_impl | ProfilerMarker::`scalar deleting destructor''(unsigned int) ]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: