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.

  • Can't launch selenium tests inside container, WebDriverException:Chrome failed to start: exited abnormally
  • How do you set up an elastic search cluster with multiple master nodes in docker compose?
  • how can I create a data-container only using docker-compose.yml?
  • docker websphere can't get the admin console
  • Secure Admin must be enabled to access the DAS remotely - Acess Glassfish Admin Console with Docker
  • Docker daemon config file on boot2docker / docker-machine / Docker Toolbox
  • 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?

  • Starting services at container startup
  • Issue connecting to Docker container
  • /bin/sh: 1: ./configure: not found - dockerfile
  • How to route to host in docker container during 'docker build'
  • Docker - Unable to push image to private registry
  • docker plugin not running parallel builds
  • 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.