Bug 103519

Summary: wayland egl apps crash on start with mesa 17.2
Product: Mesa Reporter: Apostolos B. <barz621>
Component: Drivers/DRI/i915Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact: Default DRI bug account <dri-devel>
Severity: normal    
Priority: medium CC: daniel, derekf, porcelain_mouse
Version: 17.2   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch to recover from failed fourcc query

Description Apostolos B. 2017-10-30 19:57:46 UTC
Atom N270, GPU 945GSE. Running wayland and Enlightenment git.

Since mesa 17.2 EFL apps crash on start. Reverting back to 17.1.8 fixes the problem.

I don't have mesa build with debug symbols but the problem seems to be in libEGL_mesa.
Comment 1 Derek Foreman 2017-10-30 21:13:39 UTC
I've been trying to debug this a little bit.  It's worth noting that this crash occurs for Apostolos when running weston-simple-egl under weston as well (which removes Enlightenment and EFL from the equation)

At one point I thought we'd tracked this to create_wl_buffer() failing because queryImage() on this revision hardware doesn't support __DRI_IMAGE_ATTRIB_FOURCC, and I wrote a patch to test that theory.  However recent attempts to debug this against git master seem to indicate that it's not even getting to create_wl_buffer() before segfaulting anymore.

Unfortunately, I don't have the hardware myself, so my ability to help is somewhat limited.

It's probably worth noting that the wayland compositor (weston or enlightenment) starts and renders with egl, but clients - including the trivial egl demo clients provided with weston crash with a segmentation fault before displaying a single frame.
Comment 2 Daniel Stone 2017-10-31 08:32:12 UTC
(In reply to Apostolos B. from comment #0)
> I don't have mesa build with debug symbols but the problem seems to be in
> libEGL_mesa.

I also don't have any i915 hardware, but getting a backtrace with debug symbols would be a fantastic start.
Comment 3 Derek Foreman 2017-10-31 14:55:31 UTC
Created attachment 135187 [details] [review]
Patch to recover from failed fourcc query
Comment 4 Derek Foreman 2017-10-31 14:57:49 UTC
Ok, this patch has been successfully tested on his hardware and brings efl/weston apps back to life when applied to 17.2.3.

It will be a couple of days before we can get a re-test against git master again due to the obstinate user not wanting to deal with an unpackaged drm dependency. ;)

After testing I'll send the patch to the mailing list for further review.
Comment 5 Apostolos B. 2017-11-01 21:45:10 UTC
Dereks patch was tested on 17.2.4 and 17.3.0-rc2 and solves the problem. EFL apps and weston-simple-egl work fine.

Merge and close.
Comment 6 Emil Velikov 2017-11-08 17:43:54 UTC
Send Derek's patch to the list with some ack/rb tags. Modulo any objections I'll push it in a day or two.

[1] https://patchwork.freedesktop.org/patch/187092/
Comment 7 Apostolos B. 2017-11-14 14:54:28 UTC
@Emil Velikov

It will be in for 17.3 right?
Comment 8 Derek Foreman 2017-11-14 15:36:42 UTC
Oops, I've dropped the ball on this.

I need to send it to the list for further review (and potentially revision in response to that) - will do that today.
Comment 9 Emil Velikov 2017-11-14 15:42:21 UTC
Right, my earlier comment should have said s/Send/I've sent/ ...
Just pushed the patch to master and it will find it's way to 17.2 and 17.3

Thanks for the help gents.
Comment 10 Derek Foreman 2017-11-14 15:44:46 UTC
Thanks Emil!  sorry for the noise on list. :(

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.