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.
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,
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?
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.
- 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>