Skip to content

Psalm fails during palarell scanning #11310

Description

@jorgsowa

I have the following errors running Psalm in docker container:

1st run

vendor-tools/psalm/vendor/bin/psalm --set-baseline=psalm-baseline.xml

JIT acceleration: ON

Target PHP version: 8.2 (inferred from composer.json) Enabled extensions: dom, mysqli, pdo, simplexml (unsupported extensions: bz2, fileinfo).

Running on PHP 8.2.27.

Scanning files...

9131 / 9131...[unknown][ERROR] Uncaught Amp\Sync\ChannelException thrown in event loop callback Psalm\Internal\Fork\ForkContext::Amp\Parallel\Worker\Internal{closure} defined in /var/www//vendor-tools/psalm/vendor/amphp/parallel/src/Worker/Internal/task-runner.php:47; use Revolt\EventLoop::setErrorHandler() to gracefully handle such exceptions: Sending on the channel failed. Did the context die? {"file":"/var/www//vendor-tools/psalm/vendor/revolt/event-loop/src/EventLoop/UncaughtThrowable.php","line":13,"exception":{},"breadcrumbs":[]}
[unknown][ERROR] Uncaught Amp\Sync\ChannelException thrown in event loop callback Psalm\Internal\Fork\ForkContext::Amp\Parallel\Worker\Internal{closure} defined in /var/www//vendor-tools/psalm/vendor/amphp/parallel/src/Worker/Internal/task-runner.php:47; use Revolt\EventLoop::setErrorHandler() to gracefully handle such exceptions: Sending on the channel failed. Did the context die? {"file":"/var/www//vendor-tools/psalm/vendor/revolt/event-loop/src/EventLoop/UncaughtThrowable.php","line":13,"exception":{},"breadcrumbs":[]}
Script vendor-tools/psalm/vendor/bin/psalm --set-baseline=psalm-baseline.xml handling the psalm:set event returned with error code 9

2nd run

vendor-tools/psalm/vendor/bin/psalm --set-baseline=psalm-baseline.xml

JIT acceleration: ON

Target PHP version: 8.2 (inferred from composer.json) Enabled extensions: dom, mysqli, pdo, simplexml (unsupported extensions: bz2, fileinfo).

Running on PHP 8.2.27.

Scanning files...

9131 / 9131...[unknown][ERROR] The context stopped responding, potentially due to a fatal error or calling exit {"file":"/var/www//vendor-tools/psalm/vendor/amphp/parallel/src/Context/Internal/AbstractContext.php","line":44,"exception":{},"breadcrumbs":[]}
[unknown][ERROR] The context stopped responding, potentially due to a fatal error or calling exit {"file":"/var/www//vendor-tools/psalm/vendor/amphp/parallel/src/Context/Internal/AbstractContext.php","line":44,"exception":{},"breadcrumbs":[]}
Script vendor-tools/psalm/vendor/bin/psalm --set-baseline=psalm-baseline.xml handling the psalm:set event returned with error code 1

During the next runs, those 2 errors happen alternately. Run with --debug option works smoothly without any issues.

PHP: PHP 8.2.27 (cli) (built: Feb 14 2025 20:50:47) (NTS)
Psalm: Psalm 6.7.1@a2f190972555ea01b0cfcc1913924d6c5fc1a64e

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