Bug 61536

Summary: [SNB/IVB regression]Oglc ubo-usage(advanced.vbo_as_ubo)_ctx31 segfault
Product: Mesa Reporter: lu hua <huax.lu>
Component: Drivers/DRI/i965Assignee: Ian Romanick <idr>
Status: CLOSED NOTOURBUG QA Contact:
Severity: major    
Priority: high CC: xunx.fang
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description lu hua 2013-02-27 01:57:05 UTC
System Environment:
--------------------------
Arch:             x86_64
Platform:         Ivybridge
Libdrm:		(master)libdrm-2.4.42-4-g41fc2cc8a98a8d02ea7d3635d3103f7dd371de10
Mesa:		(master)0486d503209cf375ae77456336742774b12eda02
Xserver:(master)xorg-server-1.13.99.902-5-g90642948cc78834d95f7a3bddaac7ff77b68ed7e
Xf86_video_intel:(master)2.21.3-14-ga19da0ea517127052ae49cdd6441e8b6077ca523
Cairo:		(master)7658eced9a45f42033c2b0b45cee70f6edb6ff20
Libva:		(staging)8abb2b3dc9b122272d1e26a90cbf68f76d3aba8a
Libva_intel_driver:(staging)b3139d1a278d9daac40987f0a99c2a797c0db988
Kernel:	(drm-intel-nightly) 15caa9b2bad16e0d4bf8c203dcc8325b1894ad09

Bug detailed description:
-------------------------
It fails on sandybridge andivybridge with mesa master branch, It doesn't happen on 9.0 branch.

Bisect shows:
The first bad commit could be any of:
32f322925592e9eeda6a5624c7320232fc170c03
514f8c7ec7cc1ab18be93cebb5b9bf970b1955a9
f09d77b2af0e6e7553a1e2efca2f12fe2e4dcea8
22233da1ee4b59663966169759960c00c033d0e9

output:
Intel OpenGL Conformance Test
Version ENG (Feb 25 2013 14:48:34)

CLI options echo:
oglconform -ctx 3.1 -suite all -v 2 -test ubo-usage advanced.vbo_as_ubo

Window will be recreated 12 times.
  Window 0 will run 1 testcases on config with id 131.
  Window 1 will run 1 testcases on config with id 127.
  Window 2 will run 1 testcases on config with id 109.
  Window 3 will run 1 testcases on config with id 105.
  Window 4 will run 1 testcases on config with id 132.
  Window 5 will run 1 testcases on config with id 110.
  Window 6 will run 1 testcases on config with id 125.
  Window 7 will run 1 testcases on config with id 103.
  Window 8 will run 1 testcases on config with id 128.
  Window 9 will run 1 testcases on config with id 106.
  Window 10 will run 1 testcases on config with id 126.
  Window 11 will run 1 testcases on config with id 104.
Total of 12 testcases will be executed.

Setup Report.
    Verbose level = 2.
    Path inactive.

Visual Report for ID 131 (32 bits).
ID      |ACCELERA|DB      |REND_T  |SURF_T  |C_BUF_T |BUF_S   |RED_S   |
     131|       1|       1|      gl|  wipbpx|    rgba|      32|       8|

GREEN_S |BLUE_S  |ALPHA_S |DEPTH_S |STENC_S |ACCUM_S |SPL_BUF |SAMPLES |
       8|       8|       8|      24|       8|       0|       0|       0|

SRGB    |TEX_RGB |TEX_RGBA|CAVEAT  |SWAP    |M_PBUF_W|M_PBUF_H|M_PBUF_P
       0|       0|       0|    none|   undef|       0|       0|       0

OpenGL Report.
    Vendor - 'Intel Open Source Technology Center'
    Renderer - 'Mesa DRI Intel(R) Ivybridge Desktop '
    Version - '3.1 (Core Profile) Mesa 9.2-devel (git-0486d50)' (3.1)
    GLSL Version - '1.40'
    Context Flags - None

>> Uniform Buffer Object - usage (ubo-usage)  test:
--> 2.3 - advanced.vbo_as_ubo subcase:
Segmentation fault (core dumped)

(gdb) bt
#0  0x000000000126c908 in (anonymous namespace)::ADVANCED_VBO_AS_UBO::exec() ()
#1  0x0000000001268ca6 in UBOUsageExec(testParameters*) ()
#2  0x0000000001834929 in callFunctionHandleExceptionsInner(long (*)(testParameters*), testParameters*, char*) ()
#3  0x0000000001834a7f in callFunctionHandleExceptions(long (*)(testParameters*), testParameters*) ()
#4  0x0000000001833711 in DriverExec(long (*)(testParameters*), testParameters*) ()
#5  0x000000000176a255 in Driver(std::vector<std::pair<std::string, std::string>, std::allocator<std::pair<std::string, std::string> > > const&, std::vector<driverRec*, std::allocator<driverRec*> > const&, std::vector<boost::shared_ptr<PrePostTestAction>, std::allocator<boost::shared_ptr<PrePostTestAction> > > const&, std::vector<boost::shared_ptr<PrePostTestcaseAction>, std::allocator<boost::shared_ptr<PrePostTestcaseAction> > > const&) ()
#6  0x000000000176ad08 in (anonymous namespace)::MyMessagePump::idle() ()
#7  0x000000000173c5c0 in MessagePump::process_messages() ()
#8  0x0000000001769314 in ExecutionManager::execute_schedules() ()
#9  0x0000000001708eef in tkShellExecute(std::vector<std::pair<std::string, std::string>, std::allocator<std::pair<std::string, std::string> > > const&, std::vector<std::pair<std::string, std::string>, std::allocator<std::pair<std::string, std::string> > > const&) ()
#10 0x0000000000428795 in main ()

Reproduce steps:
----------------
1. xinit
2. ./oglconform -ctx 3.1 -suite all -v 2 -test ubo-usage advanced.vbo_as_ubo
Comment 1 Eric Anholt 2013-03-11 22:53:45 UTC
oglconform is broken.  We are correctly dead code eliminating the unused uniform, and they are asking for both, getting an error, then blindly continuing using uninitialized data and segfaulting.

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.