Bug 38896 - [softpipe] glxinfo hangs
Summary: [softpipe] glxinfo hangs
Status: CLOSED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium blocker
Assignee: Thomas Hellström
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-01 11:53 UTC by Vinson Lee
Modified: 2011-07-07 00:11 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Quick fix for the issue (1.97 KB, patch)
2011-07-02 01:54 UTC, Thomas Hellström
Details | Splinter Review

Description Vinson Lee 2011-07-01 11:53:06 UTC
mesa: b11566260778bb35f4f6e9dc9bc3470ee99b3557 (master)

glxinfo with softpipe hangs and never completes

$ make linux-x86-debug
$ LD_LIBRARY_PATH=lib/gallium glxinfo
name of display: :0.0
Comment 1 Vinson Lee 2011-07-01 12:00:22 UTC
git bisect good 992680c8b46d72cbc61888b8439d815bff42986c
Comment 2 Vinson Lee 2011-07-01 12:33:01 UTC
git bisect bad 5d2fad5444ebe0e2a66c49bd6254e2bc81618f6e
git bisect good 1a7e17e44a1129bbd6a0f454fe95b3ce8240cd45

In between the above commits the build is broken.


commit 5d2fad5444ebe0e2a66c49bd6254e2bc81618f6e
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Wed Jun 29 14:49:57 2011 +0200

    st/glx: Fix compilation error
    
    Fix compilation error due to commit
    "Rework how drawables are invalidated v3"
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

commit 19789e403ca3d0171d18f3c862738225902315e9
Author: Andre Maasikas <amaasikas@gmail.com>
Date:   Mon Jun 27 18:03:27 2011 +0300

    st/mesa: fix overwriting gl_format with pipe_format since 9d380f48
    
    fixes assert later on in texcompress2/r600g
    
    Signed-off-by: Brian Paul <brianp@vmware.com>

commit ade9f0d727092ca86f3896f733e085d9fd2bb8b2
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Tue Jun 28 14:07:51 2011 +0200

    st/dri: Get rid of the evil struct dri_drawable::context member
    
    It's incorrect to assume a single context bound to a drawable.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

commit ac8fdbc1c723afb19eeaba5457ba78d0bf33b8d4
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Wed Jun 29 09:00:23 2011 +0200

    st-api: Rework how drawables are invalidated v3.
    
    The api and the state tracker manager code as well as the state tracker code
    assumed that only a single context could be bound to a drawable. That is not
    a valid assumption, since multiple contexts can bind to the same drawable.
    
    Fix this by making it the state tracker's responsibility to update all
    contexts binding to a drawable
    
    Note that the state trackers themselves don't use atomic stamps on
    frame-buffers. Multiple context rendering to the same drawable should
    be protected by the application.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

commit 1a7e17e44a1129bbd6a0f454fe95b3ce8240cd45
Author: Stéphane Marchesin <marcheu@chromium.org>
Date:   Wed Jun 29 01:23:44 2011 -0700

    i915g: Fix unimplemented Abs comment.
Comment 3 Thomas Hellström 2011-07-01 14:34:38 UTC
Hmm.

This is caused by the glx state tracker manager validate() function actually invalidating the drawable while doing its work. Doesn't seem right to me, and we end up in an infinite loop, because the mesa state tracker will immediately call validate() again when it detects the invalid drawable....

I'll fix this up as soon as possible.
Comment 4 Thomas Hellström 2011-07-02 01:54:22 UTC
Created attachment 48681 [details] [review]
Quick fix for the issue

This patch fixes the issue on my side, but we can probably do a bit more to optimize these validations; see the patch comments. I'll add this to my (quite long) todo- list
Comment 5 Jose Fonseca 2011-07-06 10:52:48 UTC
The fix has been merged into main now.
Comment 6 Jose Fonseca 2011-07-06 10:53:09 UTC
(In reply to comment #5)
> The fix has been merged into main now.

I mean, the mesa master branch,
Comment 7 Vinson Lee 2011-07-07 00:11:51 UTC
mesa: 7a10976adb65010bec7952a80d1b43d62b3f8bb3 (master)

Verified that glxinfo no longer hangs.

There are piglit regressions that were likely introduced by ac8fdbc1c723afb19eeaba5457ba78d0bf33b8d4 that have not been fixed. See bug 38988.


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.