Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
Assignees
kumaraditya303
Labels
3.11only security fixes3.12only security fixestopic-asynciotype-bugAn unexpected behavior, bug, or error
@AMDmi3

Description

@AMDmi3

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 withasyncio.create_subprocess_exec started failing in different places in weird ways. It turned out that with some probabilityasyncio.subprocess.Process.communicate() would now return an empty stdout. Here's a repro:

import asyncioasync 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 += 1asyncio.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

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp