Bug 63404 - [wayland egl] intel_do_flush_locked failed: invalid argument, crash
Summary: [wayland egl] intel_do_flush_locked failed: invalid argument, crash
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
: 62663 66415 (view as bug list)
Depends on: 54111
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-10 23:22 UTC by Joe Konno
Modified: 2013-07-22 19:16 UTC (History)
8 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Joe Konno 2013-04-10 23:22:26 UTC
When using the DRI2 EGL Wayland backend, varying circumstances will elicit the following stderr printf, followed by a mesa crash, resulting in a black, hung display:

intel_do_flush_locked failed: Invalid argument

It is difficult to consistently reproduce. What initially got me looking was a usage scenario where multiple instances of a Wayland client ('gears', which borrows heavily from 'glxgears') were being launched. It's a roll of the dice which instance brings the issue to the fore.

So far, usage scenarios that cause this issue:

  * launch multiple instances of a GL or EGL client (Weston 'gears' or 'simple-egl') in rapid succession on Weston w/ drm-backend
    - on the order of gears [& gears]+
  * launching the drm-backend of the Weston display manager
  * launching a GLMark2 GL|ES2 benchmark using the es2-wayland backend

This regression seems to have occurred somewhere in Mesa master between commit '8aa8b05' and '032e554'. This regression is not seen on the 9.0 branch. Bisecting this is proving tedious, and progress slow.

If anyone would like to help with bisection, by all means.
Comment 1 Joe Konno 2013-04-10 23:25:20 UTC
To be clear, the mesa crash and stderr printf will cause the "lucky" instance to crash as well.
Comment 2 Kristian Høgsberg 2013-04-17 13:55:18 UTC
Joe, if you're up for compiling a new kernel, here are two patches you can try

http://lists.freedesktop.org/archives/dri-devel/2013-April/037101.html

against Linus git master.
Comment 3 Joe Konno 2013-04-17 14:10:58 UTC
I'm up for it. I'll give it a go later today.

(In reply to comment #2)
> Joe, if you're up for compiling a new kernel, here are two patches you can
> try
> 
> http://lists.freedesktop.org/archives/dri-devel/2013-April/037101.html
> 
> against Linus git master.
Comment 4 Joe Konno 2013-04-18 20:19:32 UTC
Applied those two patches from Imre on kernel 3.9-rc7. After booting with that patched kernel, unable to reproduce. I reboot into F17's stock 3.8.4-102 kernel, and I can easily reproduce.

(In reply to comment #2)
> Joe, if you're up for compiling a new kernel, here are two patches you can
> try
> 
> http://lists.freedesktop.org/archives/dri-devel/2013-April/037101.html
> 
> against Linus git master.
Comment 5 Joe Konno 2013-04-22 15:58:35 UTC
Adding references to DRI bugs related to this issue.
Comment 6 Ander Conselvan de Oliveira 2013-04-23 14:02:10 UTC
So this is actually a kernel bug, but I just sent a patch to mesa mailing list to disable prime when running on top of 3.8 3.9. The latter version has not been released yet, but it seems unlikely that it will contain a fix when it is released next week.

For reference, commit be8a42ae60addd8b6092535c11b42d099d6470ec in Linus tree introduces the problem. The fix is still being discussed in dri-devel@ mailing list. Latest version (as of this writing) is:

http://lists.freedesktop.org/archives/dri-devel/2013-April/037716.html


Joe, the second dependency you added is a LibreOffice bug. Wrong number?
Comment 7 Ander Conselvan de Oliveira 2013-04-23 14:04:24 UTC
*** Bug 62663 has been marked as a duplicate of this bug. ***
Comment 8 Joe Konno 2013-04-23 14:15:09 UTC
Thanks Ander, bug #59299 has nothing to do with this.
Comment 9 Ander Conselvan de Oliveira 2013-06-03 12:35:55 UTC
Kernel stable releases 3.8.13 and 3.9.2 contain the fix for this issue. People still seeing this should (request their distros to) pick up the following patch:

author	Dave Airlie <airlied@gmail.com>	2013-04-21 23:54:36 (GMT)
committer	Dave Airlie <airlied@redhat.com>	2013-04-30 23:30:15 (GMT)
commit	219b47339ced80ca580bb6ce7d1636166984afa7 (patch)
tree	1646e5e3b5998a5b13f71c8f06b7a28a0163fbe7
parent	c55b6b3da25aa3af36ec51a13a4ed15fef0d7a73 (diff)

drm/prime: keep a reference from the handle to exported dma-buf (v6)
Comment 10 Ander Conselvan de Oliveira 2013-07-01 08:09:28 UTC
*** Bug 66415 has been marked as a duplicate of this bug. ***
Comment 11 Joe Konno 2013-07-22 19:16:14 UTC
Verified.

What Ander said in comment 9.


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.