Hide Forgot
Description of problem: qemu-kvm core dump while boot guest with undefined object. Version-Release number of selected component (if applicable): qemu-kvm-rhev-1.5.3-19.el7.x86_64 How reproducible: always Steps to Reproduce: 1. boot guest with # /usr/libexec/qemu-kvm -object a,id=a Actual results: ERROR:qom/object.c:409:object_new_with_type: assertion failed: (type != NULL) Aborted (core dumped) (gdb) bt #0 0x00007ffff30db999 in raise () from /lib64/libc.so.6 #1 0x00007ffff30dd0a8 in abort () from /lib64/libc.so.6 #2 0x00007ffff750dbc6 in g_assertion_message () from /lib64/libglib-2.0.so.0 #3 0x00007ffff750dc24 in g_assertion_message_expr () from /lib64/libglib-2.0.so.0 #4 0x0000555555737809 in object_new_with_type (type=0x0) at qom/object.c:409 #5 0x0000555555737855 in object_new ( typename=typename@entry=0x555556501c60 "a") at qom/object.c:423 #6 0x0000555555769b9b in object_create (opts=0x555556501b90, opaque=<optimized out>) at vl.c:2780 #7 0x000055555589892b in qemu_opts_foreach (list=<optimized out>, func=func@entry=0x555555769b50 <object_create>, opaque=opaque@entry=0x0, abort_on_failure=abort_on_failure@entry=0) at util/qemu-option.c:1140 #8 0x00005555555ff293 in main (argc=3, argv=0x7fffffffe478, envp=<optimized out>) at vl.c:3815 Expected results: should give an error message, not core dump. Additional info:
Re-tested via libvirt. If define guest likes below, then libvirt will deny it as expect. # cat object.xml ... <rng model='virtio'> <backend model='a'>/dev/random</backend> </rng> ... virsh # define object.xml error: Failed to define domain from object.xml error: XML error: unknown RNG backend model 'a' But I'm not sure if libvirt have a command that could use '-object' directly.