Bug 97444 - mesa git crashes in libxshmfence
Summary: mesa git crashes in libxshmfence
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-22 20:54 UTC by Fabian Maurer
Modified: 2018-10-05 08:33 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Winedebug log (2.65 KB, text/plain)
2016-08-22 20:54 UTC, Fabian Maurer
Details
gdb backtrace (1.85 KB, text/plain)
2016-08-29 21:13 UTC, Fabian Maurer
Details

Description Fabian Maurer 2016-08-22 20:54:23 UTC
Created attachment 125966 [details]
Winedebug log

Using mesa-git crashes wine, works fine with with normal mesa.
The program crashes somewhere in libxshmfence, most likely related to DRI3.
Issue not present if "LIBGL_ALWAYS_SOFTWARE" or "LIBGL_DRI3_DISABLE" is set.

Attached a crash log from winedbg, if you need more information I'll provide it.


Systeminfo:
-Arch 64bit
-Radeon R9 285 using amdgpu and opensource driver
-OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.1.0-devel (git-0328b20)
-OpenGL version string: 3.0 Mesa 12.1.0-devel (git-0328b20)
-mesa-git and mesa-libgl-git (84113.0328b20), libdrm-git (5912.b214b05)
Comment 1 Michel Dänzer 2016-08-23 06:46:48 UTC
Can you bisect Mesa?
Comment 2 Fabian Maurer 2016-08-23 13:43:07 UTC
I'd like to, but the older versions fail due to the wrong version of llvm/clang.
Is there somewhere a tutorial how to compile both together?
Comment 3 Michel Dänzer 2016-08-24 00:48:12 UTC
Assuming you can reproduce the problem with Mesa Git + LLVM 3.9/3.8, you can stick to the latter for bisecting. If you run into any clang related issues, you can build Mesa with --disable-opencl for the bisection.
Comment 4 Fabian Maurer 2016-08-25 01:53:46 UTC
I managed to downgrade mesa to 11.2.2, but the issue persisted. Figured out it can be fixed by downgrading "xf86-video-amdgpu" from git to stable.
Now I'm not sure wheter this bug is a mesa issue or from that project.

Since I didn't mention it yet, the issue is with (any) wine and N-Ball(http://www.ragdollsoft.com/nball/). It has a demo and crashes right on startup.

I'd provide an apitrace, but if it's made with "LIBGL_ALWAYS_SOFTWARE" or "LIBGL_DRI3_DISABLE", then it replays fine. If made it without, the trace is cut of before the crashing part.

Also, the bug is non-deterministic. It works most of the time if I edit wine and put a 1 second sleep before "glXSwapBuffers", maybe a racecondition.

Is this still the right place for this issue?
Comment 5 Michel Dänzer 2016-08-25 05:50:29 UTC
Can you bisect xf86-video-amdgpu then? :)
Comment 6 Fabian Maurer 2016-08-25 18:44:01 UTC
Sorry, I think my local git tree was a few days out of date, what gave me some strange issues, sorry for wasting your time with that.

The issue seems to have been already fixed in "1e3218bc5ba2b739261f0c0bacf4eb662d377236", and while this commit seems performance related, at least that fixes the crash for me. Reverting that commit brought back the crash.

Though I don't know if this is a genuine fix for the issue I experienced or just a lucky coincidence. After all the downgrade to xf86-video-amdgpu did help, too.
Should I still bisect xf86-video-amdgpu to see where thats changes introduced the crash? I guess it's some kind of odd issue with interaction between those two parts.
Comment 7 Michel Dänzer 2016-08-26 00:46:29 UTC
(In reply to Fabian Maurer from comment #6)
> Should I still bisect xf86-video-amdgpu to see where thats changes
> introduced the crash?

That would be interesting. It definitely shouldn't crash even without that Mesa change.
Comment 8 Fabian Maurer 2016-08-26 15:57:35 UTC
The commit introducing this issue is "861da1d5c243f51d6c1f76e5b13e5184aa608776" ("Enable DRI3 by default when building for Xorg >= 1.18.3").

So this doesn't really help, seems like DRI3 was faulty to begin with.

An idea how to investigate this issue further?
Comment 9 Michel Dänzer 2016-08-29 02:32:10 UTC
A proper gdb backtrace of a crash might be helpful.
Comment 10 Fabian Maurer 2016-08-29 21:13:31 UTC
Created attachment 126105 [details]
gdb backtrace

Backtrace from winebdg in gdb mode. Normal gdb doesn't like wine and always reports broken stackframes with no symbols, but this should be the same output anyways.
Comment 11 Michel Dänzer 2018-10-04 16:10:17 UTC
Is this still happening with current Mesa?
Comment 12 Fabian Maurer 2018-10-04 17:24:46 UTC
No, doesn't seem to happen anymore.
Comment 13 Michel Dänzer 2018-10-05 08:33:13 UTC
(In reply to Fabian Maurer from comment #12)
> No, doesn't seem to happen anymore.

Glad to hear that, thanks for the follow-up!


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.