Last Comment Bug 730282 - Firefox Crash @ mozilla::SignalTracerThread
: Firefox Crash @ mozilla::SignalTracerThread
: crash, regression
Product: Core
Classification: Components
Component: Widget (show other bugs)
: 12 Branch
: All All
-- critical (vote)
: mozilla13
Assigned To: Steven Michaud [:smichaud] (Retired)
: 733670 (view as bug list)
Depends on:
Blocks: 710296
  Show dependency treegraph
Reported: 2012-02-24 06:38 PST by Marcia Knous [:marcia - use ni]
Modified: 2012-03-13 04:54 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Fix (1.98 KB, patch)
2012-03-06 13:54 PST, Steven Michaud [:smichaud] (Retired)
ted: review+
Details | Diff | Splinter Review

Description User image Marcia Knous [:marcia - use ni] 2012-02-24 06:38:44 PST
Low volume Mac crash.

Comments mention:

Clicked "restart now" in one of several addons I removed or disabled in the addon manager

I restarted Firefox to apply a new Firefox upgrade.

Frame 	Module 	Signature 	Source
0 	XUL 	mozilla::SignalTracerThread 	
1 	XUL 	-[GeckoNSApplication sendEvent:] 	widget/cocoa/
2 	XUL 	ProcessPendingGetURLAppleEvents 	toolkit/xre/
3 	XUL 	CommandLineServiceMac::SetupMacCommandLine 	toolkit/xre/nsCommandLineServiceMac.cpp:101
4 	XUL 	XRE_main 	toolkit/xre/nsAppRunner.cpp:1625
5 	firefox 	main 	browser/app/nsBrowserApp.cpp:189
6 	firefox 	firefox@0x1573
Comment 1 User image Scoobidiver (away) 2012-02-24 08:02:03 PST
It first appeared in 12.0a1/20120107.
There is a Widget Gtk version on Linux.
Comment 2 User image Steven Michaud [:smichaud] (Retired) 2012-02-24 09:11:01 PST
Recategorizing because these also happen on Linux.
Comment 3 User image Steven Michaud [:smichaud] (Retired) 2012-02-24 09:13:59 PST
The crash stacks on Linux are much more informative:

0 	mozilla::SignalTracerThread 	Mutex.h:106
1 	TracerCallback 	widget/gtk2/WidgetTraceEvent.cpp:58
4 	mozilla::SignalTracerThread 	Mutex.h:188
5 		@0x9 	
6 	nsAppShell::ScheduleNativeEventCallback 	widget/gtk2/nsAppShell.cpp:157
7 		@0x7fe981c4e01f 	
13 	nsAppShell::ProcessNextNativeEvent 	widget/gtk2/nsAppShell.cpp:162
Comment 4 User image Steven Michaud [:smichaud] (Retired) 2012-02-24 09:25:23 PST
> It first appeared in 12.0a1/20120107.


On Linux the first one is in build 20120105083933:

Comment 5 User image Steven Michaud [:smichaud] (Retired) 2012-02-24 09:38:40 PST
(Following up comment #4)

I can't find any obvious candidate for this bug's trigger among the patches landed just before the 2012-01-05 nightlies.  In any case this crash is too low volume to use build ids to identify the exact build they started in.
Comment 6 User image Steven Michaud [:smichaud] (Retired) 2012-02-24 09:46:23 PST
On Linux these crashes appear to take place at the following line, probably after a call to mozilla::CleanUpWidgetTracing() had invalidated sMutex:
Comment 7 User image Steven Michaud [:smichaud] (Retired) 2012-02-24 09:49:11 PST
On OS X I'd bet they take place at the following line, for the same reason:
Comment 8 User image Steven Michaud [:smichaud] (Retired) 2012-02-24 09:52:12 PST
On Windows we *should* be seeing crashes at the following line:

I'm not sure why we don't.
Comment 9 User image Ted Mielczarek [:ted.mielczarek] 2012-03-06 10:59:04 PST
Benoit added some APIs to let us enable this tracing functionality in a scriptable manner, for use with the profiling extension. This functionality is off by default (and only normally enabled via environment variable), so it's unlikely to affect users that haven't installed the profiling extension.

Steven: the widget-specific bits are fairly different, so it wouldn't surprise me if Windows doesn't crash here.

In fact, we have a known Linux shutdown crash in this code (bug 710296), which is why we didn't enable it on Linux Talos yet.
Comment 10 User image Benoit Girard (:BenWa) 2012-03-06 11:13:55 PST
I looked through the crash reports, the only extensions that I know are using this are 'about:jank' and 'Gecko Profiler', none of which show up in the crash report. Could they show up under <id>@jetpack?
Comment 11 User image Steven Michaud [:smichaud] (Retired) 2012-03-06 12:11:15 PST
These crashes should be very easy to fix:  Just make CleanUpWidgetTracing() null out sMutex (on OS X and Linux).

And for good measure, on Windows CleanUpWidgetTracing() should null out sEventHandle.

I don't know if widget tracing has been implemented on other platforms.  But if it has, similar changes would be needed there.
Comment 12 User image Steven Michaud [:smichaud] (Retired) 2012-03-06 13:35:10 PST
(Following up comment #11)

Oops, the code already does this on OS X and Linux.  I meant to say that, on these platforms, SignalTracerThread() should check if sMutex or sCondVar is NULL.

Patch coming up.
Comment 13 User image Steven Michaud [:smichaud] (Retired) 2012-03-06 13:54:53 PST
Created attachment 603449 [details] [diff] [review]
Comment 14 User image Karl Tomlinson (:karlt) 2012-03-07 13:40:02 PST
*** Bug 733670 has been marked as a duplicate of this bug. ***
Comment 15 User image Ted Mielczarek [:ted.mielczarek] 2012-03-12 12:36:05 PDT
Comment on attachment 603449 [details] [diff] [review]

Review of attachment 603449 [details] [diff] [review]:

Seems plausible. It's definitely going to crash if either of those are NULL. You'll want to watch the Talos Tp5 runs on Tinderbox, because we run Windows/Mac with this tracing enabled there.
Comment 16 User image Steven Michaud [:smichaud] (Retired) 2012-03-12 13:15:02 PDT
Comment on attachment 603449 [details] [diff] [review]

Landed on mozilla-inbound:
Comment 17 User image Marco Bonardo [::mak] 2012-03-13 04:54:18 PDT

Note You need to log in before you can comment on or make changes to this bug.