Summary: | REGRESSION(r218629): [GTK] ASSERTION FAILED: m_eglDisplay == EGL_NO_DISPLAY in WebCore::PlatformDisplay::~PlatformDisplay | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bugs-noreply, cgarcia, mcatanzaro, zan | ||||
Priority: | P2 | ||||||
Version: | Other | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=157973 | ||||||
Attachments: |
|
Description
Michael Catanzaro
2017-07-24 09:09:06 PDT
For some reason the PlatformDisplay destructor is being run before shutDownEglDisplays is run in an exit handler. That should never happen because the exit handler is registered in PlatformDisplay::initializeEGLDisplay, which is not a static function: it cannot be called until after a PlatformDisplay has been created. So PlatformDisplay is always created first, that means its destructor should be registered first before shutDownEglDisplays is registered, and exit handlers are run like a stack, so it should be last-in, first out. That means shutDownEglDisplays should always execute first at exit time, before the destructor. For some reason, that is no longer happening. I don't know why. I would be very tempted to blame this on the switch to non-threadsafe statics, except that has not landed yet, so that cannot be to blame. This regressed in r218629. Before r218629, the wayland nested compositor display was a singleton created on demand by AcceleratedSurfaceWayland, but now it's created unconditionally on web process creation when a valid display name is received from the UI process. The side effect of this is that now the shared display is created after the nested compositor display that is not a singleton anymore. The atexit used by PlatformDisplay to shutdown egl display assumes that it will be registered by the shared display. Since we switched to on demand AC mode, the shared display is only used in the web process when entering AC mode, that's why it only crashes when we have entered AC at least once. We just need to ensure that the shared display is created before the nested compositor display. Created attachment 316360 [details]
Patch
Committed r219866: <http://trac.webkit.org/changeset/219866> |