sock.close() raises OSError EBADF when socket's fd is closed
Open
Nobody has claimed this yet.
3.10
3.11
3.9 (EOL)
stdlib
topic-socket
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
| BPO | 29343 |
|---|---|
| Nosy | @pitrou, @tiran, @vadmium, @1st1 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2017-01-22.12:11:57.166>
labels = ['type-bug', 'library', '3.9', '3.10', '3.11']
title = "sock.close() raises OSError EBADF when socket's fd is closed"
updated_at = <Date 2021-10-21.12:04:09.562>
user = 'https://github.com/tiran'
bugs.python.org fields:
activity = <Date 2021-10-21.12:04:09.562>
actor = 'christian.heimes'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2017-01-22.12:11:57.166>
creator = 'christian.heimes'
dependencies = []
files = []
hgrepos = []
issue_num = 29343
keywords = ['3.6regression']
message_count = 6.0
messages = ['286004', '286009', '286010', '286121', '286132', '404589']
nosy_count = 5.0
nosy_names = ['pitrou', 'christian.heimes', 'neologix', 'martin.panter', 'yselivanov']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue29343'
versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the socket.close() entry point and reproduce the EBADF behavior when the socket's file descriptor has already been closed. Trace the relevant standard-library socket handling and add a focused regression test for this scenario. Done means the test captures the intended close behavior without changing unrelated socket cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100