Bug#927900: qemu-system-x86_64 crashes when using GStreamer

2019-05-03 Thread Bernhard Übelacker
Hello François,
I just tried to reproduce this crash, without being involved
in packaging qemu.
But could not get my VM to crash - it shows just the video,
either with spicy or the virt-manager integrated viewer.

Therefore could you please add the exact VM config? (virsh dumpxml)

This gstreamer warning is from /var/log/libvirt/qemu/VM.log ?

Have you specified a special video out to mplayer?
Or is there also a driver to be installed or guest tools?
How could one see if "streaming" works?

Or maybe you could record a backtrace on your system with something
like this (replace  with the pid of the right qemu instance):

script -a gdb_qemu-system-x86_64_$(date +%Y-%m-%d_%H-%M-%S).log -c "gdb -q 
--pid   -ex 'set width 0' -ex 'set pagination off' -ex 'cont' -ex 'bt' 
-ex 'detach' -ex 'quit'"

Kind regards,
Bernhard

# Buster amd64 qemu VM 2019-05-03


apt update
apt dist-upgrade


apt install systemd-coredump net-tools htop mc sshfs xserver-xorg lightdm 
openbox gdb virt-manager


adduser benutzer libvirt
adduser benutzer libvirt-qemu
adduser benutzer kvm


reboot


modprobe fuse
virt-host-validate


- login
- start virt-manager
- new virtual machine
- local installation media, 
https://cdimage.debian.org/cdimage/buster_di_rc1/amd64/iso-cd/debian-buster-DI-rc1-amd64-netinst.iso
- debian-testing
- default memory and cpu

mkdir sshfs
sshfs -o allow_other 
bernhard@192.168.178.25:/home/bernhard/data/emu/pc/qemu/machines/debian-10-buster-x86_64_minimal
 /home/benutzer/sshfs

- disk existing from host
- remove cdrom

export LIBVIRT_DEFAULT_URI="qemu:///system"
virsh list --all
virsh edit debiantesting

+

sed -i 's/#dynamic_ownership = 1/dynamic_ownership = 0/g' /etc/libvirt/qemu.conf



ssh -p -L "127.0.0.1:5900:127.0.0.1:5900" benutzer@$LOCALIP
spicy -h localhost -p 5900



# /usr/bin/qemu-system-x86_64 -name guest=debiantesting,debug-threads=on -S 
-object 
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-debiantesting/master-key.aes
 -machine pc-q35-3.1,accel=kvm,usb=off,vmport=off,dump-guest-core=off -cpu 
EPYC-IBPB,x2apic=on,tsc-deadline=on,hypervisor=on,tsc_adjust=on,cmp_legacy=on,perfctr_core=on,virt-ssbd=on,monitor=off
 -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 
b84834f3-ea2b-40f4-b789-8c3bef8bb70c -no-user-config -nodefaults -chardev 
socket,id=charmonitor,fd=26,server,nowait -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 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 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 -drive 
file=/home/benutzer/sshfs/system-rw.img,format=raw,if=none,id=drive-virtio-disk0
 -device 
virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
 -netdev tap,fd=28,id=hostnet0,vhost=on,vhostfd=29 -device 
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:35:98:c2,bus=pci.1,addr=0x0 
-chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 
-chardev socket,id=charchannel0,fd=30,server,nowait -device 
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0
 -chardev spicevmc,id=charchannel1,name=vdagent -device 
virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0
 -device usb-tablet,id=input0,bus=usb.0,port=1 -spice 
port=5900,addr=127.0.0.1,disable-ticketing,streaming-video=all,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 ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b -device 
hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -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 
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




inside guest-guest:

apt install xserver-xorg lightdm openbox mplayer

scp big_buck_bunny_1080p_h264.mov 

Bug#927900: qemu-system-x86_64 crashes when using GStreamer

2019-04-24 Thread Francois Gouget
Package: qemu-system-x86
Version: 1:3.1+dfsg-7
Severity: normal

Dear Maintainer,

To reproduce:
* Create a VM using Spice.
* Tell QEmu to stream all videos by using virsh to add the streaming
  mode setting like so:

  
  

* Start the VM and play a video in the guest. For instance:
  mplayer big_buck_bunny_1080p_h264.mov
  
As soon as QEmu switches the video to streaming mode it will crash. In
the log the last lines are:

(qemu-system-x86_64:6140): GStreamer-WARNING **: 16:13:21.872: External plugin 
loader failed. This most likely means that the plugin loader helper binary was 
not found or could not be run. You might need to set the GST_PLUGIN_SCANNER 
environment variable if your setup is unusual. This should normally not be 
required though.
2019-04-24 14:13:22.569+: shutting down, reason=crashed


Notes:
* This happens with and without apparmor installed so this is not an
  issue caused by apparmor preventing GStreamer from finding the files
  it needs.
* I can use video streaming just fine in Xspice so the bug is most
  likely not in the libspice-server libraries.


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-4-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr:en_US (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages qemu-system-x86 depends on:
ii  ipxe-qemu 1.0.0+git-20190125.36a4c85-1
ii  libaio1   0.3.112-3
ii  libasound21.1.8-1
ii  libbluetooth3 5.50-1
ii  libbrlapi0.6  5.6-10
ii  libc6 2.28-8
ii  libcacard01:2.6.1-1
ii  libcapstone3  4.0.1+really+3.0.5-1
ii  libepoxy0 1.5.3-0.1
ii  libfdt1   1.4.7-3
ii  libgbm1   18.3.4-2
ii  libgcc1   1:8.3.0-6
ii  libglib2.0-0  2.58.3-1
ii  libgnutls30   3.6.6-2
ii  libibverbs1   22.1-1
ii  libjpeg62-turbo   1:1.5.2-2+b1
ii  libncursesw6  6.1+20181013-2
ii  libnettle63.4.1-1
ii  libnuma1  2.0.12-1
ii  libpixman-1-0 0.36.0-1
ii  libpng16-16   1.6.36-5
ii  librdmacm122.1-1
ii  libsasl2-22.1.27+dfsg-1
ii  libseccomp2   2.3.3-4
ii  libspice-server1  0.14.0-1.3
ii  libtinfo6 6.1+20181013-2
ii  libusb-1.0-0  2:1.0.22-2
ii  libusbredirparser10.8.0-1
ii  libvdeplug2   2.3.2+r586-2.2
ii  libvirglrenderer0 0.7.0-2
ii  libxendevicemodel14.11.1+26-g87f51bf366-3
ii  libxenevtchn1 4.11.1+26-g87f51bf366-3
ii  libxenforeignmemory1  4.11.1+26-g87f51bf366-3
ii  libxengnttab1 4.11.1+26-g87f51bf366-3
ii  libxenmisc4.114.11.1+26-g87f51bf366-3
ii  libxenstore3.04.11.1+26-g87f51bf366-3
ii  libxentoolcore1   4.11.1+26-g87f51bf366-3
ii  qemu-system-common1:3.1+dfsg-7
ii  qemu-system-data  1:3.1+dfsg-7
ii  seabios   1.12.0-1
ii  zlib1g1:1.2.11.dfsg-1

Versions of packages qemu-system-x86 recommends:
ii  ovmf 0~20181115.85588389-3
ii  qemu-system-gui  1:3.1+dfsg-7
ii  qemu-utils   1:3.1+dfsg-7

Versions of packages qemu-system-x86 suggests:
pn  qemu-block-extra  
ii  samba 2:4.9.5+dfsg-3
ii  sgabios   0.0~svn8-4
ii  vde2  2.3.2+r586-2.2

-- no debconf information