paratest: Occasional "This worker has crashed." errors
Hey, guys! π
I run my tests on the Codeship CI using ParaTest like this:
./vendor/bin/paratest --colors --runner WrapperRunner --exclude-group network
Everything works fine 49/50 of the times.
But, from time to time, occasionally I have this error (for different, random tests):
...........................
In BaseWorker.php line 97:
This worker has crashed.
Output:
----------------------
Worker starting
Executing: '/home/rof/src/github.com/foo/bar/ve
ndor/phpunit/phpunit/phpunit' '--exclude-group' 'network' '--configuration'
'/home/rof/src/github.com/foo/bar/phpunit.xml'
'--log-junit' '/tmp/PT_gvNGF0' 'Tests\Feature\Http\Controllers\Company\Com
panyMemberControllerTest'
'/home/rof/src/github.com/foo/bar/tests/Feature/Http/Controllers/Company/
CompanyMemberControllerTest.php'
----------------------
Bus error (core dumped)
paratest [-p|--processes PROCESSES] [-f|--functional] [--no-test-tokens] [-h|--help] [--coverage-clover COVERAGE-CLOVER] [--coverage-html COVERAGE-HTML] [--coverage-php COVERAGE-PHP] [--coverage-text] [--coverage-xml COVERAGE-XML] [-m|--max-batch-size MAX-BATCH-SIZE] [--filter FILTER] [--parallel-suite] [--passthru PASSTHRU] [--passthru-php PASSTHRU-PHP] [-v|--verbose VERBOSE] [--whitelist WHITELIST] [--phpunit PHPUNIT] [--runner RUNNER] [--bootstrap BOOTSTRAP] [-c|--configuration CONFIGURATION] [-g|--group GROUP] [--exclude-group EXCLUDE-GROUP] [--stop-on-failure] [--log-junit LOG-JUNIT] [--colors] [--testsuite [TESTSUITE]] [--path PATH] [--] [<path>]
Script ./vendor/bin/paratest --colors --runner WrapperRunner --exclude-group network handling the test:ci event returned with error code 1
If I just restart the build (after the error) - it works fine, so these are just some kind of random failures.
So, my questions are:
- Does this relate to the usage of the
--runner WrapperRunner
? If I remove it from the command, may it help? - On the Codeship, I have 32-64 available CPU cores, so there are a lot of parallel processes. May it be related to that big amount of the processes?
- Do you have any other suggestions on how can I avoid this error for sure?
Thank you!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 24 (3 by maintainers)
I am having the same issue on gitlab⦠works perfectly fine locally =`[ Any idea of what could this be?
Seems like I finally found a setup to reproduce the issue:
I created 5 classes with the following content:
And then ran paratest on the
Crash
directory with 5 parallel processes:In my specific case itβs indeed the
views
that are problematic. I solved the issue by appending the paratest token to thecompiled
directory, i.e.