2.14 KB, patch
|Details | Diff | Splinter Review|
2.48 KB, patch
|Details | Diff | Splinter Review|
1.53 KB, patch
|Details | Diff | Splinter Review|
It's #102 top crasher in 14.0 and occurs on Galaxy Nexus at startup. Here is a crash report: bp-477a2184-fa24-4504-8862-e650a2120627. java.lang.IllegalStateException: Hardware acceleration can only be used with a single UI thread. Original thread: Thread[main,5,main] Current thread: Thread[GeckoBackgroundThread,5,main] at android.view.HardwareRenderer$GlRenderer.checkCurrent(HardwareRenderer.java:1246) at android.view.HardwareRenderer$Gl20Renderer.safelyRun(HardwareRenderer.java:1444) at android.view.HardwareRenderer$Gl20Renderer.destroyHardwareResources(HardwareRenderer.java:1468) at android.view.ViewRootImpl.destroyHardwareRenderer(ViewRootImpl.java:4005) at android.view.ViewRootImpl.die(ViewRootImpl.java:3939) at android.view.WindowManagerImpl.removeViewLocked(WindowManagerImpl.java:402) at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:350) at android.view.WindowManagerImpl$CompatModeWrapper.removeView(WindowManagerImpl.java:160) at android.app.Dialog.dismissDialog(Dialog.java:319) at android.app.Dialog$1.run(Dialog.java:119) at android.os.Handler.handleCallback(Handler.java:615) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at org.mozilla.gecko.GeckoBackgroundThread.run(GeckoBackgroundThread.java:31) More reports at: https://crash-stats.mozilla.com/report/list?signature=java.lang.IllegalStateException%3A+Hardware+acceleration+can+only+be+used+with+a+single+UI+thread.+Original+thread%3A+Thread[main%2C5%2Cmain]
It has appeared after Google I/O 2012.
Naoki, see bug 703102.
This seems to be almost exclusively Galaxy Nexus. Of 101 crash reports on 14.* release yesterday, this is the device split: Samsung Galaxy Nexus 97 Motorola Xoom 1 Motorola MZ601 1 Asus Nexus 7 1 Amazon Kindle Fire 1
It's currently #1 top crasher in 14.0.2.
(In reply to Scoobidiver from comment #4) > It's currently #1 top crasher in 14.0.2. 14.0.2 is restricted to JB, so it's only #1 on JB.
Marking QAwanted for repro steps; most likely just have to turn on hardware acceleration? No URL listed. Also ADU is low... 226 crashes 5,072 ADI = 4.46 23 crashes 257 ADI = 8.95%
The problem is that, somehow, a Dialog message was posted to our GeckoBackgroundThread's Handler. This suggests we might be spawning an AsyncTask from GeckoBackgroundThread (which is bad) or we might be confusing GeckoAppShell's getHandler/getGeckoHandler/getMainHandler when posting a UI event. Sriram, do any of those problems sound familiar?
The only place where the dialog dismissal can happen on background thread is PromptService. I'll post a patch soonish.
It's #1 top crasher in the first day of 15.0 with many dupes.
Sriram, we should try uplift your PromptService patch to Beta 16 (or even Firefox 15).
Here is the correct "More reports" link. Bugzilla did not include the trailing ']' character when it auto-linked the original URL, so I have URL-encoded it here: https://crash-stats.mozilla.com/report/list?query_search=signature&query_type=contains&reason_type=contains&range_value=3&range_unit=weeks&hang_type=any&process_type=any&signature=java.lang.IllegalStateException%3A%20Hardware%20acceleration%20can%20only%20be%20used%20with%20a%20single%20UI%20thread.%20Original%20thread%3A%20Thread[main%2C5%2Cmain%5D
(In reply to Chris Peterson (:cpeterson) from comment #10) > Sriram, we should try uplift your PromptService patch to Beta 16 (or even > Firefox 15). We might be able to take a fix for this as a ride-along in a 15.0 chemspill -- do you have a patch ready? Can we get a build to test?
Sriram and I discussed this bug before we went on PTO. I am testing a possible fix now.
Created attachment 658259 [details] [diff] [review] part-1-create-dialog-on-UI-thread.patch Part 1: Create PromptService's AlertDialog on the UI thread. PromptService.handleMessage() is called on the Gecko thread. It posts a runnable to call PromptService.processMessage() on the GeckoBackgroundThread, but this causes PromptService.show() to create the AlertDialog on the GeckoBackgroundThread. The AlertDialog must be created on the UI thread, so I changed show()() to post the AlertDialog creation to UI thread. A simpler solution would be for PromptService.handleMessage() to post processMessage() to the UI thread directly, skipping GeckoBackgroundThread. But that would move some possibly expensive operations (JSON parsing and layout inflation) to the UI thread.
Created attachment 658265 [details] [diff] [review] part-2-assert-on-UI-thread.patch Part 2: Assert that PromptService's AlertDialog is called back on the UI thread. I plan to uplift patch 1 to Aurora, Beta, and/or Release, so I separated this non-essential debugging code into a separate patch 2. I won't uplift patch 2.
Created attachment 658267 [details] [diff] [review] part-3-skip-some-ifs.patch Part 3: Skip some unnecessary conditional code when creating PromptService's AlertDialog. This patch is a trivial micro-optimization.
Comment on attachment 658259 [details] [diff] [review] part-1-create-dialog-on-UI-thread.patch >diff --git a/mobile/android/base/PromptService.java b/mobile/android/base/PromptService.java >+ final OnCancelListener this_ = this; nit: Can you rename this_ to self ?
You can also use PromptService.this from inside the runnable to reference the outer class directly.
(In reply to Kartikaya Gupta (:kats) from comment #19) > You can also use PromptService.this from inside the runnable to reference > the outer class directly. Damn, I was looking for that style but failed to find confirmation about it. Yes! Use this style please!
Comment on attachment 658259 [details] [diff] [review] part-1-create-dialog-on-UI-thread.patch Since we're considering this for FF15.0.1 inclusion, a=akeybl for landing on Aurora/Beta.
Comment on attachment 658259 [details] [diff] [review] part-1-create-dialog-on-UI-thread.patch [Approval Request Comment] Regression caused by (bug #): bug 694455 User impact if declined: This is the #1 topcrash for Firefox 15. Testing completed (on m-c, etc.): Tested locally Risk to taking this patch (and alternatives if risky): Low risk. alert() dialogs are already crashing, so this patch can't make it much worse. :) Patch part 2 and 3 do NOT need to be uplifted. They are extra cleanups that are not necessary to fix the crash.
Landed patch 1 on m-c: https://hg.mozilla.org/mozilla-central/rev/647fabcaa951 I will land patch 2 and 3 on m-i later. They are extra cleanups that are not necessary to fix the crash.
The target milestone is the m-c version.
Landed patches 2 and 3 on m-i. These follow-on patches do not need to be uplifted to m-a+. https://hg.mozilla.org/integration/mozilla-inbound/rev/06fef017a420 https://hg.mozilla.org/integration/mozilla-inbound/rev/58be0a04c3c4
There's one crash in 16.0b2(build2) that contains the fix: bp-6a9fc4ce-7d1d-4d18-bf68-865fd2120907.
(In reply to Scoobidiver from comment #30) > There's one crash in 16.0b2(build2) that contains the fix: > bp-6a9fc4ce-7d1d-4d18-bf68-865fd2120907. Beta 16.0b2 (20120906211157) does not have my fix. I checked the archived sources on ftp.mozilla.org. Build 20120906211157's creation date is after I landed my m-b fix, so I assume that build was snapped before my fix but finished building after my fix. This crash is not a beta topcrash, so I think waiting for next week's Beta 16.0b3 to pick up my fix is not a big problem.
It's #3 top crasher in 15.0.1.
The patch for this bug fixed *a* bug, but it was mostly speculation by Sriram and me that it was the exact stack trace in this crash report. Sriram, do you have any other ideas why a dialog would be running on our GeckoBackgroundThread?
There are still crashes in 16.0b4.
No crashes listed in the last 4 weeks verifying this.