#1139265 linux-image-7.0.10+deb14-amd64: QXL graphics crash, processes stuck in D state, NULL-dereference errors, TTY-subsystem malfunction

Package:
src:linux
Source:
src:linux
Submitter:
Samuel Plavec
Date:
2026-08-04 04:57:01 UTC
Severity:
normal
Tags:
#1139265#5
Date:
2026-06-07 21:34:09 UTC
From:
To:
Dear Maintainer,

I would like to report a kernel bug in Debian Sid. The bug is related to
the driver for QXL virtualized graphics. The bug occurs in emulated
two-monitor QEMU machines, to which I connect using remote-viewer
(from package virt-viewer) over the SPICE protocol.

My host runs Debian Trixie. I use the following command to launch QEMU:
   qemu-system-x86_64 \
     -smp cores=2,threads=1,sockets=1 \
     -enable-kvm \
     -m 4G \
     -netdev user,id=ethernet \
     -device virtio-net-pci,netdev=ethernet \
     -vga none  \
     -device qxl-vga \
     -display none \
     -spice unix=on,addr=/tmp/spice.sock,disable-ticketing=on \
     -chardev spicevmc,id=charchannel0,name=vdagent \
     -device virtio-serial-pci,id=virtio-serial0 \
     -device
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0
\
     -serial mon:stdio \
     debian-sid-kde.qcow2

The guest disk was originally the "nocloud" cloud image, which I downloaded
from the Debian website, and then upgraded to Sid. The guest runs upstream
KDE Plasma installed using the kde-builder utility. (I was unable to
reproduce this bug using the Debian version of Plasma.) All other installed
packages, incl. Qt, SDDM and spice-vdagent, come from Debian.

To trigger this bug follow these steps:
1. Boot the VM and connect to it using remote-viewer.
2. Start an X11 Plasma session.
3. Once it loads up, make remote-viewer show the second monitor.
    (Spice-vdagent will detect this and switch Plasma to a multi-monitor
    layout.)
4. Log out and run a Wayland Plasma session.

After the last step, Plasma won't load, and the content of the screen
will glitch. Two scenarios may follow.
--------


In the first scenario, the glitched content of the display will usually
be static; it won't react to moving the cursor or keystrokes.
(The cursor itself is shown correctly, probably because it's emulated
by the host separately.) QEMU prints the following warning:

qemu-system-x86_64: warning: Spice:
../server/display-channel.cpp:2074:display_channel_create_surface:
condition `!display->priv->surfaces[surface_id]' failed

The kernel will then print an error message starting with the text
"[drm] driver is in bug mode"; its full text is in the attachment
sc1_msg_bug_mode.txt. The relevant part of the systemd journal is in
the attachment sc1_journal.txt (note the endless messages from
kwin_wayland_drm). Screenshots of glitched screen contents are
in sc1_scr_primary.png and sc1_scr_secondary.png.

If one attempts to kill all Wayland-related processes, a kwin_wayland
process will get stuck in uninterruptible sleep. The same will happen
to SDDM's Xorg process when one attempts to kill it. Attachments
sc1_info_wayland1.txt, sc1_info_wayland2.txt and sc1_info_xorg.txt
include some information (from /proc/) about examples of such hung
processes.

The kernel periodically prints INFO messages about blocked tasks.
See sc1_msg_task_blocked1.txt for the text of the message when
only Wayland had been killed. The file sc1_msg_task_blocked2.txt
contains the text after I additionally killed SDDM's Xorg.

There are cases when the kernel prints the "driver is in bug mode" message
only after some cursor movement. In this case, moving the cursor changes
the glitched pattern on the screen. However, after the error message,
cursor movement no longer has any effect.

Sometimes, the following messages are printed some time after
the graphics crash (the latter repeats periodically):

[ 6883.254662] qxl 0000:00:03.0: object_init failed for (3149824,
0x00000001)
[ 6883.260647] [drm:qxl_alloc_bo_reserved [qxl]] *ERROR* failed to
allocate VRAM BO

[ 6832.816431] [TTM] Buffer eviction failed
-------- In the much rarer second crash scenario, the kernel prints a completely different message during the graphics crash; this message starts with "BUG: kernel NULL pointer dereference" (see sc2_msg_nullderef.txt). It is possible to kill all Wayland processes. Killing SDDM's Xorg results in it being stuck briefly in D state, with the following stack trace (from /proc/[PID]/stack): [<0>] console_lock+0x2f/0x50 [<0>] vt_ioctl+0x520/0x1600 [<0>] tty_ioctl+0xe4/0x980 [<0>] __x64_sys_ioctl+0x97/0xe0 [<0>] do_syscall_64+0xcd/0x15f0 [<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e If I attempt to stop SDDM, Xorg restarts (with a new PID), and gets stuck in uninterruptible sleep again, with the following stack trace (cf. the trace in sc1_info_wayland2.txt): [<0>] drm_modeset_lock+0xd0/0x120 [drm] [<0>] drm_mode_getcrtc+0x80/0x180 [drm] [<0>] drm_ioctl_kernel+0xae/0x100 [drm] [<0>] drm_ioctl+0x2a8/0x550 [drm] [<0>] __x64_sys_ioctl+0x97/0xe0 [<0>] do_syscall_64+0xcd/0x15f0 [<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e
-------- This bug has other consequences, too. Running `systemctl poweroff` doesn't power off the VM fully -- QEMU won't terminate. Sometimes `su -c` executes commands with delay of tens of seconds. Some actions (e.g. restarting SDDM after killing it and Wayland) will cause apparent deadlocks in TTY-related kernel functionality. For example, certain terminal-manipulating commands (e.g. `chvt`) stop working, because openat calls on /dev/tty* files get stuck with the following stack trace: [<0>] tty_open+0x1ef/0x740 [<0>] chrdev_open+0xad/0x240 [<0>] do_dentry_open+0x134/0x490 [<0>] vfs_open+0x30/0x100 [<0>] path_openat+0x848/0x13f0 [<0>] do_file_open+0xe3/0x190 [<0>] do_sys_openat2+0x7b/0xe0 [<0>] __x64_sys_openat+0x61/0xa0 [<0>] do_syscall_64+0xcd/0x15f0 [<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e `ps` hangs, too, because it attempts to open /proc/tty/drivers. The stack trace is: [<0>] t_start+0x19/0x30 [<0>] seq_read_iter+0x101/0x490 [<0>] proc_reg_read_iter+0x4f/0x90 [<0>] vfs_read+0x268/0x390 [<0>] ksys_read+0x73/0xf0 [<0>] do_syscall_64+0xcd/0x15f0 [<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e `systemctl poweroff` stops working, because systemd gets stuck in D state with the following stack: [<0>] console_lock+0x2f/0x50 [<0>] show_cons_active+0xb2/0x2d0 [<0>] dev_attr_show+0x1f/0x50 [<0>] sysfs_kf_seq_show+0xcc/0x120 [<0>] seq_read_iter+0x128/0x490 [<0>] vfs_read+0x268/0x390 [<0>] ksys_read+0x73/0xf0 [<0>] do_syscall_64+0xcd/0x15f0 [<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e Additionally, it is impossible to read from /dev/vcs*; `cat` get stuck with the following stack trace: [<0>] console_lock+0x2f/0x50 [<0>] vcs_open+0x22/0x50 [<0>] chrdev_open+0xad/0x240 [<0>] do_dentry_open+0x134/0x490 [<0>] vfs_open+0x30/0x100 [<0>] path_openat+0x848/0x13f0 [<0>] do_file_open+0xe3/0x190 [<0>] do_sys_openat2+0x7b/0xe0 [<0>] __x64_sys_openat+0x61/0xa0 [<0>] do_syscall_64+0xcd/0x15f0 [<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e
-------- Thank you for considering this bug report. Best regards, Samuel Plavec
#1139265#10
Date:
2026-06-11 16:27:54 UTC
From:
To:
Please switch to q35 and see if it still fails, aka use
"-machine q35,accel=kvm".  The only real error in all this is a warning
about a broken legacy interrupt, which are still in use by the legacy pc
type.

X11 is deprecated and might be broken, don't use it.  It might leave
hardware in weird states and with the interrupt problem above.

Bastian

#1139265#15
Date:
2026-06-12 14:00:00 UTC
From:
To:
It still crashes, but there are some differences. The kwin_wayland
process gets stuck in D state only temporarily, and if I kill it, it
respawns (this happens until I kill kwin_wayland_wrapper). However,
when I run `systemctl stop sddm`, systemd-logind, SDDM and its Xorg
get stuck (non-permanently; the first two eventually disappear and
Xorg periodically unsuspends, and then gets stuck again) while doing
terminal-related ioctls (KDSETMODE, VT_OPENQRY, KDSETMODE,
respectively).

The stack traces of hung processes are different -- sometimes
slightly, sometimes more. After some time, TTY-accessing processes get
unstuck, and new ones run without problems.

Every 15 seconds, the kernel prints the "Buffer eviction failed"
message, which seems to be associated with an increase of Xorg's
voluntary_ctxt_switches value. Xorg is still stuck in the same ioctl
call, but with a different stacktrace, similar to the one I included
below (the lines before drm_fb_helper_pan_display are identical).

systemd-logind had an interesting stack trace while stuck:

[<0>] qxl_fence_wait+0xf8/0x1a0 [qxl]
[<0>] dma_fence_wait_timeout+0x62/0x170
[<0>] dma_resv_wait_timeout+0xce/0x1d0
[<0>] ttm_bo_wait_ctx+0x3d/0x50 [ttm]
[<0>] qxl_bo_move+0x4a/0xf0 [qxl]
[<0>] ttm_bo_handle_move_mem+0xd0/0x1a0 [ttm]
[<0>] ttm_bo_evict+0x115/0x170 [ttm]
[<0>] ttm_bo_evict_cb+0x77/0xd0 [ttm]
[<0>] ttm_lru_walk_for_evict+0xad/0x1d0 [ttm]
[<0>] ttm_bo_alloc_resource+0x181/0x4b0 [ttm]
[<0>] ttm_bo_validate+0x9e/0x180 [ttm]
[<0>] ttm_bo_init_reserved+0x16d/0x1f0 [ttm]
[<0>] qxl_bo_create+0x156/0x210 [qxl]
[<0>] qxl_alloc_bo_reserved+0x4a/0xc0 [qxl]
[<0>] qxl_image_alloc_objects+0xb3/0x130 [qxl]
[<0>] qxl_draw_dirty_fb+0x1a9/0x4b0 [qxl]
[<0>] qxl_primary_atomic_update+0xfd/0x130 [qxl]
[<0>] drm_atomic_helper_commit_planes+0x100/0x310 [drm_kms_helper]
[<0>] drm_atomic_helper_commit_tail+0x5e/0xc0 [drm_kms_helper]
[<0>] commit_tail+0xf1/0x150 [drm_kms_helper]
[<0>] drm_atomic_helper_commit+0x13c/0x180 [drm_kms_helper]
[<0>] drm_atomic_commit+0xb1/0xe0 [drm]
[<0>] drm_client_modeset_commit_atomic+0x1ec/0x230 [drm]
[<0>] drm_client_modeset_commit_locked+0x58/0x160 [drm]
[<0>] drm_fb_helper_pan_display+0x111/0x260 [drm_kms_helper]
[<0>] fb_pan_display+0x8e/0x140
[<0>] bit_update_start+0x1d/0x40
[<0>] fbcon_switch+0x467/0x700
[<0>] redraw_screen+0x107/0x2a0
[<0>] fbcon_blank+0x243/0x350
[<0>] do_unblank_screen+0xd8/0x1f0
[<0>] vt_ioctl+0x574/0x1600
[<0>] tty_ioctl+0xe4/0x980
[<0>] __x64_sys_ioctl+0x97/0xe0
[<0>] do_syscall_64+0xcd/0x15f0
[<0>] entry_SYSCALL_64_after_hwframe+0x76/0x7e

I am aware that it is deprecated, but, unfortunately, spice-vdagent
doesn't fully support Plasma on Wayland. Without regard to the
deprecation, there still is the underlying kernel bug that makes
unrelated processes hang.

#1139265#20
Date:
2026-07-09 12:41:51 UTC
From:
To:
On Fri, Jun 12, 2026 at 4:00 PM Samuel Plavec <samuelplavec@gmail.com> wrote:
[...]

Actually, spice-vdagent *does* support Wayland Plasma. spice-vdagent
just didn't work, because I hadn't installed XWayland. After I fixed
spice-vdagent by installing XWayland, the kernel bug no longer
manifested itself.

When I stop and mask spice-vdagent.service and spice-vdagentd.service
after logging out of X11 Plasma, and then log into Wayland Plasma, the
kernel bug still occurs. However, this applies only to development
Plasma; I haven't yet been able to trigger the kernel bug using
Debian-packaged Plasma.

#1139265#25
Date:
2026-07-29 19:00:33 UTC
From:
To:
Please retry this with 7.1 or even the 7.2-rc4 in experimental.  If this
still breaks, please report this upstream.  This should be sent to at
least:

virtualization@lists.linux.dev
spice-devel@lists.freedesktop.org

Bastian

#1139265#30
Date:
2026-07-29 20:45:28 UTC
From:
To:
On Wed, Jul 29, 2026 at 9:00 PM Bastian Blank <waldi@debian.org> wrote:
[...]
[...]

An interesting patch has been recently sent to LKML:

https://lore.kernel.org/lkml/20260724122636.213906-1-m.novosyolov@rosa.ru/

I want to wait to see if it is merged, and then check if it fixes this
bug. If it does not, I will file a bug with upstream.