View Issue Details

IDProjectCategoryView StatusLast Update
0002241XdebugStep Debuggingpublic2024-03-28 17:00
Reporterxedaxip791 Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionduplicate 
Product Version3.3.1 
Summary0002241: Segmentation fault - Symfony 6.2.1 - Sulu cms
Description

There is error, even after trying to deep dive into functions I was not able to find specific php function, when there is presented breakpoint (on any line of code that is after this function) the xdebug will crash

Steps To Reproduce

(this was tested only in phpstorm)

  • Set breakpoint inside file Sulu\Bundle\WebsiteBundle\Controller\DefaultController on first line inside indexAction ($response = $this->renderStructure...)
  • Open homepage
  • Make step over or resume program
  • Segment fault
Additional Information

This only occurrences when the breakpoint is pressented, when I remove the breakpoint and resume the apllication (even if I already landed on breakpoint) the Segment fault did not occurrences.

Also from time to time (this is not always possible to reproduce), the segment fault occurrences also when the breakpoint is set to disable.

I was trying to deep dive into specific line that is casing this error, because this step is online call on Sulu function renderStructure, but after lot of step into steps I did not managed to find it.

Versions:
phpstorm 2023.1.3

output of php -v
PHP 8.1.21 (cli) (built: Jul 8 2023 07:09:57) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.21, Copyright (c) Zend Technologies
with Zend OPcache v8.1.21, Copyright (c), by Zend Technologies
with Xdebug v3.3.1, Copyright (c) 2002-2023, by Derick Rethans

TagsNo tags attached.
Operating SystemUbuntu 20.04.2 LTS
PHP Version8.1.10-8.1.19

Relationships

duplicate of 0002229 resolvedderick Sigsegv when breakpoint is set 
duplicate of 0002252 acknowledgedderick Running phpunit in coverage triggers segfault in xdebug_branch_info_mark_reached 

Activities

xedaxip791

2024-01-26 12:49

reporter   ~0006815

Log from xdebug

log.txt (555,938 bytes)

xedaxip791

2024-01-26 13:02

reporter   ~0006816

Sorry for multiple messages, I found out this already https://xdebug.org/reporting-bugs

Here is also gdb and valgrind

valgrind.log (8,160 bytes)   
==23211== Memcheck, a memory error detector
==23211== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==23211== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==23211== Command: php -S 0.0.0.0:8000 -t public/ config/router.php
==23211== 
[Sun Jan 28 04:41:44 2024] PHP Warning:  Module "mbstring" is already loaded in Unknown on line 0
==23211== Conditional jump or move depends on uninitialised value(s)
==23211==    at 0x483EFB8: __strlen_sse2 (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==23211==    by 0x7540576: xdebug_explode (usefulstuff.c:105)
==23211==    by 0x753E425: read_systemd_private_tmp_directory (base.c:1285)
==23211==    by 0x753E5A8: xdebug_base_minit (base.c:1356)
==23211==    by 0x753C45F: zm_startup_xdebug (xdebug.c:570)
==23211==    by 0x753C45F: zm_startup_xdebug (xdebug.c:551)
==23211==    by 0x3F43E7: zend_startup_module_ex (in /usr/bin/php8.1)
==23211==    by 0x3F6529: zend_startup_module (in /usr/bin/php8.1)
==23211==    by 0x3FC7DB: ??? (in /usr/bin/php8.1)
==23211==    by 0x3E2D83: zend_llist_apply_with_del (in /usr/bin/php8.1)
==23211==    by 0x38C40A: php_module_startup (in /usr/bin/php8.1)
==23211==    by 0x22DF02: ??? (in /usr/bin/php8.1)
==23211==    by 0x5031082: (below main) (libc-start.c:308)
==23211== 
==23211== Conditional jump or move depends on uninitialised value(s)
==23211==    at 0x754051C: xdebug_memnstr (usefulstuff.c:145)
==23211==    by 0x7540620: xdebug_explode (usefulstuff.c:124)
==23211==    by 0x753E425: read_systemd_private_tmp_directory (base.c:1285)
==23211==    by 0x753E5A8: xdebug_base_minit (base.c:1356)
==23211==    by 0x753C45F: zm_startup_xdebug (xdebug.c:570)
==23211==    by 0x753C45F: zm_startup_xdebug (xdebug.c:551)
==23211==    by 0x3F43E7: zend_startup_module_ex (in /usr/bin/php8.1)
==23211==    by 0x3F6529: zend_startup_module (in /usr/bin/php8.1)
==23211==    by 0x3FC7DB: ??? (in /usr/bin/php8.1)
==23211==    by 0x3E2D83: zend_llist_apply_with_del (in /usr/bin/php8.1)
==23211==    by 0x38C40A: php_module_startup (in /usr/bin/php8.1)
==23211==    by 0x22DF02: ??? (in /usr/bin/php8.1)
==23211==    by 0x5031082: (below main) (libc-start.c:308)
==23211== 
==23211== Conditional jump or move depends on uninitialised value(s)
==23211==    at 0x4843C6F: strstr (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==23211==    by 0x753E452: read_systemd_private_tmp_directory (base.c:1294)
==23211==    by 0x753E5A8: xdebug_base_minit (base.c:1356)
==23211==    by 0x753C45F: zm_startup_xdebug (xdebug.c:570)
==23211==    by 0x753C45F: zm_startup_xdebug (xdebug.c:551)
==23211==    by 0x3F43E7: zend_startup_module_ex (in /usr/bin/php8.1)
==23211==    by 0x3F6529: zend_startup_module (in /usr/bin/php8.1)
==23211==    by 0x3FC7DB: ??? (in /usr/bin/php8.1)
==23211==    by 0x3E2D83: zend_llist_apply_with_del (in /usr/bin/php8.1)
==23211==    by 0x38C40A: php_module_startup (in /usr/bin/php8.1)
==23211==    by 0x22DF02: ??? (in /usr/bin/php8.1)
==23211==    by 0x5031082: (below main) (libc-start.c:308)
==23211== 
==23211== Conditional jump or move depends on uninitialised value(s)
==23211==    at 0x4843C77: strstr (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==23211==    by 0x753E452: read_systemd_private_tmp_directory (base.c:1294)
==23211==    by 0x753E5A8: xdebug_base_minit (base.c:1356)
==23211==    by 0x753C45F: zm_startup_xdebug (xdebug.c:570)
==23211==    by 0x753C45F: zm_startup_xdebug (xdebug.c:551)
==23211==    by 0x3F43E7: zend_startup_module_ex (in /usr/bin/php8.1)
==23211==    by 0x3F6529: zend_startup_module (in /usr/bin/php8.1)
==23211==    by 0x3FC7DB: ??? (in /usr/bin/php8.1)
==23211==    by 0x3E2D83: zend_llist_apply_with_del (in /usr/bin/php8.1)
==23211==    by 0x38C40A: php_module_startup (in /usr/bin/php8.1)
==23211==    by 0x22DF02: ??? (in /usr/bin/php8.1)
==23211==    by 0x5031082: (below main) (libc-start.c:308)
==23211== 
[Sun Jan 28 04:41:45 2024] PHP 8.1.21 Development Server (http://0.0.0.0:8000) started
[Sun Jan 28 04:42:02 2024] 127.0.0.1:39554 Accepted
[Sun Jan 28 04:42:08 2024] 127.0.0.1:39554 Closed without sending a request; it was probably just an unused speculative preconnection
[Sun Jan 28 04:42:08 2024] 127.0.0.1:39554 Closing
[Sun Jan 28 04:42:08 2024] 192.168.86.1:55168 Accepted
==23211== Conditional jump or move depends on uninitialised value(s)
==23211==    at 0x25BC1F: ??? (in /usr/bin/php8.1)
==23211==    by 0x50EB8A0: __scandir64_tail (scandir-tail-common.c:45)
==23211==    by 0x25C06D: ??? (in /usr/bin/php8.1)
==23211==    by 0x25CC41: ??? (in /usr/bin/php8.1)
==23211==    by 0x2365AC: get_timezone_info (in /usr/bin/php8.1)
==23211==    by 0x236DF0: ??? (in /usr/bin/php8.1)
==23211==    by 0x753EAD4: xdebug_execute_internal (base.c:1018)
==23211==    by 0x2231FB: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211==    by 0x223166: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211==    by 0x223166: ??? (in /usr/bin/php8.1)
==23211== 
==23211== Invalid read of size 8
==23211==    at 0x7556780: zend_string_equal_content (zend_string.h:357)
==23211==    by 0x7556780: zend_string_equals (zend_string.h:362)
==23211==    by 0x7556780: mark_fse_as_having_line_breakpoints (debugger.c:573)
==23211==    by 0x7556780: handle_breakpoints (debugger.c:591)
==23211==    by 0x7556780: xdebug_debugger_handle_breakpoints (debugger.c:623)
==23211==    by 0x753EAEF: xdebug_execute_internal_end (base.c:998)
==23211==    by 0x753EAEF: xdebug_execute_internal (base.c:1022)
==23211==    by 0x2231FB: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211==    by 0x223166: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211==    by 0x223166: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211==    by 0x223166: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211==    by 0x223166: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211==  Address 0x7a614c5c79726f84 is not stack'd, malloc'd or (recently) free'd
==23211== 
==23211== 
==23211== Process terminating with default action of signal 11 (SIGSEGV)
==23211==  General Protection Fault
==23211==    at 0x7556780: zend_string_equal_content (zend_string.h:357)
==23211==    by 0x7556780: zend_string_equals (zend_string.h:362)
==23211==    by 0x7556780: mark_fse_as_having_line_breakpoints (debugger.c:573)
==23211==    by 0x7556780: handle_breakpoints (debugger.c:591)
==23211==    by 0x7556780: xdebug_debugger_handle_breakpoints (debugger.c:623)
==23211==    by 0x753EAEF: xdebug_execute_internal_end (base.c:998)
==23211==    by 0x753EAEF: xdebug_execute_internal (base.c:1022)
==23211==    by 0x2231FB: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211==    by 0x223166: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211==    by 0x223166: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211==    by 0x223166: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211==    by 0x223166: ??? (in /usr/bin/php8.1)
==23211==    by 0x224162: ??? (in /usr/bin/php8.1)
==23211== 
==23211== HEAP SUMMARY:
==23211==     in use at exit: 7,534,696 bytes in 98,069 blocks
==23211==   total heap usage: 173,251 allocs, 75,182 frees, 30,116,685 bytes allocated
==23211== 
==23211== LEAK SUMMARY:
==23211==    definitely lost: 30,624 bytes in 957 blocks
==23211==    indirectly lost: 40 bytes in 1 blocks
==23211==      possibly lost: 3,222,264 bytes in 24,139 blocks
==23211==    still reachable: 4,281,768 bytes in 72,972 blocks
==23211==         suppressed: 0 bytes in 0 blocks
==23211== Rerun with --leak-check=full to see details of leaked memory
==23211== 
==23211== Use --track-origins=yes to see where uninitialised values come from
==23211== For lists of detected and suppressed errors, rerun with: -s
==23211== ERROR SUMMARY: 24 errors from 6 contexts (suppressed: 0 from 0)
valgrind.log (8,160 bytes)   
GDB full cli extract.txt (8,114 bytes)   
laravel@laravel-virtual-machine:/var/sulu-projects/magyarfutar/arma-new-sulu-2$ gdb --args php -S 0.0.0.0:8000 -t public/ config/router.php
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from php...
(No debugging symbols found in php)
(gdb) run
Starting program: /usr/bin/php -S 0.0.0.0:8000 -t public/ config/router.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Sun Jan 28 04:33:50 2024] PHP Warning:  Module "mbstring" is already loaded in Unknown on line 0
[Sun Jan 28 04:33:50 2024] PHP 8.1.21 Development Server (http://0.0.0.0:8000) started
[Sun Jan 28 04:33:51 2024] 127.0.0.1:38006 Accepted
[Sun Jan 28 04:33:54 2024] 192.168.86.1:54993 Accepted
[Sun Jan 28 04:33:54 2024] 192.168.86.1:54994 Accepted

Program received signal SIGSEGV, Segmentation fault.
mark_fse_as_having_line_breakpoints (fse=0x5555561aaac0)
    at ./build-8.1/src/debugger/debugger.c:573
573	./build-8.1/src/debugger/debugger.c: No such file or directory.
(gdb) bt full
#0  mark_fse_as_having_line_breakpoints (fse=0x5555561aaac0)
    at ./build-8.1/src/debugger/debugger.c:573
        extra_brk_info = 0x555555e09610
        executed_filename = 0x7a614c5c79726f74
        le = 0x555555e568c0
        le = <optimized out>
        extra_brk_info = <optimized out>
        executed_filename = <optimized out>
        resolved_filename = <optimized out>
#1  handle_breakpoints (return_value=0x7fffffff89d8, breakpoint_type=8, 
    fse=0x5555561aaac0) at ./build-8.1/src/debugger/debugger.c:591
No locals.
#2  xdebug_debugger_handle_breakpoints (fse=fse@entry=0x5555561aaac0, 
    breakpoint_type=breakpoint_type@entry=8, 
    return_value=return_value@entry=0x7fffffff89d8)
    at ./build-8.1/src/debugger/debugger.c:623
No locals.
#3  0x00007ffff569faf0 in xdebug_execute_internal_end (
    current_execute_data=<optimized out>, return_value=0x7fffffff89d8)
    at ./build-8.1/src/base/base.c:998
        fse = 0x5555561aaac0
        fse = <optimized out>
#4  xdebug_execute_internal (current_execute_data=<optimized out>, 
--Type <RET> for more, q to quit, c to continue without paging--c
    0x7fffffff89d8) at ./build-8.1/src/base/base.c:1022
        run_internal_handler = <optimized out>
#5  0x000055555566f1fc in ?? ()
No symbol table info available.
#6  0x0000555555670163 in ?? ()
No symbol table info available.
#7  0x000055555566f167 in ?? ()
No symbol table info available.
#8  0x0000555555670163 in ?? ()
No symbol table info available.
#9  0x000055555566f167 in ?? ()
No symbol table info available.
#10 0x0000555555670163 in ?? ()
No symbol table info available.
#11 0x000055555566f167 in ?? ()
No symbol table info available.
#12 0x0000555555670163 in ?? ()
No symbol table info available.
#13 0x000055555566f167 in ?? ()
No symbol table info available.
#14 0x0000555555670163 in ?? ()
No symbol table info available.
#15 0x000055555566f167 in ?? ()
No symbol table info available.
#16 0x0000555555670163 in ?? ()
No symbol table info available.
#17 0x000055555566f167 in ?? ()
No symbol table info available.
#18 0x0000555555670163 in ?? ()
No symbol table info available.
#19 0x000055555566f167 in ?? ()
No symbol table info available.
#20 0x0000555555670163 in ?? ()
No symbol table info available.
#21 0x000055555566f167 in ?? ()
No symbol table info available.
#22 0x0000555555670163 in ?? ()
No symbol table info available.
#23 0x000055555566f167 in ?? ()
No symbol table info available.
#24 0x0000555555670163 in ?? ()
No symbol table info available.
#25 0x000055555566f167 in ?? ()
No symbol table info available.
#26 0x0000555555670163 in ?? ()
No symbol table info available.
#27 0x000055555566f167 in ?? ()
No symbol table info available.
#28 0x0000555555670163 in ?? ()
No symbol table info available.
#29 0x000055555566f167 in ?? ()
No symbol table info available.
#30 0x0000555555670163 in ?? ()
No symbol table info available.
#31 0x000055555566f167 in ?? ()
No symbol table info available.
#32 0x0000555555670163 in ?? ()
No symbol table info available.
#33 0x000055555566f167 in ?? ()
No symbol table info available.
#34 0x0000555555670163 in ?? ()
No symbol table info available.
#35 0x000055555566f167 in ?? ()
No symbol table info available.
#36 0x0000555555670163 in ?? ()
No symbol table info available.
#37 0x000055555566f167 in ?? ()
No symbol table info available.
#38 0x0000555555670163 in ?? ()
No symbol table info available.
#39 0x000055555566f167 in ?? ()
No symbol table info available.
#40 0x0000555555670163 in ?? ()
No symbol table info available.
#41 0x000055555566f167 in ?? ()
No symbol table info available.
#42 0x0000555555670163 in ?? ()
No symbol table info available.
#43 0x000055555566f167 in ?? ()
No symbol table info available.
#44 0x0000555555670163 in ?? ()
No symbol table info available.
#45 0x000055555566f167 in ?? ()
No symbol table info available.
#46 0x0000555555670163 in ?? ()
No symbol table info available.
#47 0x000055555566f167 in ?? ()
No symbol table info available.
#48 0x0000555555670163 in ?? ()
No symbol table info available.
#49 0x000055555566f167 in ?? ()
No symbol table info available.
#50 0x0000555555670163 in ?? ()
No symbol table info available.
#51 0x000055555566f167 in ?? ()
No symbol table info available.
#52 0x0000555555670163 in ?? ()
No symbol table info available.
#53 0x000055555566f167 in ?? ()
No symbol table info available.
#54 0x0000555555670163 in ?? ()
No symbol table info available.
#55 0x000055555566f167 in ?? ()
No symbol table info available.
#56 0x0000555555670163 in ?? ()
No symbol table info available.
#57 0x000055555566f167 in ?? ()
No symbol table info available.
#58 0x0000555555670163 in ?? ()
No symbol table info available.
#59 0x000055555566f167 in ?? ()
No symbol table info available.
#60 0x0000555555670163 in ?? ()
No symbol table info available.
#61 0x000055555566f167 in ?? ()
No symbol table info available.
#62 0x0000555555670163 in ?? ()
No symbol table info available.
#63 0x00005555558ac08d in zend_execute ()
No symbol table info available.
#64 0x000055555583bea5 in zend_execute_scripts ()
No symbol table info available.
#65 0x00005555557d8cda in php_execute_script ()
No symbol table info available.
#66 0x000055555592c212 in ?? ()
No symbol table info available.
#67 0x000055555592c7a3 in ?? ()
No symbol table info available.
#68 0x000055555592cad9 in ?? ()
No symbol table info available.
#69 0x000055555592d615 in ?? ()
No symbol table info available.
#70 0x0000555555679f6f in ?? ()
No symbol table info available.
#71 0x00007ffff7638083 in __libc_start_main (main=0x555555679d60, argc=6, argv=0x7fffffffdec8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdeb8) at ../csu/libc-start.c:308
        self = <optimized out>
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {93824996270416, 6910301724677473702, 93824993437968, 140737488346816, 0, 0, -6910301723535112794, -6910285404666755674}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x6, 0x7fffffffdec8}, data = {prev = 0x0, cleanup = 0x0, canceltype = 6}}}
        not_first_call = <optimized out>
#72 0x000055555567a93e in _start ()
No symbol table info available.
(gdb) 
GDB full cli extract.txt (8,114 bytes)   

xedaxip791

2024-01-26 13:47

reporter   ~0006817

After more testing, when using php line function xdebug_break(); it is not failing, it is something when breakpoints inside php storm

derick

2024-01-30 11:55

administrator   ~0006819

This is a duplicate of 0002229, which I unfortunately still haven't managed to reproduce, although we have an idea what makes it crash.

Issue History

Date Modified Username Field Change
2024-01-26 12:41 xedaxip791 New Issue
2024-01-26 12:49 xedaxip791 Note Added: 0006815
2024-01-26 12:49 xedaxip791 File Added: log.txt
2024-01-26 13:02 xedaxip791 Note Added: 0006816
2024-01-26 13:02 xedaxip791 File Added: valgrind.log
2024-01-26 13:02 xedaxip791 File Added: GDB full cli extract.txt
2024-01-26 13:47 xedaxip791 Note Added: 0006817
2024-01-30 11:55 derick Assigned To => derick
2024-01-30 11:55 derick Status new => resolved
2024-01-30 11:55 derick Resolution open => duplicate
2024-01-30 11:55 derick Note Added: 0006819
2024-01-30 11:55 derick Relationship added duplicate of 0002229
2024-03-28 17:00 derick Relationship added duplicate of 0002252