Skip to content

Uncaught FiberError in Process:start() #78

@JaggedJax

Description

@JaggedJax

Calling Process::start() can sometimes lead to AMPHP triggering the following uncaught error in Revolt.

Uncaught FiberError: Cannot suspend in a force-closed fiber in /vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php:625
Stack trace:
#0 /vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(625): Fiber::suspend()
#1 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#2 {main}
  thrown in /vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php on line 625

Wrapping the start() call in a try-catch does catch the error in the main thread, but this appears to be uncaught in a child thread and leads to the uncaught error still being printed to the php error log.

I have not been able to reliably trigger this error. I see it happen sometimes when doing load testing and starting lots of processes at the same time. But this error sometimes does happen with < 100 processes launched.

I also have the uv and ev PHP modules enabled.

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