Bug 1271060 - virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
Summary: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev   
(Show other bugs)
Version: 7.2
Hardware: ppc64le
OS: Linux
medium
medium
Target Milestone: rc
: 7.4
Assignee: Thomas Huth
QA Contact: Xu Han
URL:
Whiteboard:
Keywords:
: 1370356 (view as bug list)
Depends On:
Blocks: RHV4.1PPC
TreeView+ depends on / blocked
 
Reported: 2015-10-13 05:36 UTC by mazhang
Modified: 2017-08-02 03:24 UTC (History)
9 users (show)

Fixed In Version: qemu-2.8
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 23:29:42 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2392 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2017-08-01 20:04:36 UTC
Red Hat Bugzilla 1370356 None CLOSED [ppc64le] [data-plane]qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24 2019-03-18 06:57 UTC

Internal Trackers: 1370356

Description mazhang 2015-10-13 05:36:57 UTC
Description of problem:


Version-Release number of selected component (if applicable):

Host:
3.10.0-322.el7.ppc64le
qemu-kvm-rhev-2.3.0-29.el7.ppc64le

Guest:
3.10.0-322.el7.ppc64

How reproducible:
100%

Steps to Reproduce:
1.Start qemu-kvm with 28 virtio-serial-pci devices.
/usr/libexec/qemu-kvm -name RHEL-7.2_BE -machine pseries,accel=kvm,usb=off -m 8192 -realtime mlock=off -smp 8,sockets=2,cores=2,threads=2 \
-rtc base=localtime,clock=host,driftfix=slew \
-monitor stdio \
-boot menu=on \
-device usb-ehci,id=usb,bus=pci.0,addr=0x1 \
-drive file=/home/mazhang/rhel7.2-ppc.qcow2,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none,rerror=stop,werror=stop,aio=native \
-device virtio-blk-pci,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bus=pci.0,addr=0x3,bootindex=1 \
-vnc :99 -device VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x5 \
-device usb-kbd,id=input0 \
-device usb-mouse,id=input1 \
-device usb-tablet,id=input2 \
-msg timestamp=on \
-netdev tap,id=hostnet0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:c4:e7:93,bus=pci.0,addr=0x6 \
-serial unix:/tmp/console0,server,nowait \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial1,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial2,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial3,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial4,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial5,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial6,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial7,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial8,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial9,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial10,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial11,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial12,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial13,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial14,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial15,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial16,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial17,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial18,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial19,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial20,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial21,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial22,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial23,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial24,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial25,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial26,bus=pci.0 \
-device virtio-serial-pci,id=virtio-serial27,bus=pci.0 \

2.
3.

Actual results:
Hmp print below errors during boot kernel.
But guest seems works well.

QEMU 2.3.0 monitor - type 'help' for more information
(qemu) 2015-10-13T05:24:46.224780Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.230508Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.275582Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.281265Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.325692Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.331371Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.379405Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.385082Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.431438Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.437116Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.482580Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.488248Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.531083Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.536768Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.586083Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.591773Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.639663Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.645342Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.694775Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.700469Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.748458Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.754136Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.802487Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.808158Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).
2015-10-13T05:24:46.858111Z qemu-kvm: virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
2015-10-13T05:24:46.863811Z qemu-kvm: virtio_pci_start_ioeventfd: failed. Fallback to a userspace (slower).


Expected results:
No complain in hmp.

Additional info:

Comment 2 Thomas Huth 2015-11-30 09:34:16 UTC
The "-24" means EMFILE - "Too many open files". Does it work if you increase the maximum possible number of open file descriptors? (not sure, but I think you can do that with "ulimit -n")

Comment 3 Ademar Reis 2015-12-28 14:23:24 UTC
(In reply to Thomas Huth from comment #2)
> The "-24" means EMFILE - "Too many open files". Does it work if you increase
> the maximum possible number of open file descriptors? (not sure, but I think
> you can do that with "ulimit -n")

Setting needinfo(reporter)

Comment 4 mazhang 2015-12-29 02:39:42 UTC
(In reply to Thomas Huth from comment #2)
> The "-24" means EMFILE - "Too many open files". Does it work if you increase
> the maximum possible number of open file descriptors? (not sure, but I think
> you can do that with "ulimit -n")

Test on 3.10.0-327.5.1.el7.ppc64le and qemu-kvm-rhev-2.3.0-31.el7_2.5.ppc64le.
Those messages gone after increase the maximum possible number of open file descriptors.

Comment 5 Thomas Huth 2016-02-22 09:42:11 UTC
Ok, so how should we proceed here? Would it be acceptable to simply improve the error message with a hint that the number of possible open file descriptors should be increased with "ulimit -n"?

Comment 6 mazhang 2016-02-23 06:28:07 UTC
(In reply to Thomas Huth from comment #5)
> Ok, so how should we proceed here? Would it be acceptable to simply improve
> the error message with a hint that the number of possible open file
> descriptors should be increased with "ulimit -n"?

Summary:
virtio_pci_set_host_notifier_internal: unable to init event notifier: -24
means "Too many open files", and it will works if increase the maximum possible number of open file descriptors.

Base on 902632#c10 and 1124311#c29, close this bug is ok.
If any problem please let me know.

Thanks,
Mazhang.

Comment 7 Markus Armbruster 2016-02-23 07:14:04 UTC
Okay, we've concluced the "this doesn't work" aspect actually "works as designed".  What's left ist the "this error message could use improvement" aspect: we should print strerror(number) instead of number.

Comment 8 Thomas Huth 2016-06-28 07:52:21 UTC
I've now suggested a patch for this upstream:

http://news.gmane.org/find-root.php?message_id=1467065523-13881-1-git-send-email-thuth@redhat.com

(note that upstream, the code has been moved around there a little bit, in downstream the code is in hw/virtio/virtio-pci.c instead)

Comment 10 Thomas Huth 2016-09-06 06:52:02 UTC
*** Bug 1370356 has been marked as a duplicate of this bug. ***

Comment 11 Thomas Huth 2016-09-13 13:39:19 UTC
Patch has been merged in upstream now, so the improved error message should be included in QEMU 2.8:

http://git.qemu.org/?p=qemu.git;a=commitdiff;h=a8bba0ada41b228e4dd5113a02f20bbc0f5d6f0a

Comment 15 Xu Han 2017-02-28 03:17:16 UTC
Verified this bug with qemu-kvm-rhev-2.8.0-5.el7.ppc64le.


Steps:
Same as comment 0.


Results:
Error messages became more readable.

2017-02-28T01:58:27.307667Z qemu-kvm: virtio_bus_set_host_notifier: unable to init event notifier: Too many open files (-24)
2017-02-28T01:58:27.328345Z qemu-kvm: virtio_bus_start_ioeventfd: failed. Fallback to userspace (slower).

And these would gone after increased the maximum possible number of open file descriptors.


So, the bug has been fixed.

Comment 17 errata-xmlrpc 2017-08-01 23:29:42 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://access.redhat.com/errata/RHSA-2017:2392

Comment 18 errata-xmlrpc 2017-08-02 01:07:21 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://access.redhat.com/errata/RHSA-2017:2392

Comment 19 errata-xmlrpc 2017-08-02 01:59:20 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://access.redhat.com/errata/RHSA-2017:2392

Comment 20 errata-xmlrpc 2017-08-02 02:40:06 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://access.redhat.com/errata/RHSA-2017:2392

Comment 21 errata-xmlrpc 2017-08-02 03:04:50 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://access.redhat.com/errata/RHSA-2017:2392

Comment 22 errata-xmlrpc 2017-08-02 03:24:58 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://access.redhat.com/errata/RHSA-2017:2392


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