Bug 1967177 - QEMU 6.0.0 socket_get_fd() fails with the error "socket_get_fd: too many connections"
Summary: QEMU 6.0.0 socket_get_fd() fails with the error "socket_get_fd: too many conn...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.5
Assignee: Stefan Hajnoczi
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On:
Blocks: 1957194 1983113
TreeView+ depends on / blocked
 
Reported: 2021-06-02 14:47 UTC by Stefan Hajnoczi
Modified: 2021-11-16 08:40 UTC (History)
9 users (show)

Fixed In Version: qemu-kvm-6.0.0-19.module+el8.5.0+11385+6e7d542e
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1983113 (view as bug list)
Environment:
Last Closed: 2021-11-16 07:53:43 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gitlab qemu-project qemu issues 218 0 None None None 2021-06-02 14:47:44 UTC
Red Hat Product Errata RHBA-2021:4684 0 None None None 2021-11-16 07:54:43 UTC

Description Stefan Hajnoczi 2021-06-02 14:47:45 UTC
Description of problem:
A regression was introduced in QEMU 6.0.0 where socket file descriptor passing on the command-line no longer works. Rich Jones posted an example along these lines:

  $ qemu-storage-daemon --nbd-server addr.type=fd,addr.str=4
  qemu-storage-daemon: --nbd-server addr.type=fd,addr.str=4: socket_get_fd: too many connections: Invalid argument

This regression broke the libnbd test suite (see QEMU GitLab Issue link).

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


How reproducible:
100%

Steps to Reproduce:
1. $ qemu-storage-daemon --nbd-server addr.type=fd,addr.str=4

Actual results:
qemu-storage-daemon: --nbd-server addr.type=fd,addr.str=4: socket_get_fd: too many connections: Invalid argument

Expected results:
qemu-storage-daemon: --nbd-server addr.type=fd,addr.str=4: File descriptor '4' is not a socket

Note that this is still an error message because we did not actually provide a file descriptor to the qemu-storage-daemon process. But this new error shows that QEMU has identified fd 4 and is trying to access it as expected.

Additional info:

Comment 3 zixchen 2021-06-04 01:31:02 UTC
Reproduce the bug on rhel8.5:

Version:
qemu-kvm-6.0.0-17.module+el8.5.0+11173+c9fce0bb.x86_64
kernel-4.18.0-310.el8.x86_64

Steps and results:
# qemu-storage-daemon --nbd-server addr.type=fd,addr.str=4
qemu-storage-daemon: --nbd-server addr.type=fd,addr.str=4: socket_get_fd: too many connections: Invalid argument

Comment 5 zixchen 2021-06-15 03:22:13 UTC
Verified this issue, report error as expected.

Version:
qemu-kvm-6.0.0-19.module+el8.5.0+11385+6e7d542e.x86_64
kernel-4.18.0-310.el8.x86_64

Steps:
# qemu-storage-daemon --nbd-server addr.type=fd,addr.str=4
qemu-storage-daemon: --nbd-server addr.type=fd,addr.str=4: File descriptor '4' is not a socket

The result is as expected, set status to verified.

Comment 6 Yanan Fu 2021-06-15 05:20:47 UTC
Set Verified:Tested,SanityOnly as gating/tier1 test pass.

Comment 11 errata-xmlrpc 2021-11-16 07:53:43 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 (virt:av bug fix and enhancement update), 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/RHBA-2021:4684


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