watchdog: BUG: soft lockup - CPU
hi i use php 8.2 in ubuntu , i used process with child and get error
PHP Version => 8.2.28
System => Linux smsda 5.4.0-202-generic #222-Ubuntu SMP Fri Nov 8 14:45:04 UTC 2024 x86_64
Build Date => Mar 13 2025 18:12:52
Build System => Linux
Message from syslogd@smsda at Apr 14 16:45:26 ...
kernel:[10446051.985315] watchdog: BUG: soft lockup - CPU#22 stuck for 22s! [kworker/22:1:1141072]
in another run i get error and stop my code
PHP Fatal error: Uncaught Amp\ByteStream\ClosedException: The socket was closed before writing completed in /home/xxxxxxxxxx/public_html/php8/vendor/amphp/byte-stream/src/WritableResourceStream.php:366
Stack trace:
#0 /home/xxxxxxxxxx/public_html/php8/vendor/amphp/byte-stream/src/WritableResourceStream.php(286): Amp\ByteStream\WritableResourceStream->free()
#1 /home/xxxxxxxxxx/public_html/php8/vendor/amphp/process/src/Internal/Posix/PosixHandle.php(52): Amp\ByteStream\WritableResourceStream->close()
#2 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(589): Amp\Process\Internal\Posix\PosixHandle::Amp\Process\Internal\Posix\{closure}()
#3 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#4 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(497): Fiber->resume()
#5 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(553): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks()
#6 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#7 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(113): Fiber->start()
#8 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop.php(406): Revolt\EventLoop\Internal\AbstractDriver->run()
#9 /home/xxxxxxxxxx/public_html/cron/Amphp/sms_send_select.php(473): Revolt\EventLoop::run()
#10 {main}
Next Amp\Parallel\Context\ContextException: Starting the process failed in /home/xxxxxxxxxx/public_html/php8/vendor/amphp/parallel/src/Context/ProcessContext.php:165
Stack trace:
#0 /home/xxxxxxxxxx/public_html/php8/vendor/amphp/parallel/src/Context/ProcessContextFactory.php(42): Amp\Parallel\Context\ProcessContext::start()
#1 /home/xxxxxxxxxx/public_html/php8/vendor/amphp/parallel/src/Context/DefaultContextFactory.php(39): Amp\Parallel\Context\ProcessContextFactory->start()
#2 /home/xxxxxxxxxx/public_html/cron/Amphp/sms_send_select.php(434): Amp\Parallel\Context\DefaultContextFactory->start()
#3 /home/xxxxxxxxxx/public_html/php8/vendor/amphp/amp/src/functions.php(33): {closure}()
#4 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Amp\{closure}()
#5 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
#6 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#7 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(171): Fiber->throw()
#8 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Revolt\EventLoop\Internal\DriverSuspension::Revolt\EventLoop\Internal\{closure}()
#9 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(616): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
#10 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#11 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(497): Fiber->resume()
#12 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(553): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks()
#13 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#14 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(113): Fiber->start()
#15 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop.php(406): Revolt\EventLoop\Internal\AbstractDriver->run()
#16 /home/xxxxxxxxxx/public_html/cron/Amphp/sms_send_select.php(473): Revolt\EventLoop::run()
#17 {main}
Next Amp\Future\UnhandledFutureError: Unhandled future: Amp\Parallel\Context\ContextException: "Starting the process failed"; Await the Future with Future::await() before the future is destroyed or use Future::ignore() to suppress this exception. Enable assertions and set AMP_DEBUG=true in the process environment to track its origin. in /home/xxxxxxxxxx/public_html/php8/vendor/amphp/amp/src/Internal/FutureState.php:53
Stack trace:
#0 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Amp\Internal\FutureState->__destruct()
#1 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
#2 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#3 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(171): Fiber->throw()
#4 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Revolt\EventLoop\Internal\DriverSuspension::Revolt\EventLoop\Internal\{closure}()
#5 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(616): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
#6 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#7 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(497): Fiber->resume()
#8 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(553): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks()
#9 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#10 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(113): Fiber->start()
#11 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop.php(406): Revolt\EventLoop\Internal\AbstractDriver->run()
#12 /home/xxxxxxxxxx/public_html/cron/Amphp/sms_send_select.php(473): Revolt\EventLoop::run()
#13 {main}
Next Revolt\EventLoop\UncaughtThrowable: Uncaught Amp\Future\UnhandledFutureError thrown in event loop callback Amp\Internal\FutureState::Amp\Internal\{closure} defined in /home/xxxxxxxxxx/public_html/php8/vendor/amphp/amp/src/Internal/FutureState.php:54; use Revolt\EventLoop::setErrorHandler() to gracefully handle such exceptions: Unhandled future: Amp\Parallel\Context\ContextException: "Starting the process failed"; Await the Future with Future::await() before the future is destroyed or use Future::ignore() to suppress this exception. Enable assertions and set AMP_DEBUG=true in the process environment to track its origin. in /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/UncaughtThrowable.php:13
Stack trace:
#0 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(400): Revolt\EventLoop\UncaughtThrowable::throwingCallback()
#1 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(116): Revolt\EventLoop\Internal\AbstractDriver::Revolt\EventLoop\Internal\{closure}()
#2 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop.php(406): Revolt\EventLoop\Internal\AbstractDriver->run()
#3 /home/xxxxxxxxxx/public_html/cron/Amphp/sms_send_select.php(473): Revolt\EventLoop::run()
#4 {main}
thrown in /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/UncaughtThrowable.php on line 13
Fatal error: Uncaught Amp\ByteStream\ClosedException: The socket was closed before writing completed in /home/xxxxxxxxxx/public_html/php8/vendor/amphp/byte-stream/src/WritableResourceStream.php:366
Stack trace:
#0 /home/xxxxxxxxxx/public_html/php8/vendor/amphp/byte-stream/src/WritableResourceStream.php(286): Amp\ByteStream\WritableResourceStream->free()
#1 /home/xxxxxxxxxx/public_html/php8/vendor/amphp/process/src/Internal/Posix/PosixHandle.php(52): Amp\ByteStream\WritableResourceStream->close()
#2 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(589): Amp\Process\Internal\Posix\PosixHandle::Amp\Process\Internal\Posix\{closure}()
#3 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#4 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(497): Fiber->resume()
#5 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(553): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks()
#6 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#7 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(113): Fiber->start()
#8 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop.php(406): Revolt\EventLoop\Internal\AbstractDriver->run()
#9 /home/xxxxxxxxxx/public_html/cron/Amphp/sms_send_select.php(473): Revolt\EventLoop::run()
#10 {main}
Next Amp\Parallel\Context\ContextException: Starting the process failed in /home/xxxxxxxxxx/public_html/php8/vendor/amphp/parallel/src/Context/ProcessContext.php:165
Stack trace:
#0 /home/xxxxxxxxxx/public_html/php8/vendor/amphp/parallel/src/Context/ProcessContextFactory.php(42): Amp\Parallel\Context\ProcessContext::start()
#1 /home/xxxxxxxxxx/public_html/php8/vendor/amphp/parallel/src/Context/DefaultContextFactory.php(39): Amp\Parallel\Context\ProcessContextFactory->start()
#2 /home/xxxxxxxxxx/public_html/cron/Amphp/sms_send_select.php(434): Amp\Parallel\Context\DefaultContextFactory->start()
#3 /home/xxxxxxxxxx/public_html/php8/vendor/amphp/amp/src/functions.php(33): {closure}()
#4 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Amp\{closure}()
#5 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
#6 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#7 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(171): Fiber->throw()
#8 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Revolt\EventLoop\Internal\DriverSuspension::Revolt\EventLoop\Internal\{closure}()
#9 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(616): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
#10 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#11 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(497): Fiber->resume()
#12 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(553): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks()
#13 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#14 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(113): Fiber->start()
#15 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop.php(406): Revolt\EventLoop\Internal\AbstractDriver->run()
#16 /home/xxxxxxxxxx/public_html/cron/Amphp/sms_send_select.php(473): Revolt\EventLoop::run()
#17 {main}
Next Amp\Future\UnhandledFutureError: Unhandled future: Amp\Parallel\Context\ContextException: "Starting the process failed"; Await the Future with Future::await() before the future is destroyed or use Future::ignore() to suppress this exception. Enable assertions and set AMP_DEBUG=true in the process environment to track its origin. in /home/xxxxxxxxxx/public_html/php8/vendor/amphp/amp/src/Internal/FutureState.php:53
Stack trace:
#0 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Amp\Internal\FutureState->__destruct()
#1 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(562): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
#2 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#3 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php(171): Fiber->throw()
#4 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(425): Revolt\EventLoop\Internal\DriverSuspension::Revolt\EventLoop\Internal\{closure}()
#5 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(616): Revolt\EventLoop\Internal\AbstractDriver->invokeMicrotasks()
#6 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#7 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(497): Fiber->resume()
#8 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(553): Revolt\EventLoop\Internal\AbstractDriver->invokeCallbacks()
#9 [internal function]: Revolt\EventLoop\Internal\AbstractDriver->Revolt\EventLoop\Internal\{closure}()
#10 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(113): Fiber->start()
#11 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop.php(406): Revolt\EventLoop\Internal\AbstractDriver->run()
#12 /home/xxxxxxxxxx/public_html/cron/Amphp/sms_send_select.php(473): Revolt\EventLoop::run()
#13 {main}
Next Revolt\EventLoop\UncaughtThrowable: Uncaught Amp\Future\UnhandledFutureError thrown in event loop callback Amp\Internal\FutureState::Amp\Internal\{closure} defined in /home/xxxxxxxxxx/public_html/php8/vendor/amphp/amp/src/Internal/FutureState.php:54; use Revolt\EventLoop::setErrorHandler() to gracefully handle such exceptions: Unhandled future: Amp\Parallel\Context\ContextException: "Starting the process failed"; Await the Future with Future::await() before the future is destroyed or use Future::ignore() to suppress this exception. Enable assertions and set AMP_DEBUG=true in the process environment to track its origin. in /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/UncaughtThrowable.php:13
Stack trace:
#0 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(400): Revolt\EventLoop\UncaughtThrowable::throwingCallback()
#1 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/Internal/AbstractDriver.php(116): Revolt\EventLoop\Internal\AbstractDriver::Revolt\EventLoop\Internal\{closure}()
#2 /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop.php(406): Revolt\EventLoop\Internal\AbstractDriver->run()
#3 /home/xxxxxxxxxx/public_html/cron/Amphp/sms_send_select.php(473): Revolt\EventLoop::run()
#4 {main}
thrown in /home/xxxxxxxxxx/public_html/php8/vendor/revolt/event-loop/src/EventLoop/UncaughtThrowable.php on line 13
this is my parrent code :
Amp\async(function () use ($args , $atomicrunningCoroutines, $pm_pid) {
PrintLog( 'add ' . $pm_pid );
$context = Amp\Parallel\Context\contextFactory()->start(__DIR__ . '/child/sms_send_select.php');
$context->send($args);
$returnValue = $context->join();
printf("%s processes exited with '%s'\n", $pm_pid , $returnValue);
});
Hi @parsibox!
This error is the result of the parent processing being unable to write to STDIN of the child process before the child process fails. I have no idea why that might be happening on your system. A quick Google search of the error you posted indicates it potentially could be due to a hardware issue or configuration/permission issue.
Do you have another system you could test on? Anything configured like a firewall or process watcher that could interfere?
Hi @parsibox!
This error is the result of the parent processing being unable to write to STDIN of the child process before the child process fails. I have no idea why that might be happening on your system. A quick Google search of the error you posted indicates it potentially could be due to a hardware issue or configuration/permission issue.
Do you have another system you could test on? Anything configured like a firewall or process watcher that could interfere?
in another system i do not get this error