Skip to content
This repository was archived by the owner on Apr 11, 2020. It is now read-only.
This repository was archived by the owner on Apr 11, 2020. It is now read-only.

Investigate and fix uvloop-specific terminal app error #2

@achimnol

Description

@achimnol

The following error happens randomly (quite frequently) on start up of python -m ai.backend.kernel git:

shell-kernel: Fatal error on transport ReadUnixTransport (error status in uv_stream_t.read callback)
protocol: <ai.backend.kernel.terminal.StdoutProtocol object at 0x7f184ae94cf8>
transport: <ReadUnixTransport closed=False reading=False 0x7f184ae97298>
OSError: [Errno 5] Input/output error
opened shell pty: stdin at port 2002, stdout at port 2003
shell-kernel: Task exception was never retrieved
future: <Task finished coro=<Terminal.terminal_in() done, defined at /home/joongi/backend.ai-kernel-runner/ai/backend/kernel/terminal.py:136> exception=RuntimeError('read called while another coroutine is already waiting for incoming data',)>
Traceback (most recent call last):
  File "/home/joongi/backend.ai-kernel-runner/ai/backend/kernel/terminal.py", line 139, in terminal_in
    data = await self.sock_term_in.read()
  File "/home/joongi/.pyenv/versions/bai-kernel-runner-dev/lib/python3.6/site-packages/aiozmq/stream.py", line 278, in read
    raise RuntimeError('read called while another coroutine is '
RuntimeError: read called while another coroutine is already waiting for incoming data

and also another error in terminating:

shell-kernel: Fatal error on transport ReadUnixTransport (error status in uv_stream_t.read callback)
protocol: <ai.backend.kernel.terminal.StdoutProtocol object at 0x7f88dccedcc0>
transport: <ReadUnixTransport closed=False reading=False 0x7f88dccf0298>
OSError: [Errno 5] Input/output error

If I don't use uvloop, then it works fine.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions