Segmentation Fault (core dumped) while running phpunit

Am getting this error Segmentation Fault (core dumped) when I try to run my unit tests using phpunit.

Am stuck with this for 2 days now since I don’t get a clue which is throwing this error.

  • How to run Swagger Spring Application using Jetty on Docker
  • Pull docker images from private registry on remote host?
  • No network on host machine when running a Docker container
  • docker compose yaml - command
  • Use docker-compose env variable in Dockerbuild file
  • Make pdb work with docker
  • My php version is,

    PHP 5.3.10-1ubuntu3.13 with Suhosin-Patch (cli) (built: Jul 7 2014 18:54:55)
    Copyright (c) 1997-2012 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

    and PHP unit version is,

    PHPUnit 3.7.25 by Sebastian Bergmann.

    and I run this command in my project root directory,
    > phpunit
    Configuration read from /var/www/[project root]/phpunit.xml.dist
    Segmentation fault (core dumped)

    P.S: I tried using Zend.enable_gc=0 but no luck.

    EDIT: My phpunit is running on a docker container and my DB is on a different container linked to the phpunit container. The docker container is built on a ubuntu 12.04. Is the error related to disk space or memory?

  • getting error /bin/sh: 1: source: not found
  • AWS EC2 Container Service Container Id, what does this mean?
  • Best practice for build / deployment of docker images
  • Docker Container management in production environment
  • NuGet with Mono on Linux: Error getting response stream
  • bin mounted to alpine container fails to run with /gogs not found
  • One Solution collect form web for “Segmentation Fault (core dumped) while running phpunit”

    I know that this question is too old but I am just answering it because recently I had the same problem. I tried all of the comments for your question but none solved my problem.

    I solved it adding the processUncoveredFilesFromWhitelist=”true” in whitelist tag inside filter.

    My scenario:

    • PHP 7
    • PHPUnit 5.7
    • Xdebug 2.4.0

    I tried a lot of different configurations as list each path inside my zf module, disable controllers tests, disable all tests and enable one by one, but I only solved it when open the PHPUnit filter example and see the processUncoveredFilesFromWhitelist=true that I never have seen before. After add this parameter, all tests run as expected.

        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">../src</directory>
                <directory suffix=".phtml">../view</directory>
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.