Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

haynesg's avatar

The process has been signaled with signal "11". when running tests

Hello everyone, everything good?

I'm having some problems since I updated my application's laravel from 9 to 10.

When I run the php artisan test tests it runs all the tests but an exit status of 1 is returned and this ends up affecting my CI in github actions..

However, when I run the test locally, it is intermittent, sometimes it works but with this exit status of 1, sometimes it gives me this sigterm error equal to 11.

I've tried everything I can to find the problem, but so far I haven't been successful... And I would like your help to find out what could be happening.

0 likes
5 replies
LaryAI's avatar
Level 58

Signal "11" usually indicates a segmentation fault, which is a common error that occurs when a program tries to access a memory location that it's not supposed to. This can be caused by a variety of issues, including bugs in PHP itself, extensions, or in your code.

Here are some steps you can take to troubleshoot and hopefully resolve the issue:

  1. Check for C Extensions: If you are using PHP extensions written in C, such as pdo_mysql, mbstring, or any other, make sure they are up-to-date and compatible with PHP 8 (which Laravel 10 requires).

  2. Update Dependencies: Ensure all your composer dependencies are up-to-date and compatible with Laravel 10. Run composer update to update them.

  3. Xdebug: If you are using Xdebug, try disabling it to see if the problem persists. Xdebug can sometimes cause segmentation faults due to bugs or misconfigurations.

  4. Environment Consistency: Ensure that your local environment is as close as possible to your CI environment in terms of PHP version, extensions, and configuration.

  5. PHP Version: Make sure you are using a stable version of PHP that is supported by Laravel 10. As of my knowledge cutoff date, Laravel 10 requires PHP 8.0 or higher.

  6. Testing in Isolation: Try running your tests in isolation or in smaller groups to determine if a specific test is causing the segmentation fault.

  7. Memory Limits: Check the memory limit in your php.ini file. Sometimes, increasing the memory limit can resolve the issue.

  8. Check Logs: Check the logs for any relevant error messages. Laravel logs can be found in storage/logs, and PHP errors might be logged in a different location depending on your configuration.

  9. Core Dump: If you have access to the system where the segmentation fault is occurring, you can enable core dumps to get more information about the crash. This is an advanced step and might require system administration knowledge.

  10. PHP Bug: If none of the above steps help, you might be encountering a bug in PHP itself. Check the PHP bug tracker for known issues.

Here's a sample command to run your tests in isolation, which might help you identify the problematic test if there is one:

php artisan test --filter=NameOfTheTest

If you continue to experience issues, you might need to provide more specific information about your environment, the exact error messages, and any relevant code or configuration to get more targeted help.

haynesg's avatar

My current stack is:

Laravel 10
Phpunit 10

Docker
php:8.3-fpm (docker image)

I've already researched a lot about this sigterm status 11, it's Linux Segmentation Fault, but I have no idea how to resolve this...

 Symfony\Component\Process\Exception\ProcessSignaledException 

  The process has been signaled with signal "11".

  at vendor/symfony/process/Process.php:434
    430▕             usleep(1000);
    431▕         }
    432▕ 
    433▕         if ($this->processInformation['signaled'] && $this->processInformation['termsig'] !== $this->latestSignal) {
  ➜ 434▕             throw new ProcessSignaledException($this);
    435▕         }
    436▕ 
    437▕         return $this->exitcode;
    438▕     }

      +14 vendor frames 

  15  artisan:35
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

Complete Traceback:

[2024-02-19 16:50:39] local.ERROR: The process has been signaled with signal "11". {"exception":"[object] (Symfony\Component\Process\Exception\ProcessSignaledException(code: 0): The process has been signaled with signal \"11\". at /app/vendor/symfony/process/Process.php:434)
[stacktrace]
#0 /app/vendor/symfony/process/Process.php(251): Symfony\Component\Process\Process->wait()
#1 /app/vendor/nunomaduro/collision/src/Adapters/Laravel/Commands/TestCommand.php(132): Symfony\Component\Process\Process->run(Object(Closure))
#2 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): NunoMaduro\Collision\Adapters\Laravel\Commands\TestCommand->handle()
#3 /app/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#4 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#5 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#6 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#7 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\Container\Container->call(Array)
#8 /app/vendor/symfony/console/Command/Command.php(326): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#9 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#10 /app/vendor/symfony/console/Application.php(1096): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /app/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(NunoMaduro\Collision\Adapters\Laravel\Commands\TestCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /app/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /app/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 {main}
"} 
mariaa's avatar

@haynesg Did you find any solution? I got the same error, at same place and have no idea how to solve it. It works in my local environment, but not in test environment.

haynesg's avatar

@mariaa So far I haven't been able to find the problem, I've already upgraded the Laravel version again to see if there was anything, nothing... I changed from PHPUnit to PestPHP and nothing either...

bartollo's avatar

Hi @haynesg and @mariaa ,

I encountered the same issue. Fortunately, I had two environments to compare. I found out that the problem was due to the absence of dev dependencies. One of the environments had run composer install --no-dev, which meant that some information wasn't included in the autoload files located in the vendor/composer directory. I resolved the issue by removing that parameter from the installation.

The files that were different between the working and non-working environments in the vendor/composer directory were:

autoload_classmap.php
autoload_files.php
autoload_namespaces.php
autoload_psr4.php
autoload_real.php
autoload_static.php
installed.json
installed.php

This solution was tested with:

php:8.3-fpm-bookworm
laravel/framework: 10.0
pestphp/pest: 2.35
pestphp/pest-plugin-laravel: 2.4

Please or to participate in this conversation.