python / python/cpython

test.test_socket.RDSTest.testPeek hangs indefinitely in docker container

Open
#136,110 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

tests topic-socket type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Bug report

Bug description:

Execution of test_socket.RDSTest.testPeek hangs indefinitely in docker container for Python 3.12.10.
Reproduced on ArchLinux, Docker version 28.2.2, official images Ubuntu 18:04 and Ubuntu 24:04.

Steps:

  1. Install necessary packages for compilation.
  2. Download https://www.python.org/ftp/python/3.12.10/Python-3.12.10.tgz
  3. Do 'configure', 'make'. then execute
    ./python -m test test_socket -m test.test_socket.RDSTest.testPeek -v

The test is stuck. There is no error output, just 'testPeek (test.test_socket.RDSTest.testPeek) ...'.
Strace shows that the process waits for an answer from socket.
If you interrupt and rerun the same test - it completes without issues.

Seems to be the same issue as in https://github.com/python/cpython/issues/79428.

CPython versions tested on:

3.13.5

Operating systems tested on:

Linux

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the hang with ./python -m test test_socket -m test.test_socket.RDSTest.testPeek -v in the reported Docker/Linux setup. Start with test.test_socket.RDSTest.testPeek and compare the behavior with issue #79428; done means the test completes reliably on its first run without waiting indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.