Description of problem: Boot qemu with vhostfd, qemu core dumped. Version-Release number of selected component (if applicable): 4.18.0-83.el8.x86_64 qemu-kvm-4.0.0-0.module+el8.1.0+3169+3c501422.x86_64 How reproducible: 100% Steps to Reproduce: 1. In host, boot qemu with vhostfd, qemu core dumped. # /usr/libexec/qemu-kvm -device virtio-net-pci,mac=9a:a2:a3:a4:a5:a6,id=net0,netdev=hostnet0 -netdev tap,id=hostnet0,vhost=on,vhostfd=22 qemu-kvm: util/oslib-posix.c:245: qemu_set_nonblock: Assertion `f != -1' failed. Actual results: Qemu core dumped with vhostfd. Expected results: Qemu should not crash. It's more friendly to users by printing warning info like below. (This is testing with qemu-kvm-3.1.0-25.module+el8+3153+f1590ef7.x86_64) qemu-kvm: -netdev tap,id=hostnet0,vhost=on,vhostfd=22: vhost_set_owner failed: Bad file descriptor (9) qemu-kvm: -netdev tap,id=hostnet0,vhost=on,vhostfd=22: warning: vhost-net requested but could not be initialized Additional info:
*** This bug has been marked as a duplicate of bug 1708076 ***