Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParallelError when capturing 98 kB #151

Closed
bileslav opened this issue Jun 3, 2021 · 1 comment
Closed

ParallelError when capturing 98 kB #151

bileslav opened this issue Jun 3, 2021 · 1 comment

Comments

@bileslav
Copy link

bileslav commented Jun 3, 2021

Hello. I'll start with a simplified example:

$data = str_repeat('x', 97957);

$pool = new Pool;
$pool->add(fn () => strlen($data))->then(fn ($length) => print "{$length}\n");
$pool->wait();

If I specify 97958 or more as the second str_repeat() argument, I get the following exception. The same happens if a sufficiently large array is used instead of the string. Here's what happens: $status['status'] (Pool.php:322) instead of 0 is 127. Below is a dump of this variable. I couldn't find anything about it on Google. Why might this be happening? Thank you!

Fatal error: Uncaught Spatie\Async\Output\ParallelError in /var/www/vendor/spatie/async/src/Output/ParallelError.php:11
Stack trace:
#0 /var/www/vendor/spatie/async/src/Process/ParallelProcess.php(126): Spatie\Async\Output\ParallelError::fromException('')
#1 /var/www/vendor/spatie/async/src/Process/ProcessCallbacks.php(54): Spatie\Async\Process\ParallelProcess->resolveErrorOutput()
#2 /var/www/vendor/spatie/async/src/Pool.php(232): Spatie\Async\Process\ParallelProcess->triggerError()
#3 /var/www/vendor/spatie/async/src/Pool.php(330): Spatie\Async\Pool->markAsFailed(Object(Spatie\Async\Process\ParallelProcess))
#4 /var/www/vendor/spatie/async/src/Pool.php(154): Spatie\Async\Pool->Spatie\Async{closure}(17, Array)
#5 /var/www/src/main.php(20): Spatie\Async\Pool->wait()
#6 {main}
thrown in /var/www/vendor/spatie/async/src/Output/ParallelError.php on line 11

array (8)
   'signo' => 17
   'errno' => 0
   'code' => 1
   'status' => 127
   'utime' => 0.0
   'stime' => 0.0
   'pid' => 31069
   'uid' => 1000
@spatie-bot
Copy link

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants