On Mon, Aug 30, 2021 at 02:38:30PM -0600, dann frazier wrote: > On Sat, Aug 28, 2021 at 02:53:01PM +0300, Michael Tokarev wrote: > > On 27.08.2021 23:25, dann frazier wrote: > > > Package: qemu-system-x86 > > > Version: 1:6.1+dfsg-1 > > > Severity: normal > > > > > > > > > A VM that I created with either virt-manager or virtinst sometime ago now > > > crashes when I attempt to start it under QEMU 6.1. > > > > Lovely. > > > > I can only guess this is due to libvirt's qemu-guest-agent socket, this one: > > > > > -chardev socket,id=charchannel0,fd=43,server=on,wait=off \ > > > -device > > > virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 > > > \ > > > > Dann, can you please disable the socket/qga to verify? > > If this is the case this is an impotant issue at least, > > it should definitely be fixed. > > Thanks for the response Michael. Unfortunately, I'm not able to > reproduce at the moment. After filing this bug, I looked through git > logs and, on a hunch, decided to try w/ the following patch reverted: > > 4cfd970ec1 util: fix abstract socket path copy > > That seemed to make the issue go away. Today I restored the archive > versions of the QEMU packages, and the issue no longer > reproduces. So now I have to question whether or not that revert was > significant or purely correlation :(
Aha! It seems that the important difference is whether or not the virt-manager GUI window for the VM is active. If it is active, the VM crashes regardless of how it is started (virsh console start/clicking "play" button). If the GUI is not active, the VM always works. With this knowledge I am able to confidently say that reverting 4cfd970ec1 *does* reliably avoid the problem. I was also now able to run the requested test, dropping the qemu-guest-agent socket. This did not avoid the problem: 2021-08-30 21:10:46.931+0000: starting up libvirt version: 7.6.0, package: 1 (Andrea Bolognani <e...@kiyuko.org> Thu, 19 Aug 2021 21:16:21 +0200), qemu version: 6.1.0Debian 1:6.1+dfsg-1, kernel: 5.13.0-trunk-amd64, hostname: xps13.dannf LC_ALL=C \ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin \ HOME=/var/lib/libvirt/qemu/domain-24-debian10 \ XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-24-debian10/.local/share \ XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-24-debian10/.cache \ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-24-debian10/.config \ /usr/bin/qemu-system-x86_64 \ -name guest=debian10,debug-threads=on \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-24-debian10/master-key.aes"}' \ -machine pc-q35-5.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off,memory-backend=pc.ram \ -cpu Skylake-Client-IBRS,ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,pdpe1gb=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,skip-l1dfl-vmentry=on,pschange-mc-no=on,hle=off,rtm=off \ -m 2048 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":2147483648}' \ -overcommit mem-lock=off \ -smp 2,sockets=2,cores=1,threads=1 \ -uuid REDACTED \ -no-user-config \ -nodefaults \ -chardev socket,id=charmonitor,fd=39,server=on,wait=off \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc,driftfix=slew \ -global kvm-pit.lost_tick_policy=delay \ -no-hpet \ -no-shutdown \ -global ICH9-LPC.disable_s3=1 \ -global ICH9-LPC.disable_s4=1 \ -boot menu=on,strict=on \ -device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \ -device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \ -device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \ -device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \ -device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \ -device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \ -device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 \ -device pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7 \ -device pcie-pci-bridge,id=pci.9,bus=pci.8,addr=0x0 \ -device pcie-root-port,port=0x18,chassis=10,id=pci.10,bus=pcie.0,addr=0x3 \ -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \ -device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/debian10.raw","node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"raw","file":"libvirt-3-storage"}' \ -device virtio-blk-pci,bus=pci.4,addr=0x0,drive=libvirt-3-format,id=virtio-disk0,bootindex=1 \ -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/debian10-seed.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \ -blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw","file":"libvirt-2-storage"}' \ -device virtio-blk-pci,bus=pci.7,addr=0x0,drive=libvirt-2-format,id=virtio-disk1 \ -device ide-cd,bus=ide.0,id=sata0-0-0 \ -netdev tap,fd=41,id=hostnet0,vhost=on,vhostfd=42 \ -device virtio-net-pci,netdev=hostnet0,id=net0,mac=<REDACTED>,bus=pci.1,addr=0x0 \ -chardev pty,id=charserial0 \ -device isa-serial,chardev=charserial0,id=serial0 \ -device usb-tablet,id=input0,bus=usb.0,port=1 \ -audiodev id=audio1,driver=spice \ -vnc 127.0.0.1:0,audiodev=audio1 \ -spice port=5901,addr=127.0.0.1,disable-ticketing=on,seamless-migration=on \ -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 \ -device virtio-gpu-pci,id=video1,max_outputs=1,bus=pci.10,addr=0x0 \ -chardev spicevmc,id=charredir0,name=usbredir \ -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 \ -chardev spicevmc,id=charredir1,name=usbredir \ -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 \ -device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 \ -object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \ -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 \ -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ -msg timestamp=on char device redirected to /dev/pts/28 (label charserial0) qemu-system-x86_64: ../../util/qemu-sockets.c:1348: socket_sockaddr_to_address_unix: Assertion `salen >= sizeof(su->sun_family) + 1 && salen <= sizeof(struct sockaddr_un)' failed.