← 返回首页
asyncio subprocess stdout occasionally lost (3.11.0 → 3.11.1 regression) · Issue #100133 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

asyncio subprocess stdout occasionally lost (3.11.0 → 3.11.1 regression) #100133

New issue
New issue

Description

Bug report

So, I've updated python from 3.11.0 to 3.11.1 and one of my utilities which runs a lot of external processes with asyncio.create_subprocess_exec started failing in different places in weird ways. It turned out that with some probability asyncio.subprocess.Process.communicate() would now return an empty stdout. Here's a repro:

import asyncio async def main(): attempt = 1 while True: proc = await asyncio.create_subprocess_exec('/bin/echo', 'test', stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE) stdout, stderr = await proc.communicate() text = stdout.decode('utf-8').strip() if text != 'test': raise RuntimeError(f'FAIL on attempt {attempt}: output="{text}"') attempt += 1 asyncio.run(main())

You may have to wait somewhat for the problem to reproduce, but for me it fails in under 15 seconds more or less reliably. Possible output:

RuntimeError: FAIL on attempt 3823: output=""

Your environment

  • CPython versions tested on: 3.11.1
  • Operating system and architecture: FreeBSD 13.1 amd64

Linked PRs

Metadata

Metadata

Labels

3.11only security fixes3.12only security fixestopic-asynciotype-bugAn unexpected behavior, bug, or error

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

  • Open in GitHub Copilot app

Footer

© 2026 GitHub, Inc.