Bug 55829 - [Bisected]Smokin-guns crash when change resolution without window manager
[Bisected]Smokin-guns crash when change resolution without window manager
Status: VERIFIED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965
git
x86 (IA32) Linux (All)
: high critical
Assigned To: Ian Romanick
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-10 09:21 UTC by meng
Modified: 2013-05-23 02:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log (28.98 KB, text/plain)
2012-10-10 09:22 UTC, meng
Details
backtrace of xonotic (1.32 KB, text/plain)
2012-10-16 03:10 UTC, meng
Details
Xorg.0.log of xonotic (28.79 KB, text/plain)
2012-10-16 03:11 UTC, meng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description meng 2012-10-10 09:21:58 UTC
System Environment:       
--------------------------
Platform: IVB,Piketon
Libdrm:	(master)libdrm-2.4.39-18-g844d75e5a0b3b8f3466a24256955e886275fb298
Mesa:	(master)87a34131c427b40a561cfef1513b446a0eeabc39
Xserver:(master)xorg-server-1.13.0-51-g4b7f00346daed20c96f3e8ea13ae411858a5424b
Xf86_video_intel:(master)2.20.9-47-gd73f5b5bb1a81421f1fdc3ac3b460a8ad90be0ad
Kernel:	(drm-intel-nightly) 4517f84e2981dddf4715997767c252a16579364b

Bug detailed description:
-----------------------------
Smokin-guns crash when change resolution on IVB and Piketon.
It's libdrm regression, the good commit is 2.4.31.

Reproduce steps:
----------------------------
1, xinit&
2, ./smokinguns.x86_64
3, change resolution(Settings/System/Video Mode)
Comment 1 meng 2012-10-10 09:22:26 UTC
Created attachment 68393 [details]
Xorg.0.log
Comment 2 Chris Wilson 2012-10-10 09:53:07 UTC
Maybe a bt from smokinguns as it crashes?
Comment 3 meng 2012-10-11 01:06:06 UTC
bt
-----------------------------
#0  0x00007fffe66d280b in ?? ()
#1  0x0000000000000003 in ?? ()
#2  0x00000000023995e0 in ?? ()
#3  0x000000000278f2f0 in ?? ()
#4  0x0000000000000000 in ?? ()
Comment 4 meng 2012-10-11 01:47:13 UTC
The problem also exists on most 3D games such as gl-117, warsow,Extreme TuxRacer,padman.
Comment 5 meng 2012-10-16 03:09:48 UTC
Xonotic (xonotic-linux64-sdl) can also repoduce this problem with above version. Pls see Xorg.0.log and bt of xonotic.
Comment 6 meng 2012-10-16 03:10:24 UTC
Created attachment 68594 [details]
backtrace of xonotic
Comment 7 meng 2012-10-16 03:11:32 UTC
Created attachment 68595 [details]
Xorg.0.log of xonotic
Comment 8 meng 2012-10-23 03:07:58 UTC
It's not libdrm regression. 
It's xf86_video_intel regression, and bisected show that xf86_video_intel
1675f441049d559d891fe378e437c12db21df9e7 is the first bad commit.

commit 1675f441049d559d891fe378e437c12db21df9e7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 6 12:55:13 2012 +0100
    uxa/dri: Transfer reference of the new_back buffer to the flip_chain
Comment 9 Chris Wilson 2012-10-23 08:22:37 UTC
In which case all the attached information is bogus as none of it details any crash.
Comment 10 meng 2012-10-24 01:46:57 UTC
When run Xonotic(xonotic-linux64-sdl), it will be "Segmentation fault" and resolution changed.

(gdb)run log
--------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.
gen7_update_renderbuffer_surface (brw=0x2b8adf0, rb=0x2d92110, unit=0) at gen7_wm_surface_state.c:471
471        struct intel_region *region = irb->mt->region;

(gdb) bt
---------------------------------------------------
#0  gen7_update_renderbuffer_surface (brw=0x2b8adf0, rb=0x2d92110, unit=0) at gen7_wm_surface_state.c:471
#1  0x00007fffeef50fb0 in brw_update_renderbuffer_surfaces (brw=0x2b8adf0) at brw_wm_surface_state.c:1205
#2  0x00007fffeef3a442 in brw_upload_state (brw=0x2b8adf0) at brw_state_upload.c:498
#3  0x00007fffeef274a7 in brw_try_draw_prims (max_index=<optimized out>, min_index=<optimized out>, ib=0x7fffffffd7d8, nr_prims=45711736, prim=0x7fffffffd7c0, arrays=<optimized out>,
    ctx=0x2b8adf0) at brw_draw.c:493
#4  brw_draw_prims (ctx=0x2b8adf0, prim=0x7fffffffd7c0, nr_prims=45711736, ib=0x7fffffffd7d8, index_bounds_valid=<optimized out>, min_index=0, max_index=3, tfb_vertcount=0x0) at brw_draw.c:589
#5  0x00007fffeea9e3f9 in vbo_draw_arrays (ctx=0x2b8adf0, mode=6, start=0, count=<optimized out>, numInstances=1, baseInstance=<optimized out>) at ../../../src/mesa/vbo/vbo_exec_array.c:645
#6  0x00007fffeeb4655f in _mesa_meta_glsl_Clear (ctx=0x2b8adf0, buffers=<optimized out>) at ../../../src/mesa/drivers/common/meta.c:2081
#7  0x00007fffeef1aee3 in brw_clear (mask=0, ctx=0x2b8adf0) at brw_clear.c:239
#8  brw_clear (ctx=0x2b8adf0, mask=<optimized out>) at brw_clear.c:208
#9  0x00000000004db1a6 in GL_Clear ()
#10 0x0000000000468a2a in CL_UpdateScreen ()
#11 0x00000000005282b9 in Host_Main ()
#12 0x00000000004047a4 in main ()
Comment 11 meng 2012-10-26 02:55:53 UTC
The problem also exists on SandyBridge.
Comment 12 Gordon Jin 2012-11-14 05:35:09 UTC
Ian, can you reproduce this? It impacts many apps.
Comment 13 Gordon Jin 2012-12-06 05:23:56 UTC
ping Ian
Comment 14 ye.tian 2013-02-21 02:02:45 UTC
This problem still exists on environment.
----------------------------
Kernel_version:     3.8
Libdrm:             2.4.42
Mesa:               (9.1)9.1-rc2
Xserver:            (server-1.13-branch)xorg-server-1.13.2
Xf86_video_intel:   (master)2.21.0
Cairo:              (master)1.12.12
Libva:              staging-20130205
Libva_intel_driver: staging-20130205
Comment 15 Ian Romanick 2013-02-23 01:23:56 UTC
(In reply to comment #12)
> Ian, can you reproduce this? It impacts many apps.

As far as I know, nobody in the US team has ever been able to reproduce any of these failures.
Comment 16 Gordon Jin 2013-02-24 05:43:25 UTC
Chris, can you reproduce this? Do you think below xf86-video-intel commit may impact it?

commit 1675f441049d559d891fe378e437c12db21df9e7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Jun 6 12:55:13 2012 +0100
    uxa/dri: Transfer reference of the new_back buffer to the flip_chain
Comment 17 Chris Wilson 2013-02-24 09:05:54 UTC
No, that change in the server will not affect a correctly working client as it holds independent references to the objects. It appears the client is chasing a dangling pointer following the drawable resize.
Comment 18 meng 2013-02-28 09:36:16 UTC
The problem only exists on xinit(start X from test mode), but it works well on gnome-session.
Test the Xf86_video_intel:(master)2.21.3-47-ga0a2faefdef, the problem can be reproduced.
But if git revert above patch, it'll be fixed. Test games such as gl-117,smokin-guns,padman.
Comment 19 meng 2013-05-23 02:35:01 UTC
Verified it with the driver.
---------------------
Libdrm:	(master)libdrm-2.4.45-3-g3586337f3703ce4833a375f66b08df064a1cec28
Mesa:	(master)08f87ac333512a77a2701268dd98ef4274c34832
Xserver:	(master)xorg-server-1.14.99.1-82-g7e97166c4fc38076b6224e4
Xf86_video_intel:(master)2.21.7-3-gabe85adda51c58d3f3b9c5dea6cec4b13a65cdcd
Cairo:	(master)631bf299256e11a17511977f357e0353fb5615f7
Libva:	(staging)cc403954c93be77cb514c9d3836263f7d514a4f2
Kernel:	(drm-intel-nightly) 86fccb424de5c6739e2edb4653f5823e3954b74b