virgl avocado hang
Hi Mark,
Quoted 7 lines
(quoted diff) +4
-0+ def test_virtio_vga_virgl(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=device:virtio-vga
Review
Quoted 10 lines
(quoted diff) +5
-0+ """ + kernel_command_line = ( + self.KERNEL_COMMON_COMMAND_LINE + "console=ttyS0 rdinit=/bin/bash" + ) + # FIXME: should check presence of virtio, virgl etc
This little nugget really must be fixed.
The observed behaviour is an indefinite hang in avocado, waiting for qemu, which is in zombie state. A manual kill -INT to the parent wakes it up like so:
(159/184) tests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl: CANCEL: VirGL
not enabled? (1264.25 s)
r~
Hi
Quoted 24 lines · Richard Henderson
Hi Mark,
Review
Quoted 13 lines
(quoted diff) +7
-0+ def test_virtio_vga_virgl(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=device:virtio-vga + """ + kernel_command_line = ( + self.KERNEL_COMMON_COMMAND_LINE + "console=ttyS0rdinit=/bin/bash"
Review
Quoted 3 lines
(quoted diff) +2
-0+ ) + # FIXME: should check presence of virtio, virgl etcThis little nugget really must be fixed.
Quoted 10 lines
The observed behaviour is an indefinite hang in avocado, waiting for qemu, which is in
zombie state. A manual kill -INT to the parent wakes it up like so:(159/184)
tests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl: CANCEL:
VirGL
not enabled? (1264.25 s)
Could you describe how to reproduce? I naively --disable-virglrenderer and I get:
$ tests/venv/bin/avocado run tests/avocado/virtio-gpu.py Fetching asset from tests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl Fetching asset from tests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl Fetching asset from tests/avocado/virtio-gpu.py:VirtioGPUx86.test_vhost_user_vga_virgl Fetching asset from tests/avocado/virtio-gpu.py:VirtioGPUx86.test_vhost_user_vga_virgl JOB ID : d9c5b65777777564d1d926fdfb58deaf0e967d15 JOB LOG : /home/elmarco/avocado/job-results/job-2022-06-27T12.56-d9c5b65/job.log (1/2) tests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl: CANCEL: VirGL not enabled? (0.08 s) (2/2) tests/avocado/virtio-gpu.py:VirtioGPUx86.test_vhost_user_vga_virgl: CANCEL: Could not find vhost-user-gpu (0.02 s) RESULTS : PASS 0 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 2 JOB TIME : 0.56 s
Signature · 1 line
Marc-André Lureau
Quoted 15 lines · Marc-André Lureau
Could you describe how to reproduce? I naively --disable-virglrenderer and I get:
$ tests/venv/bin/avocado run tests/avocado/virtio-gpu.py Fetching asset from tests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl Fetching asset from tests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl Fetching asset from tests/avocado/virtio-gpu.py:VirtioGPUx86.test_vhost_user_vga_virgl Fetching asset from tests/avocado/virtio-gpu.py:VirtioGPUx86.test_vhost_user_vga_virgl JOB ID : d9c5b65777777564d1d926fdfb58deaf0e967d15 JOB LOG : /home/elmarco/avocado/job-results/job-2022-06-27T12.56-d9c5b65/job.log (1/2) tests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl: CANCEL: VirGL not enabled? (0.08 s) (2/2) tests/avocado/virtio-gpu.py:VirtioGPUx86.test_vhost_user_vga_virgl: CANCEL: Could not find vhost-user-gpu (0.02 s) RESULTS : PASS 0 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 2 JOB TIME : 0.56 s
Ah, I beg your pardon -- virglrenderer is *not* disabled, I merely assumed it was. But the effect is still there -- dead qemu not reaped, indefinite hang on the driver.
The end of the log is:
Quoted 3 lines
2022-06-27 17:32:19,746 stacktrace L0045 ERROR| Command: ./qemu-system-x86_64 -display none -vga none -chardev socket,id=mon,path=/var/tmp/avo_qemu_sock_4j1r4bdf/qemu-245052-7f2a8c8a3bb0-monitor.sock -mon chardev=mon,mode=control -chardev socket,id=console,path=/var/tmp/avo_qemu_sock_4j1r4bdf/qemu-245052-7f2a8c8a3bb0-console.sock,server=on,wait=off -serial chardev:console -cpu host -m 2G -machine pc,accel=kvm -device virtio-vga-gl -display egl-headless -kernel /home/rth/avocado/data/cache/by_location/892ae21f3ae7d04994d81e1c0bf204ecebe555bb/vmlinuz -initrd /home/rth/avocado/data/cache/by_location/892ae21f3ae7d04994d81e1c0bf204ecebe555bb/initrd.img -append printk.time=0 console=ttyS0 rdinit=/bin/bash2022-06-27 17:32:19,746 stacktrace L0045 ERROR| Output: qemu-system-x86_64: -display egl-headless: Parameter 'type' does not accept value 'egl-headless'
if that helps.
r~
Hi
Quoted 46 lines · Richard Henderson
Quoted 1 line · Marc-André Lureau
Could you describe how to reproduce? I naively --disable-virglrenderer
and I get:
Quoted 3 lines
$ tests/venv/bin/avocado run tests/avocado/virtio-gpu.py Fetching asset fromtests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl
Quoted 1 line
Fetching asset from
tests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl
Quoted 1 line
Fetching asset from
tests/avocado/virtio-gpu.py:VirtioGPUx86.test_vhost_user_vga_virgl
Quoted 1 line
Fetching asset from
tests/avocado/virtio-gpu.py:VirtioGPUx86.test_vhost_user_vga_virgl
Quoted 2 lines
JOB ID :
d9c5b65777777564d1d926fdfb58deaf0e967d15
JOB LOG :
/home/elmarco/avocado/job-results/job-2022-06-27T12.56-d9c5b65/job.logQuoted 1 line
(1/2) tests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl:
CANCEL: VirGL not
Quoted 2 lines
enabled? (0.08 s)
(2/2)tests/avocado/virtio-gpu.py:VirtioGPUx86.test_vhost_user_vga_virgl: CANCEL:
CouldQuoted 2 lines
not find vhost-user-gpu (0.02 s)
RESULTS : PASS 0 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 |CANCEL 2
Quoted 1 line
JOB TIME : 0.56 s
Ah, I beg your pardon -- virglrenderer is *not* disabled, I merely assumed it was. But
the effect is still there -- dead qemu not reaped, indefinite hang on the driver.The end of the log is:
Quoted 1 line
2022-06-27 17:32:19,746 stacktrace L0045 ERROR| Command:./qemu-system-x86_64 -display none -vga none -chardev socket,id=mon,path=/var/tmp/avo_qemu_sock_4j1r4bdf/qemu-245052-7f2a8c8a3bb0-monitor.sock
-mon chardev=mon,mode=control -chardev socket,id=console,path=/var/tmp/avo_qemu_sock_4j1r4bdf/qemu-245052-7f2a8c8a3bb0-console.sock,server=on,wait=off -serial chardev:console -cpu host -m 2G -machine pc,accel=kvm -device
virtio-vga-gl -display egl-headless -kernel/home/rth/avocado/data/cache/by_location/892ae21f3ae7d04994d81e1c0bf204ecebe555bb/vmlinuz-initrd/home/rth/avocado/data/cache/by_location/892ae21f3ae7d04994d81e1c0bf204ecebe555bb/initrd.img-append printk.time=0 console=ttyS0 rdinit=/bin/bash
Quoted 8 lines
Quoted 1 line
2022-06-27 17:32:19,746 stacktrace L0045 ERROR| Output:qemu-system-x86_64: -display egl-headless: Parameter 'type' does not accept value 'egl-headless'
if that helps.
Ok I managed to reproduce, it's enough to give invalid arguments to make it hang for a long while.
This a flaw in machine.py, which waits for the qemu QMP connection, forever. We could first teach it to wait for the default 15s max.
But machine.py probably needs to be ported to the async QMPClient (python/qemu/qmp/legacy.py).
For now, I'll send a simpler fix and leave TODOs for later ;)
Signature · 1 line
Marc-André Lureau