Bug 38970 - [bisected]piglit glx/glx-pixmap-multi failed
Summary: [bisected]piglit glx/glx-pixmap-multi failed
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-05 03:20 UTC by fangxun
Modified: 2019-09-18 17:43 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description fangxun 2011-07-05 03:20:56 UTC
System Environment:
--------------------------
Arch:        i386
Platform:    huronriver 
Libdrm:     (master)2.4.26
Mesa:      (master)a221807dc5d69598afd1d0e0a4e715fb82a9f30d
Xserver:    (master)xorg-server-1.10.2.902
Xf86_video_intel: (master)2.15.0-163-g98f2e3855d70c02b05e2721a70ebce0c17e44283 
Kernel: (drm-intel-fixes)2b1ecb7337592a7bf0989efac46a5b52daab769e

Bug detailed description:
-------------------------
This regression happens on pineview, ironlake and sandybridge. Bisect find commit 4833104718677caad0027d5e7539ca9bba389392 is the first bad commit.
commit 4833104718677caad0027d5e7539ca9bba389392
Author:     Adam Jackson <ajax@redhat.com>
AuthorDate: Thu Mar 31 20:43:57 2011 +0000
Commit:     Adam Jackson <ajax@redhat.com>
CommitDate: Wed Jun 29 14:07:19 2011 -0400

    glx: Verify that drawable creation on the client side actually worked

    ... and clean up if it didn't.

   Signed-off-by: Adam Jackson <ajax@redhat.com>


Reproduce steps:
----------------
1. xinit&
2. ./glx-pixmap-multi -auto
Comment 1 Ian Romanick 2011-07-05 10:06:25 UTC
This seems unlikely to have anything to do with the i965 or i915 driver.  Reassigning to Adam and the GLX component.
Comment 2 Ian Romanick 2011-07-06 15:39:06 UTC
I'll also point out that not only does the test fail, but it kills the xserver.  This is with:

xorg-x11-server-Xorg-1.9.5-1.fc14.x86_64
xorg-x11-drv-intel-2.12.0-6.fc14.1.x86_64
Comment 3 fangxun 2011-07-07 18:41:31 UTC
This regression only happens on mesa master branch.
Comment 4 Gordon Jin 2011-07-18 20:04:02 UTC
Ajax, any idea?
Comment 5 Gordon Jin 2011-08-28 20:39:28 UTC
ajax, could you respond?
Comment 6 Ian Romanick 2011-08-29 17:31:35 UTC
This works on recent X servers.  I believe that there were some bugs with pixmap tracking on the X server that were fixed around the same time this patch went it.  Unless there is some compelling reason to do otherwise, we should consider this patch as being correct but tickling a latent bug elsewhere.  My inclination is to close as WONTFIX.
Comment 7 Gordon Jin 2011-08-29 17:57:58 UTC
Ian, thanks for the reply. I agree we can close it if it works with recent xserver.

Xun, please verify.
Comment 8 fangxun 2011-08-30 02:51:35 UTC
It still fails with recent codes.
Libdrm:         (master)2.4.26-3-g2acaf160df584a5ef7b5c5b84819389948cd97ad
Mesa:           (master)efb4872a9d6e3aa6b02f6bc7426b311ae816e20d
Xserver:        (master)xorg-server-1.11.0
Xf86_video_intel:(master)2.16.0-10-g786a770f528a0daee2971494352672cb89f48384
Comment 9 Ian Romanick 2011-08-30 10:09:33 UTC
That is weird.  I was able to reproduce this on Fedora 14 but not on Fedora 15.  In both cases I was using the same Mesa bits.

Fedora 14:

xorg-x11-drv-intel-2.12.0-6.fc14.1.x86_64
xorg-x11-server-Xorg-1.9.5-1.fc14.x86_64
kernel-3.0.0-1.fc16.x86_64

Fedora 15:

xorg-x11-drv-intel-2.15.0-5.fc15.x86_64
xorg-x11-server-Xorg-1.10.3-1.fc15.x86_64
kernel-3.0.0-1.fc16.x86_64

Talking to other folks on the team, nobody else can reproduce this crash either.  It must be related to some other component, but I'm not sure which.
Comment 10 Tobias Droste 2011-08-30 10:56:32 UTC
I can confirm the bug with r600g (no crashes but it fails the test)!

HEAD is now at 9e2bc5d... glx: Alias glXFreeContextEXT to glXDestroyContext
...
failed to create pixmap
failed to create drawable
PIGLIT: {'result': 'pass' }



HEAD is now at 4833104... glx: Verify that drawable creation on the client side actually worked
...
failed to create pixmap
failed to create drawable
PIGLIT: {'result': 'fail' }


and still the same with todays master


xserver: 1.11.0
drm: current git master
kernel: 3.1-rc2
Comment 11 zhao jian 2011-08-30 19:09:39 UTC
Xun, maybe you can have a test with the newest commit and xorg-server-1.10.3 commit of xserver on server-1.10-branch.
Comment 12 fangxun 2011-08-31 01:01:17 UTC
(In reply to comment #11)
> Xun, maybe you can have a test with the newest commit and xorg-server-1.10.3
> commit of xserver on server-1.10-branch.

It also fails on xorg-server-1.10.3 commit with mesa master branch. From my testing, this case fails on mesa master branch, whether xserver master or server-1.10-branch.
Comment 13 Gordon Jin 2011-09-19 20:22:18 UTC
ajax/Ian, any idea?
Comment 14 Adam Jackson 2011-11-01 14:43:47 UTC
(In reply to comment #13)
> ajax/Ian, any idea?

Pretty sure the test is correct and Mesa is wrong.  You simply happen to have found the change that turned a bogus pass into a deserved failure.
Comment 15 fangxun 2012-01-19 22:12:51 UTC
It also happens on mesa 8.0 branch.
Comment 16 Ian Romanick 2012-01-26 17:22:05 UTC
The test fails because the second glXCreateGLXPixmap or glXCreatePixmap tries to add the same drawable ID to priv->drawHash.  The call fails because the key already exists.
Comment 17 Ian Romanick 2012-02-01 08:01:29 UTC
I'm going to remove this from the blocker list.  Some further analysis suggests that Adam is correct.  The test was generating a pass result, but the underlying functionality was not working.  I'd argue, therefore, that this is not a regression.  In some sense this situation is better:  the user gets an error instead of some garbage that won't work.
Comment 18 Adam Jackson 2012-07-19 22:37:00 UTC
I'm not working on this issue, reassigning back to Intel.
Comment 19 Rahul 2016-09-02 14:18:05 UTC
Hi All,
Do we have any update over this ?

what should be the expected behavior if we make multiple glXCreateGLXPixmap with same parameters?

As Ian Told ,
it is failing because key is already in the hash table.

I am not pretty sure , But if we can add some other condition check with __glxHashInsert(pdp->dri2Hash, xDrawable, pdraw) for if the key already exist.

Then might we can avoid this fail. 

Thanks,
Rahul
Comment 20 Rahul 2016-09-02 14:33:28 UTC
I tried locally:
and changed condition saying if Bad Magic or Error
if (__glxHashInsert(pdp->dri2Hash, xDrawable, pdraw) == -1)

then the test Passed.
Comment 21 GitLab Migration User 2019-09-18 17:43:52 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/78.


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.