• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Question How can I get debug symbols for PHP to use gdb on core dumps?

goomba

New Pleskian
Server operating system version
CentOS 7
Plesk version and microupdate number
18.0.56.1
Bash:
[root@host httpdocs]# gdb /opt/plesk/php/8.0/bin/php core.16561
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/plesk/php/8.0/bin/php...(no debugging symbols found)...done.
[New LWP 16561]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/opt/plesk/php/8.0/bin/php index.php'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000005f038e in ?? ()
Missing separate debuginfos, use: debuginfo-install plesk-php80-cli-8.0.30-1centos.7.230908.0411.x86_64

Running that debuginfo-install command installs the following:

bzip2-debuginfo x86_64 1.0.6-13.el7 @base-debuginfo 484 k
e2fsprogs-debuginfo x86_64 1.42.9-19.el7 @base-debuginfo 5.5 M
gcc-base-debuginfo x86_64 4.8.5-44.el7 @base-debuginfo 14 M
gcc-debuginfo x86_64 4.8.5-44.el7 @base-debuginfo 891 M
glibc-debuginfo x86_64 2.17-326.el7_9 @base-debuginfo 58 M
glibc-debuginfo-common x86_64 2.17-326.el7_9 @base-debuginfo 52 M
gmp-debuginfo x86_64 1:6.0.0-15.el7 @base-debuginfo 3.7 M
krb5-debuginfo x86_64 1.15.1-55.el7_9 @base-debuginfo 19 M
libedit-debuginfo x86_64 3.0-12.20121213cvs.el7 @base-debuginfo 1.0 M
libxml2-debuginfo x86_64 2.9.1-6.el7_9.6 @base-debuginfo 11 M
ncurses-debuginfo x86_64 5.9-14.20130511.el7_4 @base-debuginfo 5.7 M
openssl-debuginfo x86_64 1:1.0.2k-26.el7_9 @base-debuginfo 22 M
yum-plugin-auto-update-debug-info noarch 1.1.31-54.el7_8 @base 25 k
zlib-debuginfo x86_64 1.2.7-21.el7_9 @base-debuginfo 971 k

Still results in the same error. Is there any way to get that? plesk-php80-devel is installed as well.
 
Looks like plesk-php80-debuginfo got me some info at least:

Bash:
Core was generated by `/opt/plesk/php/8.0/bin/php index.php'.
Program terminated with signal 11, Segmentation fault.
#0  php_charmask (mask=0x7ffd5526e020 "", len=2, input=0x7f1f03bf1378 "/\\") at ext/standard/string.c:710
710    ext/standard/string.c: No such file or directory.
Missing separate debuginfos, use: debuginfo-install plesk-php80-cli-8.0.30-1centos.7.230908.0411.x86_64
 
4-minute edit timer is kind of lame. But anyways, I have an application generating segmentation faults but is not generating core dumps via PHP-FPM. I tried invoking it via CLI which did get a core dump.

gdb /opt/plesk/php/8.0/bin/php core.16561
gdb /opt/plesk/php/8.0/bin/phpdbg core.16561
gdb /opt/plesk/php/8.0/sbin/php-fpm core.16561

I got some info using these, but it's still not a complete backtrace.
 
Back
Top