View Issue Details

IDProjectCategoryView StatusLast Update
0002235XdebugUncategorizedpublic2024-02-12 19:32
Reporterclaude-cp Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionduplicate 
Product Version3.3.1 
Summary0002235: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
Description

With xdebug enabled, always getting signal 11:SIGSEGV when running integration tests, but not unit tests.
Unfortunately, I cannot provide sample code as it is from a private repository, but I can describe the conditions under which it was happening.

This might be moot without specific reproducible code AND because the conditions are in combination with certain external libraries.
But I have lost significant time trying to get my local app to work again, did not even know it was xdebug at fault initially, so I am reporting it, hoping it can be looked into.

Steps To Reproduce
  • php 8.1.20
  • nginx 1.16
  • xdebug 3.3.1
  • symfony 5.4.11
  • phpunit 9.5.21

Issue happening with any integration test, any test extending KernelTestCase from symfony, that needed to actually start the symfony kernel.
Unit tests (extending PHPUnit/TestCase), did not experience the issue at all, and I was able to use xdebug normally, and place breakpoints in the test, or in src.

As soon as I capped xdebug version from 3.3.1 to 3.2.2 (since that is what my other colleagues had), the segfault went away entirely, and I was able to use xdebug again, normally.

As for reproducibility, it was always happening with any integration test, although not always at the same spot: sometimes it was crashing even before the first line of code in the test where I had a breakpoint, and on other tests (or if I recreated the docker containers), it would maybe crash at 30% of the test, or even 50%. But still, it was always happening, and once it was happening, it would keep happening in the same spot, until recreating the docker containers again.

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

Relationships

duplicate of 0002242 assignedderick process always segfault for some requests 

Activities

dimadeush

2024-01-12 22:58

reporter   ~0006773

It seems that latest xdebug release has bug. I can see the same issue with latest php 8.3.1.
Step to reproduce - just see CI results here - https://github.com/systemsdk/docker-symfony-api/actions/runs/7508276172/job/20443430226 (exit code 139)
Without xdebug everything is ok.

derick

2024-01-16 11:12

administrator   ~0006783

I am going to need more information this. Most likely, a backtrace is going to be a necessity at least.

Can you please read https://xdebug.org/reporting-bugs#crash and provide the information? Let me know if you have questions as to how to do this.

dimadeush

2024-02-04 15:39

reporter   ~0006829

Program received signal SIGSEGV, Segmentation fault.
fetch_zval_from_symbol_table (value_in=value_in@entry=0x7fffd8394dd0, name=0x55b364fd1310 "returnEarly", name_length=<optimized out>, type=<optimized out>,
ccn=ccn@entry=0x0, ccnl=<optimized out>, cce=0x0) at /tmp/pear/temp/xdebug/src/lib/var.c:435
435 /tmp/pear/temp/xdebug/src/lib/var.c: No such file or directory.
(gdb) bt full
#0 fetch_zval_from_symbol_table (value_in=value_in@entry=0x7fffd8394dd0, name=0x55b364fd1310 "returnEarly", name_length=<optimized out>, type=<optimized out>,
ccn=ccn@entry=0x0, ccnl=<optimized out>, cce=0x0) at /tmp/pear/temp/xdebug/src/lib/var.c:435
i = 0
hash_value = 13892113964050252322
opa = <optimized out>
CV = <optimized out>
ht = <optimized out>
element = 0x55b364fd2e60 "returnEarly"
element_length = 11
zpp = <optimized out>
free_duplicated_name = 0
myht = 0x0
orig_value_in = 0x7fffd8394dd0
tmp_retval = {value = {lval = 32, dval = 1.5810100666919889e-322, counted = 0x20, str = 0x20, arr = 0x20, obj = 0x20, res = 0x20, ref = 0x20, ast = 0x20,
zv = 0x20, ptr = 0x20, ce = 0x20, func = 0x20, ww = {w1 = 32, w2 = 0}}, u1 = {type_info = 0, v = {type = 0 '\000', type_flags = 0 '\000', u = {extra = 0}}},
u2 = {next = 0, cache_slot = 0, opline_num = 0, lineno = 0, num_args = 0, fe_pos = 0, fe_iter_idx = 0, guard = 0, constant_flags = 0, extra = 0}}
#1 0x00007f49d0c321e0 in xdebug_get_php_symbol (retval=0x7fffd8394dd0, name=<optimized out>) at /tmp/pear/temp/xdebug/src/lib/var.c:848
found = <optimized out>
state = <optimized out>
ptr = <optimized out>
ctr = 11
keyword = <optimized out>
keyword_end = <optimized out>
type = <optimized out>
current_classname = 0x0
current_ce = <optimized out>
cc_length = <optimized out>
quotechar = <optimized out>
0000002 0x00007f49d0c4b564 in zval_from_stack_add_frame_variables (opa=0x55b364eed350, symbols=<optimized out>, edata=0x55b36355cb70, frame=0x55b364fd0d70)
at /tmp/pear/temp/xdebug/src/develop/stack.c:432
symbol_name = 0x55b3651bacc0
symbol = {value = {lval = 1, dval = 4.9406564584124654e-324, counted = 0x1, str = 0x1, arr = 0x1, obj = 0x1, res = 0x1, ref = 0x1, ast = 0x1, zv = 0x1,
ptr = 0x1, ce = 0x1, func = 0x1, ww = {w1 = 1, w2 = 0}}, u1 = {type_info = 0, v = {type = 0 '\000', type_flags = 0 '\000', u = {extra = 0}}}, u2 = {
next = 0, cache_slot = 0, opline_num = 0, lineno = 0, num_args = 0, fe_pos = 0, fe_iter_idx = 0, guard = 0, constant_flags = 0, extra = 0}}
j = 0
variables = {value = {lval = 94228971160752, dval = 4.6555297493493132e-310, counted = 0x55b3645a84b0, str = 0x55b3645a84b0, arr = 0x55b3645a84b0,
obj = 0x55b3645a84b0, res = 0x55b3645a84b0, ref = 0x55b3645a84b0, ast = 0x55b3645a84b0, zv = 0x55b3645a84b0, ptr = 0x55b3645a84b0, ce = 0x55b3645a84b0,
func = 0x55b3645a84b0, ww = {w1 = 1683653808, w2 = 21939}}, u1 = {type_info = 775, v = {type = 7 '\a', type_flags = 3 '\003', u = {extra = 0}}}, u2 = {
next = 0, cache_slot = 0, opline_num = 0, lineno = 0, num_args = 0, fe_pos = 0, fe_iter_idx = 0, guard = 0, constant_flags = 0, extra = 0}}
0000003 zval_from_stack_add_frame (output=0x7f49d0c6e498 <xdebug_globals+1048>, fse=0x55b3644d7ea0, edata=0x55b36355cb70, add_local_vars=<optimized out>,
params_as_values=<optimized out>) at /tmp/pear/temp/xdebug/src/develop/stack.c:467
frame = <optimized out>
0000004 0x00007f49d0c4b97f in zval_from_stack (output=output@entry=0x7f49d0c6e498 <xdebug_globals+1048>, add_local_vars=add_local_vars@entry=true,
params_as_values=params_as_values@entry=true) at /tmp/pear/temp/xdebug/src/develop/stack.c:495
--Type <RET> for more, q to quit, c to continue without paging--RET
fse = 0x55b3644d7ea0
next_fse = 0x55b3644d7f90
i = 22
0000005 0x00007f49d0c4dc37 in xdebug_develop_throw_exception_hook (exception=exception@entry=0x55b3651c66b0, file=file@entry=0x55b3651c6708, line=line@entry=0x55b3651c6718,
code=code@entry=0x55b3651c66f8, code_str=code_str@entry=0x0, message=message@entry=0x55b3651c66d8) at /tmp/pear/temp/xdebug/src/develop/stack.c:1252
exception_ce = 0x55b363428460
exception_trace = <optimized out>
tmp_str = {l = 89628, a = 90342,
d = 0x55b3651ec560 "\nReflectionException: Method Doctrine\DBAL\Platforms\AbstractPlatform::hasNativeJsonType does not have a prototype in /var/www/html/vendor/friendsofphp/proxy-manager-lts/src/ProxyManager/Generator/Met"...}
z_previous_exception = <optimized out>
z_last_exception_slot = <optimized out>
z_previous_trace = <optimized out>
previous_exception_obj = <optimized out>
dummy = {value = {lval = 140736821022528, dval = 6.953322837213922e-310, counted = 0x7fffd8394f40, str = 0x7fffd8394f40, arr = 0x7fffd8394f40,
obj = 0x7fffd8394f40, res = 0x7fffd8394f40, ref = 0x7fffd8394f40, ast = 0x7fffd8394f40, zv = 0x7fffd8394f40, ptr = 0x7fffd8394f40, ce = 0x7fffd8394f40,
func = 0x7fffd8394f40, ww = {w1 = 3627634496, w2 = 32767}}, u1 = {type_info = 3551661711, v = {type = 143 '\217', type_flags = 14 '\016', u = {
extra = 54194}}}, u2 = {next = 32585, cache_slot = 32585, opline_num = 32585, lineno = 32585, num_args = 32585, fe_pos = 32585, fe_iter_idx = 32585,
guard = 32585, constant_flags = 32585, extra = 32585}}
0000006 0x00007f49d0c26007 in xdebug_throw_exception_hook (exception=0x55b3651c66b0) at /tmp/pear/temp/xdebug/src/base/base.c:1580
code = 0x55b3651c66f8
message = 0x55b3651c66d8
file = 0x55b3651c6708
line = 0x55b3651c6718
exception_ce = <optimized out>
code_str = 0x0
dummy = {value = {lval = 139955012034688, dval = 6.9146963409637559e-310, counted = 0x7f49d0c6e080 <xdebug_globals>, str = 0x7f49d0c6e080 <xdebug_globals>,
arr = 0x7f49d0c6e080 <xdebug_globals>, obj = 0x7f49d0c6e080 <xdebug_globals>, res = 0x7f49d0c6e080 <xdebug_globals>, ref = 0x7f49d0c6e080 <xdebug_globals>,
ast = 0x7f49d0c6e080 <xdebug_globals>, zv = 0x7f49d0c6e080 <xdebug_globals>, ptr = 0x7f49d0c6e080 <xdebug_globals>, ce = 0x7f49d0c6e080 <xdebug_globals>,
func = 0x7f49d0c6e080 <xdebug_globals>, ww = {w1 = 3502694528, w2 = 32585}}, u1 = {type_info = 1436577792, v = {type = 0 '\000', type_flags = 112 'p', u = {
extra = 21920}}}, u2 = {next = 2924062523, cache_slot = 2924062523, opline_num = 2924062523, lineno = 2924062523, num_args = 2924062523,
fe_pos = 2924062523, fe_iter_idx = 2924062523, guard = 2924062523, constant_flags = 2924062523, extra = 2924062523}}
0000007 xdebug_throw_exception_hook (exception=0x55b3651c66b0) at /tmp/pear/temp/xdebug/src/base/base.c:1532
code = <optimized out>
message = <optimized out>
file = <optimized out>
line = <optimized out>
exception_ce = <optimized out>
code_str = 0x0
dummy = <optimized out>
0000008 0x000055b36163e14e in zend_throw_exception_internal ()
No symbol table info available.
0000009 0x000055b36163e25d in ?? ()
No symbol table info available.

dimadeush

2024-02-04 15:42

reporter   ~0006830

Additional info about php and other:
PHP 8.3.2 (cli) (built: Feb 1 2024 02:04:11) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.2, Copyright (c) Zend Technologies
with Zend OPcache v8.3.2, Copyright (c), by Zend Technologies
with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans
make[1]: Leaving directory '/var/www/docker-symfony-api/htdocs'
make[1]: Entering directory '/var/www/docker-symfony-api/htdocs'


Symfony


Version 6.4.2
Long-Term Support Yes
End of maintenance 11/2026 (in +1030 days)
End of life 11/2027 (in +1395 days)


Kernel


Type App\Kernel
Environment dev
Debug true
Charset UTF-8
Cache directory ./var/cache/dev (11.7 MiB)
Build directory ./var/cache/dev (11.7 MiB)
Log directory ./var/log (360 KiB)


PHP


Version 8.3.2
Architecture 64 bits
Intl locale en_US_POSIX
Timezone UTC (2024-02-04T15:41:59+00:00)
OPcache true
APCu false
Xdebug true


Thanks in Advance

derick

2024-02-08 14:32

administrator   ~0006842

This seems to be a duplicate of 0002242, which has the better backtrace and information. Please "subscribe" to that issue to get updates.

dimadeush

2024-02-12 19:32

reporter   ~0006847

Temporary solutions:
1)Do not use develop mode, f.e. only xdebug.mode = coverage,debug
2)Set APP_DEBUG=0 inside .env if you are using Symfony

@derick - I can see segmentation fault for all version of xdebug since alpha 3.3.*, latest branch 3.3 https://github.com/xdebug/xdebug/tree/xdebug_3_3 the same issue.

Issue History

Date Modified Username Field Change
2024-01-12 11:23 claude-cp New Issue
2024-01-12 22:58 dimadeush Note Added: 0006773
2024-01-16 11:12 derick Assigned To => derick
2024-01-16 11:12 derick Status new => feedback
2024-01-16 11:12 derick Note Added: 0006783
2024-02-04 15:39 dimadeush Note Added: 0006829
2024-02-04 15:42 dimadeush Note Added: 0006830
2024-02-08 14:32 derick Status feedback => resolved
2024-02-08 14:32 derick Resolution open => duplicate
2024-02-08 14:32 derick Note Added: 0006842
2024-02-08 14:32 derick Relationship added duplicate of 0002242
2024-02-12 19:32 dimadeush Note Added: 0006847