I created an environment of Apache / 2.4.38 + PHP 7.3.4-2 + Phalcon3.4.4 with Docker. While proceeding according to the tutorial, if you proceed with step execution (I use PhpStorm2019.2), the process will return to the beginning of the file. The Apache log says Segmentation fault, but I don't know how to solve it or avoid the error.
I will show you what I need, so I would like to tell you a lot.
The following is the state when gdb is started. I have a core file, but I don't know how to attach it.
# gdb /usr/sbin/apache2 -c /tmp/core.8c1df7aa85a1.apache2.1565406013
GNU gdb (Debian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://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:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<https://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/apache2...(no debugging symbols found)...done.
[New LWP 540]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/apache2 -D FOREGROUND'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 zval_get_type (pz=0x0) at /usr/include/php/20180731/Zend/zend_types.h:411
warning: Source file is more recent than executable.
411 return pz->u1.v.type;
(gdb) quit
[email protected]:/# cp /tmp/core.8c1df7aa85a1.apache2.1565406013 /etc/php
php/ php.append.d/ php.extra.d/
[email protected]:/# cp /tmp/core.8c1df7aa85a1.apache2.1565406013 /etc/php.append
[email protected]:/# cp /tmp/core.8c1df7aa85a1.apache2.1565406013 /etc/php.extra.d/
[email protected]:/# gdb /usr/sbin/apache2 -c /tmp/core.8c1df7aa85a1.apache2.1565406013
GNU gdb (Debian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://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:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<https://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/apache2...(no debugging symbols found)...done.
[New LWP 540]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/sbin/apache2 -D FOREGROUND'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 zval_get_type (pz=0x0) at /usr/include/php/20180731/Zend/zend_types.h:411
warning: Source file is more recent than executable.
411 return pz->u1.v.type;
(gdb) where
#0 zval_get_type (pz=0x0) at /usr/include/php/20180731/Zend/zend_types.h:411
#1 xdebug_var_export_xml_node ([email protected]=0x55fec80426d0, [email protected]=0x55fec8042a20,
[email protected]=0x55fec803a360, [email protected]=0x55fec803a2f0, [email protected]=1)
at ./build-7.3/xdebug_var.c:2003
#2 0x00007f91bc703805 in xdebug_object_element_export_xml_node (class_name=0x55fec803f3f0 "Phalcon\\Config",
options=0x55fec803a2f0, parent_name=0x55fec803e600, parent=0x55fec8042900, level=0, item_nptr=0x55fec80426b0)
at ./build-7.3/xdebug_var.c:1881
#3 xdebug_var_export_xml_node (struc=<optimized out>, [email protected]=0x7ffe96feee58, [email protected]=0x55fec803e600,
[email protected]=0x55fec8042900, [email protected]=0x55fec803a2f0, [email protected]=0)
at ./build-7.3/xdebug_var.c:2133
#4 0x00007f91bc703c66 in xdebug_get_zval_value_xml_node_ex ([email protected]=0x55fec803e6f0, val=<optimized out>,
[email protected]=0x7ffe96feeed0, [email protected]=0, [email protected]=0x55fec803a2f0)
at ./build-7.3/xdebug_var.c:2204
#5 0x00007f91bc6eff5d in get_symbol ([email protected]=0x55fec803e6f0, [email protected]=0x55fec803a2f0)
at ./build-7.3/xdebug_handler_dbgp.c:285
#6 0x00007f91bc6f0cd8 in attach_declared_var_with_contents (xml=0x55fec803e8b0, he=<optimized out>,
options=0x55fec803a2f0) at ./build-7.3/xdebug_handler_dbgp.c:1634
#7 0x00007f91bc6f7270 in xdebug_hash_apply_with_argument ([email protected]=0x55fec8042d20, [email protected]=0x55fec803e8b0,
[email protected]=0x7f91bc6f0cc0 <attach_declared_var_with_contents>, [email protected]=0x55fec803a2f0)
at ./build-7.3/xdebug_hash.c:265
#8 0x00007f91bc6f4bc6 in attach_context_vars (func=0x7f91bc6f0cc0 <attach_declared_var_with_contents>,
depth=<optimized out>, context_id=<optimized out>, options=0x55fec803a2f0, node=0x55fec803e8b0)
at ./build-7.3/xdebug_handler_dbgp.c:1764
#9 xdebug_dbgp_handle_context_get (retval=0x7ffe96fef170, context=<optimized out>, args=<optimized out>)
at ./build-7.3/xdebug_handler_dbgp.c:1865
#10 0x00007f91bc6f196b in xdebug_dbgp_parse_option (flags=0, retval=<optimized out>,
line=0x55fec803e910 "context_get -i 24 -d 0 -c 0", context=0x7f91bc7193f0 <xdebug_globals+848>)
at ./build-7.3/xdebug_handler_dbgp.c:2123
#11 xdebug_dbgp_cmdloop (context=0x7f91bc7193f0 <xdebug_globals+848>, bail=1) at ./build-7.3/xdebug_handler_dbgp.c:2167
#12 0x00007f91bc6f5d92 in xdebug_dbgp_breakpoint (context=0x7f91bc7193f0 <xdebug_globals+848>, stack=<optimized out>,
file=<optimized out>, lineno=26, type=<optimized out>, exception=0x0, code=0x0, message=0x0)
at ./build-7.3/xdebug_handler_dbgp.c:2442
#13 0x00007f91bc6e3536 in xdebug_statement_call (frame=<optimized out>) at ./build-7.3/xdebug.c:2567
#14 0x00007f91bccc84d2 in zend_llist_apply_with_argument () from /usr/lib/apache2/modules/libphp7.3.so
#15 0x00007f91bcb33c32 in ?? () from /usr/lib/apache2/modules/libphp7.3.so
#16 0x00007f91bcd54f37 in execute_ex () from /usr/lib/apache2/modules/libphp7.3.so
#17 0x00007f91bc6e3f93 in xdebug_execute_ex (execute_data=0x7f91bba1c030) at ./build-7.3/xdebug.c:1904
#18 0x00007f91bcd5b457 in zend_execute () from /usr/lib/apache2/modules/libphp7.3.so
#19 0x00007f91bccd4423 in zend_execute_scripts () from /usr/lib/apache2/modules/libphp7.3.so
#20 0x00007f91bcc74fd8 in php_execute_script () from /usr/lib/apache2/modules/libphp7.3.so
#21 0x00007f91bcd5d692 in ?? () from /usr/lib/apache2/modules/libphp7.3.so
#22 0x000055fec6b56a40 in ap_run_handler ()
#23 0x000055fec6b56fd6 in ap_invoke_handler ()
#24 0x000055fec6b6f5c3 in ap_process_async_request ()
#25 0x000055fec6b6f72e in ap_process_request ()
#26 0x000055fec6b6b82d in ?? ()
#27 0x000055fec6b608b0 in ap_run_process_connection ()
#28 0x00007f91bced93df in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#29 0x00007f91bced96d4 in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#30 0x00007f91bceda3bf in ?? () from /usr/lib/apache2/modules/mod_mpm_prefork.so
#31 0x000055fec6b3967e in ap_run_mpm ()
#32 0x000055fec6b31f57 in main ()
(gdb)