open-power-host-os / qemu

OpenPOWER Host OS qemu repository
Other
2 stars 3 forks source link

qemu crashes with trap when negative numbers used for cores, threads #15

Closed nasastry closed 6 years ago

nasastry commented 7 years ago
Mirrored with LTC bug https://bugzilla.linux.ibm.com/show_bug.cgi?id=159922 Run qemu with cores, threads with negative number(s). \# /usr/bin/qemu-system-ppc64 --nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m 2G,slots=32,maxmem=16G -device virtio-blk-pci,drive=rootdisk -drive file=/home/nasastry/hostos-3.0-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 -net nic,model=virtio -smp 8,cores=-1,threads=-1,maxcpus=12 (process:25200): GLib-ERROR **: gmem.c:130: failed to allocate 18446744073709550568 bytes Trace/breakpoint trap
sathnaga commented 7 years ago

Tried with this upstream commit, it fails at-least for powerpc, still the might be with other archs https://github.com/qemu/qemu/commit/530049bc1dcc24c1178a29d99ca08b6dd08413e0

./ppc64-softmmu/qemu-system-ppc64 -M pseries,max-cpu-compat=power9  -smp 8,threads=-1,cores=-1 -m 8192 -nographic -enable-kvm /home/sath/hostos-3.0-ppc64le.qcow2 -monitor stdio -serial /dev/pts/3
QEMU 2.10.50 monitor - type 'help' for more information
(qemu) qemu-system-ppc64: Cannot support -1 threads/core on a pseries machine because it must be a power of 2
laggarcia commented 7 years ago

This is similar to LTC bug 158118, that was fixed by Seeteena, and is not yet upstream afaik.

cdeadmin commented 7 years ago

This is similar to LTC bug 158118, that was fixed by Seeteena.

cdeadmin commented 6 years ago

------- Comment From lagarcia@br.ibm.com 2017-11-13 10:11:11 EDT------- I don't see this patch in hostos-release nor in hostos-devel.

Alexey, could you please pick it at least for hostos-devel? hostos-release branch is already closed for sprint 3. Then, re-targeting this one to sprint 4.

cdeadmin commented 6 years ago

------- Comment From bssrikanth@in.ibm.com 2017-12-19 06:57:56 EDT------- Reopening to get it tested on release branch.

cdeadmin commented 6 years ago

------- Comment From bssrikanth@in.ibm.com 2017-12-20 04:06:23 EDT------- Tested it on rel branch

[root@ltczzj3 srikanth]# /usr/bin/qemu-system-ppc64 --nographic -vga none -machine pseries,accel=kvm,kvm-type=HV -m 2G,slots=32,maxmem=16G -device virtio-blk-pci,drive=rootdisk -drive file=/home/srikanth/hostos-ppc64le.qcow2,if=none,cache=none,id=rootdisk,format=qcow2 -net nic,model=virtio -smp 8,cores=-1,threads=-1,maxcpus=12 qemu-system-ppc64: Cannot support -1 threads/core on a pseries machine because it must be a power of 2 [root@ltczzj3 srikanth]# uname -r 4.14.0-1.rel.git68b4afb.el7.centos.ppc64le