Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_socket: testStream() fails on Fedora Rawhide #119461

Closed
vstinner opened this issue May 23, 2024 · 5 comments
Closed

test_socket: testStream() fails on Fedora Rawhide #119461

vstinner opened this issue May 23, 2024 · 5 comments
Labels
tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

vstinner commented May 23, 2024

Example of failure: https://buildbot.python.org/all/#/builders/536/builds/7175

======================================================================
ERROR: testStream (test.test_socket.ThreadedVSOCKSocketStreamTest.testStream)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-aarch64/build/Lib/test/test_socket.py", line 395, in _setUp
    self.__setUp()
    ~~~~~~~~~~~~^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-aarch64/build/Lib/test/test_socket.py", line 538, in setUp
    self.conn, self.connaddr = self.serv.accept()
                               ~~~~~~~~~~~~~~~~^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-aarch64/build/Lib/socket.py", line 295, in accept
    fd, addr = self._accept()
               ~~~~~~~~~~~~^^
TimeoutError: timed out

======================================================================
ERROR: testStream (test.test_socket.ThreadedVSOCKSocketStreamTest.testStream)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-aarch64/build/Lib/test/test_socket.py", line 383, in raise_queued_exception
    raise self.queue.get()
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-aarch64/build/Lib/test/test_socket.py", line 407, in clientRun
    self.clientSetUp()
    ~~~~~~~~~~~~~~~~^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-aarch64/build/Lib/test/test_socket.py", line 546, in clientSetUp
    self.cli.connect((cid, VSOCKPORT))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: [Errno 19] No such device

Linked PRs

@vstinner vstinner added the tests Tests in the Lib/test dir label May 23, 2024
@vstinner
Copy link
Member Author

vstinner commented May 23, 2024

It started failing around May 15, 2024.

@vstinner
Copy link
Member Author

First failure on x86-64: https://buildbot.python.org/all/#/builders/339/builds/5314
Latest success: https://buildbot.python.org/all/#/builders/339/builds/5313

The kernel was updated between the two builds.

  • Before: platform.platform: Linux-6.9.0-0.rc3.20240413git8f2c057754b2.35.fc41.aarch64-aarch64-with-glibc2.39.9000
  • After: platform.platform: Linux-6.9.0-64.fc41.aarch64-aarch64-with-glibc2.39.9000

@stratakis
Copy link
Contributor

changes.txt

Package changes the day the build started failing.

vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2024
…CID_ANY

Skip ThreadedVSOCKSocketStreamTest of test_socket if get_cid()
returns VMADDR_CID_ANY (-1).
@vstinner
Copy link
Member Author

On Fedora Rawhide x86-64 and Linux kernel 6.9.0-64.fc41.x86_64, the device /dev/vsock does exist. get_cid() returns 4294967295 which is VMADDR_CID_ANY (-1).

On Fedora Stable x86-64 and Linux kernel 6.8.10-300.fc40.x86_64, the device /dev/vsock doesn't exist. get_cid() returns None (if fails with OSError).

vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2024
Add socket.VMADDR_CID_LOCAL constant.

Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.
vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2024
Add socket.VMADDR_CID_LOCAL constant.

Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).
vstinner added a commit that referenced this issue May 23, 2024
Add socket.VMADDR_CID_LOCAL constant.

Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).
vstinner added a commit to vstinner/cpython that referenced this issue May 23, 2024
Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).

(cherry picked from commit e94dbe4)
vstinner added a commit that referenced this issue May 23, 2024
gh-119461: Fix ThreadedVSOCKSocketStreamTest (#119465)

Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).

(cherry picked from commit e94dbe4)
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 23, 2024
…19465) (pythonGH-119479)

pythongh-119461: Fix ThreadedVSOCKSocketStreamTest (pythonGH-119465)

Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).

(cherry picked from commit c750061)

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit e94dbe4)
vstinner added a commit that referenced this issue May 23, 2024
GH-119479) (#119484)

[3.13] gh-119461: Fix ThreadedVSOCKSocketStreamTest (GH-119465) (GH-119479)

gh-119461: Fix ThreadedVSOCKSocketStreamTest (GH-119465)

Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).

(cherry picked from commit c750061)

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit e94dbe4)

Co-authored-by: Victor Stinner <vstinner@python.org>
@vstinner
Copy link
Member Author

vstinner commented Jun 3, 2024

Fixed by commit: e94dbe4.

@vstinner vstinner closed this as completed Jun 3, 2024
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
Add socket.VMADDR_CID_LOCAL constant.

Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).
vstinner added a commit to vstinner/cpython that referenced this issue Jan 22, 2025
) (python#119479)

pythongh-119461: Fix ThreadedVSOCKSocketStreamTest (python#119465)

Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).

(cherry picked from commit e94dbe4)
(cherry picked from commit c750061)
ambv pushed a commit that referenced this issue Jan 23, 2025
Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).

(cherry picked from commit e94dbe4)
(cherry picked from commit c750061)
(cherry picked from commit cbfe302)
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 29, 2025
…29171)

Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host
address or the "any" address, use the local communication address
(loopback): VMADDR_CID_LOCAL.

On Linux 6.9, apparently, the /dev/vsock device is now available but
get_cid() returns VMADDR_CID_ANY (-1).

(cherry picked from commit 45db419)

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit e94dbe4)
(cherry picked from commit c750061)
(cherry picked from commit cbfe302)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

2 participants