Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 970544

Summary: hot-plugging serial device with no chardev option exits qemu
Product: Red Hat Enterprise Linux 7 Reporter: Paolo Bonzini <pbonzini>
Component: qemu-kvm-rhevAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: hhuang, juzhang, knoel, kraxel, mrezanin, qzhang, rbalakri, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu 2.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-04 16:13:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paolo Bonzini 2013-06-04 09:52:53 UTC
Hot-plugging a PCI serial device like this:

(qemu) device_add id=ff,driver=pci-serial

will print "Can't create serial device, empty char device" and exit.  Not sure how easy to fix it is, though some of the infrastructure is there (realize methods can return an Error object, but PCI still uses the old init method).

Comment 4 Gerd Hoffmann 2015-04-30 15:47:50 UTC
pci init switched to realize in 2.3, so we can look into fixing that one now.

Comment 5 Gerd Hoffmann 2015-05-06 10:58:05 UTC
Looked at the code, seems the conversion to realize already fixed that one.

Comment 6 Qunfang Zhang 2015-06-23 07:11:52 UTC
Hi, Gerd

I tested this bug on old version qemu-kvm-rhev-2.1.2-23.el7_1.3.x86_64, got the following prompts:

(qemu)  device_add id=ff,driver=pci-serial
Can't create serial device, empty char device
Device initialization failed.
Device 'pci-serial' could not be initialized


And also tested on latest qemu-kvm-rhev-2.3.0-4.el7:

(qemu) device_add id=ff,driver=pci-serial
Can't create serial device, empty char device
Device 'pci-serial' could not be initialized

Gerd, is this the expected behaviour after fix? The qemu does not exit any more. But seems I did not reproduce it on old qemu-2.1.

Comment 7 Gerd Hoffmann 2015-06-23 07:25:51 UTC
Original report was for qemu-kvm, so you need 1.5.3 to reproduce I think.

Comment 8 Qunfang Zhang 2015-06-23 08:46:59 UTC
Yes, tested on the qemu-kvm-1.5.3-86.el7_1.1.x86_64, hot-plug a serial device with no chardev option, the qemu exits. 

(qemu) device_add id=ff,driver=pci-serial
Can't create serial device, empty char device
/etc/qemu-ifdown: could not launch network script
[root@localhost home]# 

So, according to comment 6 and comment 7, this bug is fixed in the latest qemu-kvm version.

Comment 12 errata-xmlrpc 2015-12-04 16:13:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2546.html