nsWindow::SetEGLNativeWindowSize() and nsWindow::GetNativeData(NS_NATIVE_EGL_WINDOW) is not thread safe
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(5 files, 5 obsolete files)
nsWindow::SetEGLNativeWindowSize() and nsWindow::GetNativeData(NS_NATIVE_EGL_WINDOW) may be called from Renderer thread and need sync with Main thread.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Comment 2•2 years ago
|
||
Move EGLWindow resize code from nsWindow to MozContainerWayland. It allows to use container lock and make the operation thread safe.
Depends on D184121
| Assignee | ||
Comment 3•2 years ago
|
||
If GdkCeiledScaleFactor() is called from non-main thread (compositor, renderer etc.) just return recent scale factor and don't update it. If it's changed it will be updated from main thread later.
Depends on D184122
| Assignee | ||
Comment 4•2 years ago
|
||
Remove hidden GdkCeiledScaleFactor() call from moz_container_wayland_set_scale_factor_locked() and pass it directly there.
It reduces number of GdkCeiledScaleFactor() calls and make sure scale is not changed surprisingly.
G: changed widget/gtk/WindowSurfaceWaylandMultiBuffer.cpp
Depends on D184123
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 5•2 years ago
|
||
Remove hidden GdkCeiledScaleFactor() call from moz_container_wayland_set_scale_factor_locked() and pass it directly there.
It reduces number of GdkCeiledScaleFactor() calls and make sure scale is not changed surprisingly.
Depends on D184122
| Assignee | ||
Comment 6•2 years ago
|
||
GdkCeiledScaleFactor() can't be called from non-main thread (compositor, renderer etc.).
In such case just return recent scale factor and don't update it.
If it's changed it will be updated from main thread later.
Depends on D184170
| Assignee | ||
Comment 7•2 years ago
|
||
Depends on D184171
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
Comment 10•2 years ago
|
||
| bugherder | ||
Comment 11•2 years ago
|
||
Comment 12•2 years ago
•
|
||
Backed out 4 changesets (Bug 1844543) for causing bustages in nsWindow.h CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=424486558&repo=autoland&lineNumber=9287
Backout: https://hg.mozilla.org/integration/autoland/rev/1e3e1a5b6d6cf0c3011616048f77f721114381db
There are also this failures which appeared later on: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel&searchStr=linux%2C18.04%2Cx64%2Cwebrender%2Ctsan%2Copt%2Creftest&tochange=b83cfea645752706c643567095d49b349cb9e610&fromchange=360e8f490c101dcdbf0a832d28a1da47c8b04ac1&selectedTaskRun=RiLDGt5KQmCpBWFuCfvKoA.0
| Assignee | ||
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Comment 14•2 years ago
|
||
Backed out for causing multiple failures on Linux WebRender
| Assignee | ||
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Comment 17•2 years ago
|
||
We need to use test&set atomic operation and not mutex.
| Assignee | ||
Comment 18•2 years ago
|
||
| Assignee | ||
Comment 19•2 years ago
|
||
Depends on D187027
Comment 20•2 years ago
|
||
| bugherder | ||
Comment 21•2 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/aa3cdac16780 is causing Assertion failure: NS_IsMainThread(), at mozilla-central/widget/gtk/nsWindow.cpp:8900 for me on startup on sway.
So I can't start devel-builds right now with this change.
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 22•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 23•2 years ago
|
||
Comment 24•2 years ago
|
||
Comment 25•2 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 26•2 years ago
|
||
Last patches landed, closing.
Comment 27•2 years ago
|
||
[Tracking Requested - why for this release]: Could we consider backporting this to ESR115? Especially the thread-safety fix for nsWindow.
Comment 28•2 years ago
|
||
Sounds like a question for Martin. It'd need a rebased patch if yes.
Comment 29•2 years ago
|
||
Tom, could you clarify why for comment 27? Not a lot of context there :)
| Assignee | ||
Comment 30•2 years ago
|
||
(In reply to Tom Schuster (MoCo) from comment #27)
[Tracking Requested - why for this release]: Could we consider backporting this to ESR115? Especially the thread-safety fix for nsWindow.
We'd need to backport all the patches here. Not sure how much work is that.
Updated•2 years ago
|
Comment 31•1 year ago
|
||
From what I can see, the patches in this bug do not all graft cleanly. I wouldn't be opposed to taking a rebased set of patches for ESR if the belief is that they help with some crashes tracked in other bugs, but we'll need those to be posted with approval requests for that to be considered.
Updated•1 year ago
|
Updated•1 year ago
|
Description
•