qemu-system-x86_64 crashed with SIGABRT when using option -vga qxl
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned | ||
qemu (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* There are conditions where the vga/qxl driver can crash the qemu
process.
* It is like a very complex case of a non initialized var - without the
fix it might try to ask for updates without having a valid primary
surface.
* Backport from upstream https:/
[Test Case]
* Sometimes booting xubuntu was reported to be enough, at other times it was needed to change resolution a few times to trigger.
# get xubuntu iso (actually other UI Isos should do as well)
$ qemu-system-x86_64 -vga qxl -enable-kvm -cpu host -smp cores=2,threads=2 -m 2048 -cdrom xubuntu-
# If it boots successfully, change resolution until it crashes.
$ while true ; do xrandr --output Virtual-0 --mode 640x480 ; sleep 1 ; xrandr --output Virtual-0 --mode 1280x720 ; sleep 1 ; xrandr --output Virtual-0 --mode 1920x1080 ; sleep 1 ; done
* Without the fix that will trigger the qemu crash
[Regression Potential]
* The change "just" adds QXL_MODE_UNDEFINED as one more trigger to leave
the rendering update. That sounds rather safe. But thinking hard on
potential updates I could think of theoretical setups that were in
undefined mode all the time (unlikely or impossible I think) that now
would get no updates anymore. Well I really don't think this is an
issue, but since this section should be open thinking on "potential"
regressions that is what comes to my mind.
[Other Info]
* Thanks to Leonardo for most of the bisecting and discussion work!
---
When using qemu-system-x86_64 with the option -vga qxl, it crashes. The easiest way to crash it is by trying to change the guest's resolution. However, the system may randomly crash too, not happening only when changing resolution. Here is the terminal output of one of these random crashes:
--------
$ qemu-system-x86_64 -hda /dev/sdb -m 2048 -enable-kvm -cpu host -vga qxl -nodefaults -netdev user,id=hostnet0 -device virtio-
WARNING: Image format was not specified for '/dev/sdb' and probing guessed raw.
Specify the 'raw' format explicitly to remove the restrictions.
(process:21313): Spice-WARNING **: 16:01:45.759: display-
(process:21313): Spice-WARNING **: 16:01:45.759: display-
(process:21313): Spice-CRITICAL **: 16:01:45.759: display-
Abortado (imagem do núcleo gravada)
--------
I was running QEMU as a normal user which is on the groups kvm and disk. Initially I supposed the problem was because I was running QEMU as root, but as a normal user this happens too.
I have tested with guests with different Ubuntu version: 18.04, 17.10 and 16.04. It is happening with them all.
ProblemType: Crash
DistroRelease: Ubuntu 18.04
Package: qemu-system-x86 1:2.11+
ProcVersionSign
Uname: Linux 4.15.0-10-generic x86_64
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
CurrentDesktop: XFCE
Date: Wed Mar 14 17:13:52 2018
ExecutablePath: /usr/bin/
InstallationDate: Installed on 2017-06-13 (273 days ago)
InstallationMedia: Xubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
KvmCmdLine: COMMAND STAT EUID RUID PID PPID %CPU COMMAND
MachineType: LENOVO 80UG
ProcCmdline: qemu-system-x86_64 -hda /dev/sdb -smp cpus=2 -m 512 -enable-kvm -cpu host -vga qxl -nodefaults -netdev user,id=hostnet0 -device virtio-
ProcKernelCmdLine: BOOT_IMAGE=
Signal: 6
SourcePackage: qemu
StacktraceTop:
() at /usr/lib/
() at /usr/lib/
() at /usr/lib/
() at /usr/lib/
() at /usr/lib/
Title: qemu-system-x86_64 crashed with SIGABRT
UpgradeStatus: Upgraded to bionic on 2017-10-20 (145 days ago)
UserGroups: adm bluetooth cdrom dialout dip disk kvm libvirt lpadmin netdev plugdev sambashare sudo
dmi.bios.date: 07/10/2017
dmi.bios.vendor: LENOVO
dmi.bios.version: 0XCN43WW
dmi.board.
dmi.board.name: Toronto 4A2
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40679 WIN
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.family: IDEAPAD
dmi.product.name: 80UG
dmi.product.
dmi.sys.vendor: LENOVO
tags: | added: cosmic |
Changed in qemu (Ubuntu Bionic): | |
status: | New → Triaged |
Changed in qemu: | |
status: | Fix Committed → Fix Released |
description: | updated |
StacktraceTop: 0x7fb001524195 "Spice", args=0x7fafbf9f e600, format= 0x7fb001525015 "condition `%s' failed", function= 0x7fb001527ef0 <__func__.47520> "display_ channel_ update" , strloc= 0x7fb001527c0f "display- channel. c:2035" , log_level= G_LOG_LEVEL_ CRITICAL) at log.c:183 log_level@ entry=G_ LOG_LEVEL_ CRITICAL, strloc= strloc@ entry=0x7fb0015 27c0f "display- channel. c:2035" , function= function@ entry=0x7fb0015 27ef0 <__func__.47520> "display_ channel_ update" , format= format@ entry=0x7fb0015 25015 "condition `%s' failed") at log.c:196 channel_ update (display= 0x56421590aa30, surface_id=0, area=area@ entry=0x5642159 0ee1c, clear_dirty=1, qxl_dirty_ rects=qxl_ dirty_rects@ entry=0x7fafbf9 fe770, num_dirty_ rects=num_ dirty_rects@ entry=0x7fafbf9 fe76c) at display- channel. c:2035 dev_update_ async (opaque= 0x56421590ebe0, payload= 0x56421590ee10) at red-worker.c:428 handle_ single_ read (dispatcher= 0x56421590e080) at dispatcher.c:284
spice_logv (log_domain=
spice_log (log_level=
display_
handle_
dispatcher_