Bug 53076 - [bisected] OilRsh_x86 forced quit
Summary: [bisected] OilRsh_x86 forced quit
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high major
Assignee: Kenneth Graunke
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-03 02:19 UTC by libo
Modified: 2012-08-09 05:54 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description libo 2012-08-03 02:19:19 UTC
System Environment:
--------------------------
Libdrm:	(master)libdrm-2.4.37-20-gebd7904877d08525beb5039e4ea2f5b6c0a7c23f
Mesa:	(master)a488fdd3d97a6e9fa1ff8b8d22193551391170d3
Xserver:(master)xorg-server-1.12.99.903
Cairo:	(master)1e9abd6e4e5d857c5e7a117d4e960b222a5f5578
Libva:	(staging)f12f80371fb534e6bbf248586b3c17c298a31f4e
Kernel:	(drm-intel-next-queued) ab3951eb74e7c33a2f5b7b64d72e82f1eea61571
Bug detailed description:
---------------------------
It will be force quit when run OilRush, which caused by Mesa.This error is only happened on 32-bit OS.
I have bisected for it and find a8724d85f8cb2f0fb73b9c6c1f268f9084c6d473 is the first bad commit. 

commit a8724d85f8cb2f0fb73b9c6c1f268f9084c6d473
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Tue Jul 3 11:32:59 2012 -0700

    glx/dri2: Add support for GLX_ARB_create_context_robustness

    Add the infrastructure required for this extension.  There is no
    xserver support and no driver support yet.  Drivers can enable this be
    advertising DRI2 version 4 and accepting the
    __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flag and the
    __DRI_CTX_ATTRIB_RESET_STRATEGY attribute in create context.

Reproduce steps:
----------------------------
1.xinit&
2.gnome-session
3../launcher_x86.sh
Comment 1 Gordon Jin 2012-08-03 02:32:35 UTC
Ian, is this expected?
Comment 2 Ian Romanick 2012-08-03 03:40:48 UTC
I don't know what "force quit" means.  Does it crash?  Is there a backtrace?
Comment 3 Ian Romanick 2012-08-03 03:41:34 UTC
Ken, can you reproduce this?
Comment 4 libo 2012-08-03 05:10:11 UTC
When hit the the "run" button,the game will be shutdown with the follow error messages:
 GLRender::require_extension(): required extension GL_ARB_vertex_array_object is not supported
Shutdown

(In reply to comment #2)
> I don't know what "force quit" means.  Does it crash?  Is there a backtrace?
Comment 5 Kenneth Graunke 2012-08-03 12:51:35 UTC
I don't have a modern computer handy, but there's one really easy explanation for this: QA's mesa build is broken.

Evidence:
- "This error is only happened on 32-bit OS."
  This is almost always a red herring that means build fail.

- Missing GL_ARB_vertex_array_object extension.
  Indirect rendering doesn't support this extension, but direct rendering
  always does.  A bad build (or 32/64 mismatch) would lead to indirect rendering.

I have no other explanation for GL_ARB_vertex_array_object disappearing.  Also note that it's _not_ a GLX extension, which means it isn't a Unigine bug where they check extensions wrong.  It's basically impossible for them to screw that up.  It has to be indirect rendering.
Comment 6 Kenneth Graunke 2012-08-06 05:59:57 UTC
OilRush 1.11 is working just fine here.  Closing.
Comment 7 libo 2012-08-07 02:05:43 UTC
1.The bug still exists. When I reverted this commit,the game run well. 
2.The Oil-rush1.11 provides both 32-bit and 64-bit binaries for Linux. This bug can be reproduced when I run 32-bit binary with 32-bit OS.
3.The extension GL_ARB_vertex_array_object is supported when run glxinfo.
Comment 8 Kenneth Graunke 2012-08-07 04:32:55 UTC
Weird, but you're right, it hits an assertion failure with OilRush_x86 but works fine with the OilRush_x64.  They must be slightly different in how they initialize their GL contexts.  That's very odd...

This turns out to be the same issue I ran into while trying to apitrace the 64-bit version of Unigine Heaven.  I've verified that it's fixed by the following patch:

[PATCH] glx/dri: Initialize reset to __DRI_CTX_RESET_NO_NOTIFICATION.
http://lists.freedesktop.org/archives/mesa-dev/2012-August/025226.html

Sorry for the mistake.  I'll commit that soon.
Comment 9 Kenneth Graunke 2012-08-09 00:16:05 UTC
Fixed on master with:

commit 68bccc40f55aee7f4af8eb64b15a95f0b49d6a17
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Mon Aug 6 15:12:07 2012 -0700

    glx/dri: Initialize reset to __DRI_CTX_RESET_NO_NOTIFICATION.
    
    If the application has requested reset notification, then
    dri2_convert_glx_attribs will initialize this to the correct value.
    
    Otherwise, it's supposed to initialize this to NO_NOTIFICATION, but
    doesn't when num_attribs == 0.  (The consensus seems to be that we
    should make it do so, but that's more invasive, so I'm pushing this for
    now.)
    
    Fixes a regression since a8724d85f8cb2f0fb73b9c6c1f268f9084c6d473
    where trying to run OilRush_x86 or apitrace heaven_x64 would result in:
    
    dri_util.c:221: dri2CreateContextAttribs: Assertion `!"Should not get
    here."' failed.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53076
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Comment 10 libo 2012-08-09 05:54:46 UTC
It works well with Kenneth's commit. Verified.


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.