Bug 45880

Summary: Xorg crash with ColorTiling2D patch (r600g)
Product: Mesa Reporter: lsching17
Component: Drivers/Gallium/r600Assignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: log and config
crash log after fix applied

Description lsching17 2012-02-10 03:20:14 UTC
Created attachment 56856 [details]
log and config

linux kernel 3.3-rc3
amd 6950

Following the instruction at http://lists.freedesktop.org/archives/mesa-dev/2012-February/018658.html

patch applied to kernel 3.3-rc3 and compiled

Xorg crash when glxgears,, message shown:

Feb 10 08:12:44 earth kernel: [ 56.602042] BUG: unable to handle kernel paging request at ffffc90007986900
Feb 10 08:12:44 earth kernel: [ 56.602064] IP: [<ffffffff812b1aab>] memcpy+0xb/0x120
Feb 10 08:12:44 earth kernel: [ 56.602080] PGD 42e80f067 PUD 42e820067 PMD 42750d067 PTE 0
Feb 10 08:12:44 earth kernel: [ 56.602097] Oops: 0002 [#1] PREEMPT SMP
Feb 10 08:12:44 earth kernel: [ 56.602117] CPU 1
Feb 10 08:12:44 earth kernel: [ 56.602123] Modules linked in:
Feb 10 08:12:44 earth kernel: [ 56.602131]
Feb 10 08:12:44 earth kernel: [ 56.602136] Pid: 1102, comm: Xorg Not tainted 3.3.0-rc3-custom2 #1 System manufacturer System Product Name/P8Z68-V LE
Feb 10 08:12:44 earth kernel: [ 56.602162] RIP: 0010:[<ffffffff812b1aab>] [<ffffffff812b1aab>] memcpy+0xb/0x120
Feb 10 08:12:44 earth kernel: [ 56.602187] RSP: 0018:ffff8804261c7b30 EFLAGS: 00010202
Feb 10 08:12:44 earth kernel: [ 56.602199] RAX: ffffc90007986900 RBX: ffff880428dce680 RCX: 00000000000000eb
Feb 10 08:12:44 earth kernel: [ 56.602214] RDX: 0000000000000004 RSI: ffff880425c5c000 RDI: ffffc90007986900
Feb 10 08:12:44 earth kernel: [ 56.602229] RBP: ffff8804261c7b88 R08: 0000000000000000 R09: ffff88041193a800
Feb 10 08:12:44 earth kernel: [ 56.602244] R10: ffff88042e84ee28 R11: ffff88042e84edf8 R12: ffff8804261c7cc8
Feb 10 08:12:44 earth kernel: [ 56.602259] R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000
Feb 10 08:12:44 earth kernel: [ 56.602274] FS: 00007fb4d86d88a0(0000) GS:ffff88043f440000(0000) knlGS:0000000000000000
Feb 10 08:12:44 earth kernel: [ 56.602291] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Feb 10 08:12:44 earth kernel: [ 56.602304] CR2: ffffc90007986900 CR3: 0000000425e88000 CR4: 00000000000406e0
Feb 10 08:12:44 earth kernel: [ 56.602319] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Feb 10 08:12:44 earth kernel: [ 56.602334] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Feb 10 08:12:44 earth kernel: [ 56.602349] Process Xorg (pid: 1102, threadinfo ffff8804261c6000, task ffff8804259f4440)
Feb 10 08:12:44 earth kernel: [ 56.602366] Stack:
Feb 10 08:12:44 earth kernel: [ 56.602371] ffffffff813dc02b ffff880428dbc720 0000000000000003 000000000000075c
Feb 10 08:12:44 earth kernel: [ 56.602390] 0000000000000001 0000000000003286 ffff880428dce680 ffff8804261c7cc8
Feb 10 08:12:44 earth kernel: [ 56.602409] 0000000000000000 ffff88042e84f578 00000000fffffff4 ffff8804261c7bb8
Feb 10 08:12:44 earth kernel: [ 56.602428] Call Trace:
Feb 10 08:12:44 earth kernel: [ 56.602436] [<ffffffff813dc02b>] ? radeon_cs_update_pages+0xfb/0x130
Feb 10 08:12:44 earth kernel: [ 56.602452] [<ffffffff813d9883>] radeon_get_ib_value+0x53/0xd0
Feb 10 08:12:44 earth kernel: [ 56.602465] [<ffffffff8140f543>] evergreen_cs_packet_parse+0x43/0x160
Feb 10 08:12:44 earth kernel: [ 56.602480] [<ffffffff814131ae>] evergreen_cs_parse+0x2e/0x710
Feb 10 08:12:44 earth kernel: [ 56.602494] [<ffffffff813d9b95>] ? radeon_ib_get+0x1b5/0x2f0
Feb 10 08:12:44 earth kernel: [ 56.602506] [<ffffffff813dbd80>] radeon_cs_ioctl+0x350/0x500
Feb 10 08:12:44 earth kernel: [ 56.602520] [<ffffffff8137a4b4>] drm_ioctl+0x434/0x500
Feb 10 08:12:44 earth kernel: [ 56.602532] [<ffffffff813dba30>] ? radeon_cs_finish_pages+0xb0/0xb0
Feb 10 08:12:44 earth kernel: [ 56.602547] [<ffffffff817adfac>] ? do_page_fault+0x2ac/0x520
Feb 10 08:12:44 earth kernel: [ 56.602561] [<ffffffff81137f5e>] do_vfs_ioctl+0x8e/0x500
Feb 10 08:12:44 earth kernel: [ 56.602574] [<ffffffff810fd3ec>] ? sys_mmap_pgoff+0xdc/0x220
Feb 10 08:12:44 earth kernel: [ 56.602587] [<ffffffff81138461>] sys_ioctl+0x91/0xa0
Feb 10 08:12:44 earth kernel: [ 56.602599] [<ffffffff817b0622>] system_call_fastpath+0x16/0x1b
Feb 10 08:12:44 earth kernel: [ 56.602612] Code: 43 4e 48 83 c4 08 5b 5d c3 0f 1f 80 00 00 00 00 e8 8b fb ff ff eb e1 90 90 90 90 90 90 90 90 90 48 89 f8 89 d1 c1 e9 03 83 e2 07 <f3> 48 a5 89 d1 f3 a4 c3 20 48 83 ea 20 4c 8b 06 4c 8b 4e 08 4c
Feb 10 08:12:44 earth kernel: [ 56.602722] RIP [<ffffffff812b1aab>] memcpy+0xb/0x120
Feb 10 08:12:44 earth kernel: [ 56.602735] RSP <ffff8804261c7b30>
Feb 10 08:12:44 earth kernel: [ 56.602743] CR2: ffffc90007986900
Feb 10 08:12:44 earth kernel: [ 56.608340] ---[ end trace 284d340da3940897 ]---
Comment 1 Andre Maasikas 2012-02-10 09:11:37 UTC
Looks like a similar issue, if you could verify a workaround:

in mesa, src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
change all assignments of r600_virtual_address to FALSE
ws->info.r600_virtual_address = FALSE;
Comment 2 lsching17 2012-02-11 16:37:42 UTC
The workaround work ok
Comment 3 Jerome Glisse 2012-02-14 12:54:39 UTC
I pushed a fix please confirm that it also works for you
Comment 4 lsching17 2012-02-15 14:14:36 UTC
The patch partially work.

glxgears now work ok, but vmware (with 3d acceleration) cause Xorg crashed. (file "kern2.log" attached)
Comment 5 lsching17 2012-02-15 14:15:18 UTC
Created attachment 57121 [details]
crash log after fix applied
Comment 6 Jerome Glisse 2012-02-21 12:02:47 UTC
cayman fix pushed to mesa which should be enough on its own, kernel fix is in the pipe
Comment 7 lsching17 2012-02-21 15:52:03 UTC
(In reply to comment #6)
> cayman fix pushed to mesa which should be enough on its own, kernel fix is in
> the pipe

sorry for my bad english, what is the meaning of "in the pipe"?
Comment 8 lsching17 2012-02-22 04:51:39 UTC
(In reply to comment #6)
> cayman fix pushed to mesa which should be enough on its own, kernel fix is in
> the pipe

The mesa patch is ok.

Do you want me to test the kernel fix too? If it is simply to apply, i can help.
Comment 9 Jerome Glisse 2012-02-22 09:48:02 UTC
No need to test the kernel patch. The kernel patch is just to fix the segfault issue in casse of lockup. The mesa patch is enough on its own for your issue.

Closing

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.