View Issue Details

IDProjectCategoryView StatusLast Update
0002139XdebugCode Coveragepublic2022-11-24 17:32
Reportershyim Assigned To 
Status newResolutionopen 
PlatformGithub ActionOSUbuntuOS Version22.04
Product Version3.1.5 
Summary0002139: PHP crash on generating coverage report using PHPUnit

I am generating a code coverage in the CI using setup-php action and I got an segmentation fault while generating coverage.


Steps To Reproduce

composer install
bin/console system:setup point to an MySQL

/usr/bin/php -d memory_limit=-1 --configuration phpunit.xml.dist --exclude-group needsWebserver,quarantined --testsuite storefront --coverage-cobertura phpunit.coverage.storefront.xml

0x0000555555875f2c in ?? ()
(gdb) bt
#0 0x0000555555875f2c in ?? ()
#1 0x00005555558a1b2f in execute_ex ()
0000002 0x00007ffff566ab72 in xdebug_execute_ex (execute_data=0x7ffff5414020) at ./build-8.1/src/base/base.c:779
0000003 0x000055555582caac in zend_call_function ()
0000004 0x000055555582cd79 in _call_user_function_impl ()
0000005 0x00005555557f3e36 in ?? ()
0000006 0x00005555557ecca4 in _php_stream_free ()
0000007 0x00005555557ecf46 in ?? ()
0000008 0x0000555555850325 in ?? ()
0000009 0x00005555558508dc in ?? ()
0000010 0x000055555582afec in zend_shutdown_executor_values ()
0000011 0x000055555582b0c3 in ?? ()
0000012 0x000055555583afe3 in zend_deactivate ()
0000013 0x00005555557d6d86 in php_request_shutdown ()
0000014 0x0000555555922fa0 in ?? ()
0000015 0x0000555555679f78 in ?? ()
0000016 0x00007ffff7639083 in __libc_start_main (main=0x555555679b70, argc=18, argv=0x7fffffffcef8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffcee8) at ../csu/libc-start.c:308
0000017 0x000055555567a74e in _start ()

We use also Library which does Crazy stuff with file stream wrapper. Maybe that triggers it?

TagsNo tags attached.
Operating System
PHP Version8.1.10-8.1.19



2022-11-23 22:32

reporter   ~0006451

Program received signal SIGSEGV, Segmentation fault.
ZEND_CALL_TRAMPOLINE_SPEC_OBSERVER_HANDLER () at ./Zend/zend_vm_execute.h:3458
3458 ./Zend/zend_vm_execute.h: No such file or directory.
(gdb) bt
#0 ZEND_CALL_TRAMPOLINE_SPEC_OBSERVER_HANDLER () at ./Zend/zend_vm_execute.h:3458
#1 0x00005555558a1b2f in execute_ex (ex=0x7ffff5414020) at ./Zend/zend_vm_execute.h:55910
0000002 0x00007ffff566ab72 in xdebug_execute_ex (execute_data=0x7ffff5414020) at ./build-8.1/src/base/base.c:779
0000003 0x000055555582caac in zend_call_function (fci=<optimized out>, fci_cache=<optimized out>) at ./Zend/zend_execute_API.c:908
0000004 0x000055555582cd79 in _call_user_function_impl (object=<optimized out>, function_name=function_name@entry=0x7fffffffaaf0, retval_ptr=retval_ptr@entry=0x7fffffffab00, param_count=param_count@entry=0, params=params@entry=0x0, named_params=named_params@entry=0x0)
at ./Zend/zend_execute_API.c:708
0000005 0x00005555557f3e36 in php_userstreamop_close (stream=<optimized out>, close_handle=<optimized out>) at ./Zend/zend_types.h:556
0000006 0x00005555557ecca4 in _php_stream_free (stream=<optimized out>, close_options=close_options@entry=11) at ./main/streams/streams.c:474
0000007 0x00005555557ecf46 in stream_resource_regular_dtor (rsrc=<optimized out>) at ./main/streams/streams.c:1665
0000008 0x0000555555850325 in zend_resource_dtor (res=<optimized out>) at ./Zend/zend_list.c:73
0000009 0x00005555558508dc in zend_close_rsrc_list (ht=0x555555aba870 <executor_globals+560>) at ./Zend/zend_list.c:224
0000010 0x000055555582afec in zend_shutdown_executor_values (fast_shutdown=fast_shutdown@entry=true) at ./Zend/zend_execute_API.c:270
0000011 0x000055555582b0c3 in shutdown_executor () at ./Zend/zend_execute_API.c:403
0000012 0x000055555583afe3 in zend_deactivate () at ./Zend/zend.c:1271
0000013 0x00005555557d6d86 in php_request_shutdown (dummy=dummy@entry=0x0) at ./main/main.c:1847
0000014 0x0000555555922fa0 in do_cli (argc=18, argv=0x555555ad57b0) at ./sapi/cli/php_cli.c:1135
0000015 0x0000555555679f78 in main (argc=18, argv=0x555555ad57b0) at ./sapi/cli/php_cli.c:1367

Back trace with symbols.

Created also a Coredump using GDB if it helps, but it is 4,7GB


2022-11-23 22:47

administrator   ~0006452

Yeah, don't send me that core dump :-) I'll see if I can reproduce this tomorrow. Can you add your php -i output though please as an attachment?


2022-11-23 22:51

reporter   ~0006453

Here is the PHP info Thanks! :)


2022-11-24 17:32

administrator   ~0006455

I had to start the phpunit run differently:

XDEBUG_MODE=coverage php -d memory_limit=-1 ./vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group needsWebserver,quarantined --testsuite storefront --coverage-cobertura phpunit.coverage.storefront.xml

It's been running for a while now, but no crash yet. From your backtrace I can see it's on request shutdown... so I am going to have to wait for that.

Issue History

Date Modified Username Field Change
2022-11-23 22:06 shyim New Issue
2022-11-23 22:32 shyim Note Added: 0006451
2022-11-23 22:47 derick Note Added: 0006452
2022-11-23 22:51 shyim Note Added: 0006453
2022-11-24 17:32 derick Note Added: 0006455