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

Calling os.stat() on a named pipe used by asyncio.ProactorEventLoop.start_serving_pipe() will raise OSError #100573

Closed
@teppey

Description

@teppey

Bug report

On Windows, several calls toos.stat() on the named pipe used byasyncio.ProactorEventLoop.start_serving_pipe() will result in anOSError. At this time, the first call toos.stat() will cause aBrokenPipeError on the server side.

Steps to reproduce

Run the pipe server in Command Prompt:

>type pipe_server.pyimport asyncioasync def start_server():    pipe = r'\\.\pipe\_test_pipe_server'    loop = asyncio.get_event_loop()    await loop.start_serving_pipe(asyncio.Protocol, pipe)    await asyncio.sleep(3600)asyncio.run(start_server())>python pipe_server.py

Run the following script as client on another Command Prompt:

>type pipe_stat.pyimport ospipe = r'\\.\pipe\_test_pipe_server'os.stat(pipe)>python pipe_stat.py

Display the following messages on the server side:

Pipe accept failedpipe: <PipeHandle handle=368>Traceback (most recent call last):  File "d:\python_build\Python-3.9.13\lib\asyncio\windows_events.py", line 368, in loop_accept_pipe    f = self._proactor.accept_pipe(pipe)  File "d:\python_build\Python-3.9.13\lib\asyncio\windows_events.py", line 636, in accept_pipe    connected = ov.ConnectNamedPipe(pipe.fileno())BrokenPipeError: [WinError 232] The pipe is being closed

On client side, runpipe_stat.py repeat several times, thenOSError occured:

Traceback (most recent call last):  File "C:\Users\<user>\Desktop\pipe_stat.py", line 4, in <module>    os.stat(pipe)OSError: [WinError 231] All pipe instances are busy: '\\\\.\\pipe\\_test_pipe_server'

This problem seems to stem from commit9eb3d54 between 3.8.0b3 and 3.8.0b4.

Your environment

  • CPython versions tested on: 3.8.0b3+(9eb3d54), 3.8.0, 3.9.13, 3.10.9, 3.11.1
  • Operating system and architecture: Windows 10 x64

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp