View Issue Details

IDProjectCategoryView StatusLast Update
0002078XdebugUncategorizedpublic2023-08-01 10:38
Reporterpoursadeqi Assigned Toderick  
PriorityhighSeveritycrashReproducibilityrandom
Status resolvedResolutionunable to reproduce 
PlatformLinuxOSAlpine LinuxOS Version3.13.2
Product Version3.0.4 
Summary0002078: PHP with XDebug throw segmentation faults when running tests
Description

Hi, The other day we faced a wired segmentation fault when running the test in pipeline.
The bug is something like https://bugs.xdebug.org/view.php?id=1965 bug. and it crashesh exactly on the same line.
The bug really hard to regenerate and it's totally random. sometimes is working fine and sometimes out of the blue gets the segmentation fault.
I tried to trace with xdebug to see what line exactly causes the seg fault but when trace mode is enabled it works fine.
I tried with diffrent version of xdebug but including github master version but I got seg fault again.
I tried to update mongodb driver same.
I managed to get the full bt using gdb and getting valgrind's output. but i cannot provide an script to reproduce the bug. because our code stack is really bug and I cannot regenerate the same error using an small script. but I hope you can get some ideas using gdb output and valgrind.

Additional Information

/application # uname -a
Linux 4de70ab04c3a 5.13.0-35-generic 00000400000020:0000020.04.1-Ubuntu SMP Mon Mar 7 09:18:32 UTC 2022 x86_64 Linux

/application # php -v
PHP 8.0.2 (cli) (built: Feb 18 2021 00:18:34) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.2, Copyright (c) Zend Technologies
with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans

TagsNo tags attached.
Attached Files
gdb.bt.full.txt (12,553 bytes)   
Thread 1 "php" received signal SIGSEGV, Segmentation fault.
0x00005577cb90846c in zend_call_function ()
(gdb) bt full
#0  0x00005577cb90846c in zend_call_function ()
No symbol table info available.
#1  0x00005577cb909095 in zend_call_known_function ()
No symbol table info available.
#2  0x00005577cb997a94 in zend_objects_destroy_object ()
No symbol table info available.
#3  0x00005577cb99c373 in zend_objects_store_del ()
No symbol table info available.
#4  0x00007fac78091c1d in function_stack_entry_dtor (elem=0x7fac75e525f8) at /tmp/pear/temp/xdebug/src/base/base.c:122
        i = <optimized out>
        e = 0x7fac75e525f8
#5  0x00007fac78092d83 in xdebug_vector_pop (v=0x7fac76e1dd30) at /tmp/pear/temp/xdebug/src/lib/vector.h:64
No locals.
#6  xdebug_execute_ex (execute_data=0x7fac73431010) at /tmp/pear/temp/xdebug/src/base/base.c:792
        op_array = <optimized out>
        edata = <optimized out>
        fse = 0x7fac75e525f8
        function_nr = 1131902
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#7  0x00005577cb991e72 in zend_generator_resume ()
No symbol table info available.
#8  0x00007fac780935c5 in xdebug_execute_internal (current_execute_data=0x7fac76f31e60, return_value=0x7ffd7c7b39e8) at /tmp/pear/temp/xdebug/src/base/base.c:883
        edata = <optimized out>
        fse = 0x7fac75e52530
        function_nr = 1131901
        function_call_traced = <optimized out>
        restore_error_handler_situation = 0
        tmp_error_cb = 0x0
#9  0x00005577cb62a37b in ?? ()
No symbol table info available.
#10 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#11 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f31da0) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac749b7218
        edata = <optimized out>
        fse = 0x7fac76f31da0
        function_nr = 1131899
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#12 0x00005577cb908c74 in zend_call_function ()
No symbol table info available.
#13 0x00005577cb909095 in zend_call_known_function ()
No symbol table info available.
#14 0x00005577cb981d39 in zend_call_method ()
No symbol table info available.
#15 0x00005577cb9820cb in zend_user_it_move_forward ()
No symbol table info available.
#16 0x00005577cb7f3569 in spl_iterator_apply ()
No symbol table info available.
#17 0x00005577cb7f368c in ?? ()
No symbol table info available.
#18 0x00007fac780935c5 in xdebug_execute_internal (current_execute_data=0x7fac76f31d40, return_value=0x7fac76f31cb0) at /tmp/pear/temp/xdebug/src/base/base.c:883
        edata = <optimized out>
        fse = 0x7fac75e523a0
        function_nr = 1131791
        function_call_traced = <optimized out>
        restore_error_handler_situation = 0
        tmp_error_cb = 0x0
#19 0x00005577cb62a620 in ?? ()
No symbol table info available.
#20 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#21 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f31ad0) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac748107a0
        edata = <optimized out>
        fse = 0x7fac76f31ad0
        function_nr = 1131788
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#22 0x00005577cb62a5b2 in ?? ()
No symbol table info available.
--Type <RET> for more, q to quit, c to continue without paging--
#23 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#24 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f31a40) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac748106b0
        edata = <optimized out>
        fse = 0x7fac76f31a40
        function_nr = 1131787
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#25 0x00005577cb62a5b2 in ?? ()
No symbol table info available.
#26 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#27 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f31960) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac74b903f8
        edata = <optimized out>
        fse = 0x7fac76f31960
        function_nr = 1131786
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#28 0x00005577cb62a306 in ?? ()
No symbol table info available.
#29 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#30 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f318b0) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac765325b8
        edata = <optimized out>
        fse = 0x7fac76f318b0
        function_nr = 1131784
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#31 0x00005577cb62a306 in ?? ()
No symbol table info available.
#32 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#33 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f317b0) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac76622f48
        edata = <optimized out>
        fse = 0x7fac76f317b0
        function_nr = 1131781
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#34 0x00005577cb62a306 in ?? ()
No symbol table info available.
#35 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#36 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f31470) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac761c9ab0
        edata = <optimized out>
        fse = 0x7fac76f31470
        function_nr = 1130438
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#37 0x00005577cb62a5b2 in ?? ()
No symbol table info available.
#38 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#39 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f30f40) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac7661faa0
        edata = <optimized out>
        fse = 0x7fac76f30f40
        function_nr = 1130433
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#40 0x00005577cb62a5b2 in ?? ()
No symbol table info available.
#41 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#42 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f307a0) at /tmp/pear/temp/xdebug/src/base/base.c:765
--Type <RET> for more, q to quit, c to continue without paging--
        op_array = 0x7fac7661e060
        edata = <optimized out>
        fse = 0x7fac76f307a0
        function_nr = 1126109
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#43 0x00005577cb62a306 in ?? ()
No symbol table info available.
#44 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#45 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f2f5d0) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac75d0f8f0
        edata = <optimized out>
        fse = 0x7fac76f2f5d0
        function_nr = 1126080
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#46 0x00005577cb62a306 in ?? ()
No symbol table info available.
#47 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#48 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f2e980) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac7661ccb0
        edata = <optimized out>
        fse = 0x7fac76f2e980
        function_nr = 1126076
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#49 0x00005577cb62a306 in ?? ()
No symbol table info available.
#50 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#51 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f2e280) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac766b5300
        edata = <optimized out>
        fse = 0x7fac76f2e280
        function_nr = 1124333
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#52 0x00005577cb62a306 in ?? ()
No symbol table info available.
#53 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#54 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f2db80) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac766b5300
        edata = <optimized out>
        fse = 0x7fac76f2db80
        function_nr = 198150
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#55 0x00005577cb62a306 in ?? ()
No symbol table info available.
#56 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#57 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f2d480) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac766b5300
        edata = <optimized out>
        fse = 0x7fac76f2d480
        function_nr = 193568
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#58 0x00005577cb62a306 in ?? ()
No symbol table info available.
#59 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#60 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f2af60) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac75ea4b18
        edata = <optimized out>
        fse = 0x7fac76f2af60
--Type <RET> for more, q to quit, c to continue without paging--
        function_nr = 125790
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#61 0x00005577cb62a5b2 in ?? ()
No symbol table info available.
#62 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#63 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f2ab90) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac7683f038
        edata = <optimized out>
        fse = 0x7fac76f2ab90
        function_nr = 825
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#64 0x00005577cb62a5b2 in ?? ()
No symbol table info available.
#65 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#66 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f2aa80) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac7683ef48
        edata = <optimized out>
        fse = 0x7fac76f2aa80
        function_nr = 824
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#67 0x00005577cb62a306 in ?? ()
No symbol table info available.
#68 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#69 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f2a8b0) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac76e09490
        edata = <optimized out>
        fse = 0x7fac76f2a8b0
        function_nr = 2
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#70 0x00005577cb95a3d4 in ?? ()
No symbol table info available.
#71 0x00005577cb975c4e in execute_ex ()
No symbol table info available.
#72 0x00007fac78092d16 in xdebug_execute_ex (execute_data=0x7fac76f2a730) at /tmp/pear/temp/xdebug/src/base/base.c:765
        op_array = 0x7fac770803e0
        edata = <optimized out>
        fse = 0x7fac76f2a730
        function_nr = 0
        code_coverage_function_name = 0x0
        code_coverage_filename = 0x0
        code_coverage_init = 0
#73 0x00005577cb97e71f in zend_execute ()
No symbol table info available.
#74 0x00005577cb9165c5 in zend_execute_scripts ()
No symbol table info available.
#75 0x00005577cb8b2d92 in php_execute_script ()
No symbol table info available.
#76 0x00005577cb9a3aab in ?? ()
No symbol table info available.
#77 0x00005577cb64160b in ?? ()
No symbol table info available.
#78 0x00007fac788eea03 in ?? () from /lib/ld-musl-x86_64.so.1
No symbol table info available.
#79 0x00007fac788ee9dc in ?? () from /lib/ld-musl-x86_64.so.1
No symbol table info available.
#80 0x00007ffd7c7b8db0 in ?? ()
No symbol table info available.
#81 0x0000000000000000 in ?? ()
No symbol table info available.
(gdb) 

gdb.bt.full.txt (12,553 bytes)   
valgrind.log (527,409 bytes)
Operating Systemdocker: php:8.0.12-cli-alpine3.14
PHP Version8.0.10-8.0.19

Activities

derick

2022-03-25 15:24

administrator   ~0006252

Can you please upgrade to the latest Xdebug version (3.1.3), and see if that addresses the problem? I have fixed several crash bugs since 3.0.4.

poursadeqi

2022-03-25 15:35

reporter   ~0006253

I have already tested it with 3.1.3 also, I even tested with master branch and 3_1 branch but still crashes.

derick

2022-03-28 17:15

administrator   ~0006259

Can you please provide a short reproducible script in that case?

poursadeqi

2022-03-28 19:59

reporter   ~0006261

unfortunately because it's totally random and our code stack is quite complicated I cannot regenerate it. each time it happens in a different test case.

derick

2022-04-13 15:04

administrator   ~0006276

Sorry, but I don't have enough information here to do anything about this. It seems to have to do something with generators, but without a reproducible case I can do little. Are you sure you can't make one?

derick

2022-05-11 13:40

administrator   ~0006298

Hi, can you please provide the requested information?

poursadeqi

2022-05-11 14:41

reporter   ~0006299

Hi derick, I tried to reproduce it but unfortunately because it's totally random, I couldn't reproduce it in with a small code

derick

2023-08-01 10:38

administrator   ~0006627

I still can't reproduce this, and there has not been more information. As I haven't seen any other bug reports that are similar, I am therefore closing this issue.

Issue History

Date Modified Username Field Change
2022-03-24 07:51 poursadeqi New Issue
2022-03-24 07:51 poursadeqi Issue generated from: 0002074
2022-03-25 15:24 derick Assigned To => derick
2022-03-25 15:24 derick Status new => feedback
2022-03-25 15:24 derick Note Added: 0006252
2022-03-25 15:35 poursadeqi Note Added: 0006253
2022-03-25 15:35 poursadeqi Status feedback => assigned
2022-03-28 17:15 derick Status assigned => feedback
2022-03-28 17:15 derick Note Added: 0006259
2022-03-28 19:59 poursadeqi Note Added: 0006261
2022-03-28 19:59 poursadeqi Status feedback => assigned
2022-04-13 15:04 derick Status assigned => feedback
2022-04-13 15:04 derick Note Added: 0006276
2022-05-11 13:40 derick Note Added: 0006298
2022-05-11 14:41 poursadeqi Note Added: 0006299
2022-05-11 14:41 poursadeqi Status feedback => assigned
2023-08-01 10:38 derick Status assigned => resolved
2023-08-01 10:38 derick Resolution open => unable to reproduce
2023-08-01 10:38 derick Note Added: 0006627