Bug 1709627 - qemu-kvm: util/oslib-posix.c:245: qemu_set_nonblock: Assertion `f != -1' failed.
Summary: qemu-kvm: util/oslib-posix.c:245: qemu_set_nonblock: Assertion `f != -1' failed.
Keywords:
Status: CLOSED DUPLICATE of bug 1708076
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.1
Assignee: Virtualization Maintenance
QA Contact: Pei Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-14 02:34 UTC by Pei Zhang
Modified: 2020-03-04 15:46 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 03:03:31 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pei Zhang 2019-05-14 02:34:45 UTC
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:

Comment 1 Pei Zhang 2019-05-14 03:03:31 UTC

*** This bug has been marked as a duplicate of bug 1708076 ***


Note You need to log in before you can comment on or make changes to this bug.