Bug 94925 - Crash in egl_dri3_get_dri_context with Dolphin EGL/X11 in single-core mode
Summary: Crash in egl_dri3_get_dri_context with Dolphin EGL/X11 in single-core mode
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: EGL (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-13 21:30 UTC by Link Mauve
Modified: 2016-09-15 10:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Stack trace of the crash (4.53 KB, text/plain)
2016-04-13 21:30 UTC, Link Mauve
Details

Description Link Mauve 2016-04-13 21:30:39 UTC
Created attachment 122904 [details]
Stack trace of the crash

When Dolphin-emu is compiled with EGL (-DUSE_EGL=ON), and set to single core mode (Config > General > Enable Dual Core disabled), it crashes in egl_dri3_get_dri_context().

This doesn’t happen in dual core mode (where the emulated GPU is running on a different thread than the emulated CPU), or when Dolphin is compiled with GLX as its context API, but it happens on both Xorg and Xwayland since both are using DRI3.
Comment 1 Karol Herbst 2016-05-29 21:49:46 UTC
it seems like Mesa doesn't handle this situation right:

dolphin creats the Context on one thread and makes the context current on another one.

with DRI2 you get a white window and with DRI3 mesa simply crashes.
Comment 2 Eero Tamminen 2016-09-15 08:04:33 UTC
(In reply to Link Mauve from comment #0)
> When Dolphin-emu is compiled with EGL (-DUSE_EGL=ON), and set to single core
> mode (Config > General > Enable Dual Core disabled), it crashes in
> egl_dri3_get_dri_context().
> 
> This doesn’t happen in dual core mode (where the emulated GPU is running on
> a different thread than the emulated CPU), or when Dolphin is compiled with
> GLX as its context API, but it happens on both Xorg and Xwayland since both
> are using DRI3.

(In reply to Karol Herbst from comment #1)
> it seems like Mesa doesn't handle this situation right:
> 
> dolphin creats the Context on one thread and makes the context current on
> another one.
> 
> with DRI2 you get a white window and with DRI3 mesa simply crashes.

Doesn't seem like Intel backend issue.  What's the correct component for EGL context handling issues, EGL or "Mesa core"?
Comment 3 Emil Velikov 2016-09-15 10:03:12 UTC
The crash should be resolved with the following commit. Feel free to reopen if that's not the case.

commit d98d6e6269167230d20efdc45d608435a52f25fb
Author: Dave Airlie <airlied@gmail.com>
Date:   Mon May 30 08:02:00 2016 +1000

    egl/dri3: don't crash on no context.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94925


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.