Bug 101323 - [nv20] glx-swap-event hangs X server
Summary: [nv20] glx-swap-event hangs X server
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/nouveau (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Nouveau Project
QA Contact: Nouveau Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-06 22:37 UTC by Ian Romanick
Modified: 2019-09-18 20:45 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Ian Romanick 2017-06-06 22:37:42 UTC
Running 'bin/glx-swap-event --async -auto' on at least NV20 hangs the X server.

Some dmesg info that *might* be related (during a full piglit run):

[ 3288.695639] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 16bc data 00000001
[ 3288.695674] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 0af0 data 00000000
[ 3288.695692] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 0af4 data 00000000
[ 3288.695711] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 0af8 data 4affffff
[ 3288.695728] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 0afc data 477fff00
[ 3288.695747] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000800 [STATE_INVALID] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 14f8 data ffffffff
[ 3288.695765] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000800 [STATE_INVALID] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 14fc data ffffffff
[ 3288.695783] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000800 [STATE_INVALID] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 147c data 00000000
[ 3288.695800] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 03f8 data 00000000
[ 3288.695817] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 03fc data 00000000
[ 3288.695864] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 16bc data 00000001
[ 3288.695882] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 0af0 data 00000000
[ 3288.695900] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 0af4 data 00000000
[ 3288.695918] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 0af8 data 4affffff
[ 3288.695935] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 0afc data 477fff00
[ 3288.695952] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000800 [STATE_INVALID] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 14f8 data ffffffff
[ 3288.695969] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000800 [STATE_INVALID] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 14fc data ffffffff
[ 3288.695986] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000800 [STATE_INVALID] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 147c data 00000000
[ 3288.696003] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 03f8 data 00000000
[ 3288.696052] nouveau 0000:04:00.0: gr: intr 00100000 [ERROR] nsource 00000040 [ILLEGAL_MTHD] nstatus 05000000 [INVALID_STATE PROTECTION_FAULT] ch 1 [Xorg[713]] subc 7 class 0096 mthd 03fc data 00000000

Backtrace of the X server process:

(gdb) bt
#0  0x00007f999b0d1787 in ioctl () from /lib64/libc.so.6
#1  0x00007f999c5d52e8 in drmIoctl () from /lib64/libdrm.so.2
#2  0x00007f999c5d7e6b in drmCommandWrite () from /lib64/libdrm.so.2
#3  0x00007f99979701f2 in nouveau_bo_wait () from /lib64/libdrm_nouveau.so.2
#4  0x00007f9997b812e2 in nouveau_dri2_copy_region2 () from /usr/lib64/xorg/modules/drivers/nouveau_drv.so
#5  0x000000000056ce6b in dri2_copy_region ()
#6  0x000000000056e19f in DRI2SwapBuffers ()
#7  0x000000000056f9ad in ProcDRI2Dispatch ()
#8  0x00000000004370f5 in Dispatch ()
#9  0x000000000043b078 in dix_main ()
#10 0x00007f999aff4401 in __libc_start_main () from /lib64/libc.so.6
#11 0x0000000000424d5a in _start ()

This is on Fedora 24.

xorg-x11-server-Xorg-1.19.3-1.fc25.x86_64
kernel-4.11.3-200.fc25.x86_64
xorg-x11-drv-nouveau-1.0.15-2.fc25.x86_64

I'm using Mesa master from the last couple days (commit 06f425192).
Comment 1 Ilia Mirkin 2017-06-06 22:44:58 UTC
A few things you may be interested in:

(a) The pid always comes back as Xorg, since that's who opens the FD, even in a dri3 scenario. Only time that it's the real application is when you're using DRI3 *and* running on a secondary GPU.

(b) Hangs in nouveau_bo_wait indicate that the GPU hung. Basically it's an ioctl that stalls until a fence is hit (the command for writing the fence is sent by the kernel on command submission). If it never returns, that means the fence is never hit. [Or there's a bug in our fence logic... I wonder if there's some sort of 32-bit wraparound sadness in there which is helped by piglit.]

Since you have a reproducible hang, might want to check dmesg *before* running the test, and then seeing what happens.

FWIW I always run piglit with "-x glx" -- that stuff never ends well on any generation with nouveau, and I've never had the desire to investigate it.
Comment 2 GitLab Migration User 2019-09-18 20:45:21 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/1134.


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.