Closed Bug 1304195 Opened 8 years ago Closed 8 years ago

3,000 instances of "ScopedXErrorHandler being called off main thread, may cause issues: 'NS_IsMainThread()'" emitted from gfx/src/X11Util.cpp during linux64 debug testing

Categories

(Core :: Graphics, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: erahm, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: regression, Whiteboard: [gfx-noted])

Attachments

(1 file)

> 2960 WARNING: ScopedXErrorHandler being called off main thread, may cause issues: 'NS_IsMainThread()', file gfx/src/X11Util.cpp, line 66

This warning [1] shows up in the following test suites:

>    472 - desktop-test-linux64/debug-web-platform-tests-reftests-e10s Wr
>    472 - desktop-test-linux64/debug-web-platform-tests-reftests Wr
>    290 - desktop-test-linux64/debug-mochitest-media-e10s mda
>    289 - desktop-test-linux64/debug-mochitest-chrome-3 c3
>    284 - desktop-test-linux64/debug-mochitest-media mda
>    160 - desktop-test-linux64/debug-mochitest-chrome-1 c1
>    137 - desktop-test-linux64/debug-mochitest-clipboard cl
>    127 - desktop-test-linux64/debug-mochitest-clipboard-e10s cl
>    127 - desktop-test-linux64/debug-mochitest-jetpack JP
>    119 - desktop-test-linux64/debug-mochitest-chrome-2 c2
>     44 - desktop-test-linux64/debug-firefox-ui-functional-local en-US
>     38 - desktop-test-linux64/debug-mochitest-a11y a11y
>     30 - desktop-test-linux64/debug-firefox-ui-functional-local-e10s en-US
>     24 - desktop-test-linux64/debug-firefox-ui-functional-remote en-US
>     22 - desktop-test-linux64/debug-mochitest-gpu-e10s gpu
>     22 - desktop-test-linux64/debug-mochitest-gpu gpu
>     17 - desktop-test-linux64/debug-firefox-ui-functional-remote-e10s en-US
>      9 - desktop-test-linux64/debug-web-platform-tests-e10s-5 5
>      9 - desktop-test-linux64/debug-web-platform-tests-5 5
>      8 - desktop-test-linux64/debug-crashtest-e10s C
>      8 - desktop-test-linux64/debug-crashtest C
>      6 - desktop-test-linux64/debug-web-platform-tests-e10s-7 7
>      6 - desktop-test-linux64/debug-web-platform-tests-7 7
>      5 - desktop-test-linux64/debug-reftest-no-accel-7 Ru7
>      5 - desktop-test-linux64/debug-reftest-no-accel-e10s-8 Ru8
>      5 - desktop-test-linux64/debug-reftest-no-accel-e10s-7 Ru7
>      5 - desktop-test-linux64/debug-reftest-no-accel-5 Ru5
>      5 - desktop-test-linux64/debug-reftest-8 R8
>      5 - desktop-test-linux64/debug-reftest-7 R7
>      5 - desktop-test-linux64/debug-reftest-no-accel-8 Ru8
>      5 - desktop-test-linux64/debug-reftest-no-accel-e10s-4 Ru4
>      5 - desktop-test-linux64/debug-reftest-no-accel-6 Ru6
>      5 - desktop-test-linux64/debug-reftest-e10s-5 R5
>      5 - desktop-test-linux64/debug-reftest-e10s-3 R3
>      5 - desktop-test-linux64/debug-reftest-e10s-1 R1
>      5 - desktop-test-linux64/debug-jsreftest-e10s-1 J1
>      5 - desktop-test-linux64/debug-reftest-2 R2
>      5 - desktop-test-linux64/debug-reftest-e10s-6 R6
>      5 - desktop-test-linux64/debug-reftest-5 R5
>      5 - desktop-test-linux64/debug-reftest-e10s-7 R7
>      5 - desktop-test-linux64/debug-reftest-e10s-2 R2
>      5 - desktop-test-linux64/debug-reftest-4 R4
>      5 - desktop-test-linux64/debug-reftest-no-accel-4 Ru4
>      5 - desktop-test-linux64/debug-reftest-no-accel-e10s-1 Ru1
>      5 - desktop-test-linux64/debug-reftest-no-accel-e10s-5 Ru5
>      5 - desktop-test-linux64/debug-jsreftest-e10s-2 J2
>      5 - desktop-test-linux64/debug-reftest-no-accel-e10s-3 Ru3
>      5 - desktop-test-linux64/debug-reftest-3 R3
>      5 - desktop-test-linux64/debug-reftest-6 R6
>      5 - desktop-test-linux64/debug-reftest-e10s-4 R4
>      5 - desktop-test-linux64/debug-reftest-e10s-8 R8
>      5 - desktop-test-linux64/debug-reftest-no-accel-2 Ru2
>      5 - desktop-test-linux64/debug-reftest-no-accel-3 Ru3
>      5 - desktop-test-linux64/debug-reftest-no-accel-1 Ru1
>      5 - desktop-test-linux64/debug-reftest-1 R1
>      5 - desktop-test-linux64/debug-reftest-no-accel-e10s-6 Ru6
>      5 - desktop-test-linux64/debug-reftest-no-accel-e10s-2 Ru2
>      5 - desktop-test-linux64/debug-jsreftest-1 J1
>      5 - desktop-test-linux64/debug-jsreftest-2 J2
>      3 - desktop-test-linux64/debug-web-platform-tests-e10s-8 8
>      3 - desktop-test-linux64/debug-web-platform-tests-2 2
>      3 - desktop-test-linux64/debug-web-platform-tests-e10s-1 1
>      3 - desktop-test-linux64/debug-web-platform-tests-e10s-6 6
>      3 - desktop-test-linux64/debug-web-platform-tests-12 12
>      3 - desktop-test-linux64/debug-web-platform-tests-4 4
>      3 - desktop-test-linux64/debug-web-platform-tests-9 9
>      3 - desktop-test-linux64/debug-web-platform-tests-e10s-4 4
>      3 - desktop-test-linux64/debug-web-platform-tests-8 8
>      3 - desktop-test-linux64/debug-web-platform-tests-e10s-11 11
>      3 - desktop-test-linux64/debug-web-platform-tests-e10s-12 12
>      3 - desktop-test-linux64/debug-web-platform-tests-1 1
>      3 - desktop-test-linux64/debug-web-platform-tests-6 6
>      3 - desktop-test-linux64/debug-web-platform-tests-e10s-9 9
>      3 - desktop-test-linux64/debug-web-platform-tests-10 10
>      3 - desktop-test-linux64/debug-web-platform-tests-3 3
>      3 - desktop-test-linux64/debug-web-platform-tests-e10s-10 10
>      3 - desktop-test-linux64/debug-web-platform-tests-11 11
>      3 - desktop-test-linux64/debug-web-platform-tests-e10s-2 2
>      3 - desktop-test-linux64/debug-web-platform-tests-e10s-3 3

It shows up in 1552 tests. A few of the most prevalent:

>    424 -        Shutdown
>    132 - [e10s] Shutdown
>     96 -        jetpack-package/addon-sdk/source/test/test-simple-prefs.js.testUnloadOfDynamicPrefGeneration
>     15 -        test_restore_windows_after_restart.py TestRestoreWindowsAfterRestart.test_with_variety
>     14 - [e10s] dom/plugins/test/mochitest/test_pluginstream_err.html
>     14 -        dom/plugins/test/mochitest/test_pluginstream_err.html
>     12 -        layout/xul/test/test_windowminmaxsize.xul
>     10 - [e10s] dom/media/tests/mochitest/test_getUserMedia_mediaStreamConstructors.html
>      9 -        toolkit/content/tests/chrome/test_dialogfocus.xul
>      9 -        test_ssl_status_after_restart.py TestSSLStatusAfterRestart.test_ssl_status_after_restart

[1] https://hg.mozilla.org/mozilla-central/annotate/62f79d676e0e/gfx/src/X11Util.cpp#l66
Has STR: --- → yes
Keywords: regression
Priority: -- → P3
Whiteboard: [gfx-noted]
This create an alias for ScopedXErrorHandler that allows off-main-thread usage to be acknowledged and silence the warnings. Simply use OffMainThreadScopedXErrorHandler in place of the old class, so that it is self-documenting when used in the code that, yes, we are in fact knowingly setting an X error handler off the main thread.

In this case, we have the "assumption" that when GLX contexts are being created, the main thread is blocked. This patch does not attempt to upset the status quo in terms of actually investigating that assumption right now, but at least allows us to embed our assumption into the code.

Andrew Comminos was working on a more complete fix involving a unified error handler and atomic overriding of that, but that is still off in the future right now.

For now, let's at least get these spammy warnings out of the logs.
Attachment #8795140 - Flags: review?(nical.bugzilla)
Attachment #8795140 - Flags: review?(nical.bugzilla) → review+
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3eb2ceb66ec5
silence warnings from ScopedXErrorHandler when used off main thread if acknowledged. r=nical
Backout by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/336035eff238
Backed out changeset 3eb2ceb66ec5 for static build bustage
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5cf67663e962
silence warnings from ScopedXErrorHandler when used off main thread if acknowledged. r=nical
https://hg.mozilla.org/mozilla-central/rev/5cf67663e962
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: