Bug 79469 - Commit e3cc0d90e14e62a0a787b6c07a6df0f5c84039be breaks unigine heaven
Summary: Commit e3cc0d90e14e62a0a787b6c07a6df0f5c84039be breaks unigine heaven
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: Other Linux (All)
: medium major
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 79039
  Show dependency treegraph
 
Reported: 2014-05-31 03:31 UTC by Axel Davy
Modified: 2014-06-12 17:50 UTC (History)
9 users (show)

See Also:
i915 platform:
i915 features:


Attachments
unigine log (2.06 KB, text/plain)
2014-05-31 03:31 UTC, Axel Davy
Details
Weston log (8.18 KB, text/plain)
2014-05-31 03:32 UTC, Axel Davy
Details

Description Axel Davy 2014-05-31 03:31:39 UTC
Created attachment 100187 [details]
unigine log

I have an intel + amd dedicated card laptop

I use DRI_PRIME to launch unigine heaven on the dedicated card.

Without e3cc0d90e14e62a0a787b6c07a6df0f5c84039be, everything works correctly.
With e3cc0d90e14e62a0a787b6c07a6df0f5c84039be, Unigine fails to load the radeonsi driver.

In addition, under a Wayland compositor (weston or mutter) with XWayland Glamor acceleration,
launching unigine heaven crashes the compositor (with the commit).

I'm attaching the unigine heaven log,

and the log of Weston when it crashes.

The weston log is surprising: XWayland uses Glamor with intel acceleration (with DRI3 working), though it complaints about swrast. Like if it was using intel_dri, and then switched to swrast_dri and then crashed.
XWayland crashes, and Weston with it (Weston crashes most of the time when XWayland crashes).
Comment 1 Axel Davy 2014-05-31 03:32:09 UTC
Created attachment 100188 [details]
Weston log
Comment 2 Axel Davy 2014-05-31 03:34:58 UTC
After looking closer at the weston log, the swrast_dri reference seems to be GLX X side, so probably indirect rendering failing, which has nothing to do with the bug I'm reporting.
Comment 3 David Heidelberg (okias) 2014-05-31 18:06:02 UTC
Confirmed on r600g.
Comment 4 Ian Romanick 2014-06-01 04:24:06 UTC
Ugh... this should also affect the 10.2 release branch.  I'm not super excited about reverting patches, but I don't want to ship a release with Unigine broken either.

Ideas / suggestions?
Comment 5 Alexander Monakov 2014-06-01 07:11:25 UTC
The patch that changed RTLD_GLOBAL to RTLD_LOCAL was incorrect; see http://lists.freedesktop.org/archives/mesa-dev/2014-May/060441.html

dlopening libGL to bring symbols from libglapi is a gross hack, but now that code became a broken gross hack.

I don't understand the problem that that commit was intended to fix.  Can anyone point me to the discussion about "for some driver this even result in dlclose failing to unload leading to catastrophic failure with swrast fallback" (quoted from the commit message)?

The request to link dri drivers against libglapi was registered as bug 57702
Comment 6 Benjamin Bellec 2014-06-01 10:45:57 UTC
(In reply to comment #3)
> Confirmed on r600g.
+1 (Evergreen)
Comment 7 Fabio Pedretti 2014-06-01 16:00:28 UTC
I didn't do a full bisect (I come back about 20 commits) but this prevents running Unity (Ubuntu desktop) on r300g.
Comment 8 Marek Olšák 2014-06-01 17:03:45 UTC
(In reply to comment #4)
> Ugh... this should also affect the 10.2 release branch.  I'm not super
> excited about reverting patches, but I don't want to ship a release with
> Unigine broken either.
> 
> Ideas / suggestions?

I vote for reverting. It seems to break too many apps.
Comment 10 Keith Hammond 2014-06-02 09:39:01 UTC
(In reply to comment #6)
> (In reply to comment #3)
> > Confirmed on r600g.
> +1 (Evergreen)

+1 on cypress

can't launch unity desktop
Comment 11 Rui Salvaterra 2014-06-02 10:33:56 UTC
Also kills Compiz/Unity on my Ironlake, Haswell (Iris Pro 5200) and NV50 (NVAC) machines. This commit seems to bust everything out there.
Comment 12 Adam Jackson 2014-06-02 15:41:23 UTC
(In reply to comment #5)
> The patch that changed RTLD_GLOBAL to RTLD_LOCAL was incorrect; see
> http://lists.freedesktop.org/archives/mesa-dev/2014-May/060441.html
> 
> dlopening libGL to bring symbols from libglapi is a gross hack, but now that
> code became a broken gross hack.

The only part that's broken here is changing the dlopen(libGL) to LOCAL, since we apparently need that to get at glapi.  The other part, changing dlopen(driver) to LOCAL, is still correct.
Comment 13 Marek Olšák 2014-06-02 18:22:42 UTC
FYI, I reverted the patch.
Comment 14 kmod 2014-06-04 07:37:34 UTC
While Unity now loads, graphic is still completely messed up for intel cards

http://www.phoronix.com/forums/showthread.php?50038-Updated-and-Optimized-Ubuntu-Free-Graphics-Drivers/page116
Comment 15 Kenneth Graunke 2014-06-04 07:50:12 UTC
(In reply to comment #14)
> While Unity now loads, graphic is still completely messed up for intel cards
> 
> http://www.phoronix.com/forums/showthread.php?50038-Updated-and-Optimized-
> Ubuntu-Free-Graphics-Drivers/page116

Please file a separate bug report.  The posts you linked don't appear to have anything to do with Unigine Heaven or r600g.
Comment 16 Tapani Pälli 2014-06-04 07:54:35 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > While Unity now loads, graphic is still completely messed up for intel cards
> > 
> > http://www.phoronix.com/forums/showthread.php?50038-Updated-and-Optimized-
> > Ubuntu-Free-Graphics-Drivers/page116
> 
> Please file a separate bug report.  The posts you linked don't appear to
> have anything to do with Unigine Heaven or r600g.

I have problems of figuring out which Mesa is in use there but the symptoms looks similar to bug #79534, please check that when filing the bug.
Comment 18 Kenneth Graunke 2014-06-08 00:34:18 UTC
(In reply to comment #17)
> Intel HD 3000
> 
> This shit:
> http://storage5.static.itmages.ru/i/14/0607/h_1402139007_1933036_f891719247.
> png

Please file a separate bug.  This report is about something else.
Comment 19 Emil Velikov 2014-06-12 17:50:16 UTC
commit 0d5ec2c615784929be095951f9269773a790a2dd
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Mon Jun 2 12:51:09 2014 +0200

    Revert "glx: load dri driver with RTLD_LOCAL so dlclose never fails to unload"

    This reverts commit e3cc0d90e14e62a0a787b6c07a6df0f5c84039be.

    It breaks too many apps and completely breaks my desktop too.
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79469


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.