4

I am trying to obatin a meaningful backtrace for some segmentation faults occuring on php-fpm in Debian Buster. Reading Debian's guide, I understand that

  1. I need to add the debug repo deb http://deb.debian.org/debian-debug/ buster-debug main
  2. I need to install debian-goodies so that I can search my debug symbols package with find-dbgsym-packages

But it seems that the php debug symbols are missing from the output of find-dbgsym-packages /usr/bin/php, these are the packages listed:

  • libargon2-1-dbgsym
  • libgcc1-dbg
  • libicu63-dbgsym
  • liblzma5-dbgsym
  • libpcre2-dbg
  • libsodium23-dbgsym
  • libssl1.1-dbgsym
  • libstdc++6-8-dbg
  • libxml2-dbg
  • php7.3-cli-dbgsym
  • zlib1g-dbg

I was excpecting to find a package like php7.3-dbgsym... what I am missing?

nulll
  • 1,465
  • 1
  • 17
  • 28
  • Any luck on this? Facing the same issue with 7.4. Tried to add --enable-debug to PHP_EXTRA_CONFIGURE_ARGS in Docker file at https://github.com/docker-library/php/blob/master/7.4/buster/apache/Dockerfile but gdb still says Reading symbols from /usr/local/bin/php...(no debugging symbols found)...done. – Ondřej Hlaváček Jul 26 '21 at 20:55

2 Answers2

1

I was excpecting to find a package like php7.3-dbgsym... what I am missing?

You are missing that the debug symbols you need are included in php7.3-cli-dbgsym.

Install all of the packages find-dbgsym-packages finds and analyze your core again.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362
  • I followed your suggestion but the `gdb` `bt` looks the same (many `??` calls) as if no debug symbol was installed. – nulll Aug 20 '20 at 07:22
0

It seems that you can add an automatic downloader now:

https://wiki.debian.org/HowToGetABacktrace#Automatically_loading_debugging_symbol_from_the_Internet

Just type this in your console:

export DEBUGINFOD_URLS="https://debuginfod.debian.net"

Then run your PHP script:

$ gdb -args /usr/bin/php my_faulty_script.php
(gdb) run
...
(wait for the crash)
...
(gdb) bt
Yvan
  • 2,539
  • 26
  • 28