Skip to content

The childwork events send deadlock between the subthread write log and async predictor yield a large size output #2271

Open
@sinopec

Description

@sinopec

cog version 0.14.4, async predict , enable concurrency.max = 8
and the async predict func, return a async generator, yield a base64 encoded image with high FPS (10).

And I found mainthread of childworker stuck there :
_apredict
AsyncConnection.send

and finnaly stuck on mutiprocessing/connection.py/Connection.py:_send

    def _send(self, buf, write=_write):
        remaining = len(buf)
        while True:
            n = write(self._handle, buf)
            remaining -= n
            if remaining == 0:
                break
            buf = buf[n:]

n = write(self._handle, buf)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions