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 use multiple base images with Docker?
  • Using docker-compose with GELF log driver
  • Is it possible to pin the container to a remote machine instead of a new container instance?
  • Since docker shares host kernel, why most docker images contain the kernel stuff?
  • Dockerfile vs docker-compose.yml
  • Customer params in kubectl when run 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?

  • Is zap docker generate .xml report?
  • How to install and run postgress using docker-compose.yml version “1”
  • Why “https://get.docker.com/ubuntu” is a apt repository?
  • unable to run docker container using marathon
  • Why is crond failing to run a non-root crontab on alpine linux?
  • Why are Docker container images so large?
  • 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.

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