[Pkg-php-pecl] Bug#820666: Bug#820666: Bug#820666: php5-redis: Segfault on pear upgrade-all with php5-redis installed

Prunk-Éger Edgár hello at edgarpe.hu
Wed Apr 13 13:46:43 UTC 2016


Hi!

Please note that I never developoed in C, nor I ever used gdb.

I always start the reproduction of the bug in a clean newly installed 
debian jessie in virtualbox (via vagrant). Now these were the exact 
commands I ran:

$ sudo -i
$ ulimit -c unlimited
$ apt-get update && apt-get -y dist-upgrade
$ apt-get install -y php5 php5-dbg php5-redis php-pear php5-dev
$ pear update-channels
$ pear upgrade-all

The last part of the output looked like this:

running: make 
INSTALL_ROOT="/tmp/pear/temp/pear-build-root2BeBC2/install-redis-2.2.7" 
install
Installing shared extensions: 
/tmp/pear/temp/pear-build-root2BeBC2/install-redis-2.2.7/usr/lib/php5/20131226/
running: find "/tmp/pear/temp/pear-build-root2BeBC2/install-redis-2.2.7" 
| xargs ls -dils
270032   4 drwxr-xr-x 3 root root   4096 Apr 13 13:26 
/tmp/pear/temp/pear-build-root2BeBC2/install-redis-2.2.7
394015   4 drwxr-xr-x 3 root root   4096 Apr 13 13:26 
/tmp/pear/temp/pear-build-root2BeBC2/install-redis-2.2.7/usr
394368   4 drwxr-xr-x 3 root root   4096 Apr 13 13:26 
/tmp/pear/temp/pear-build-root2BeBC2/install-redis-2.2.7/usr/lib
395348   4 drwxr-xr-x 3 root root   4096 Apr 13 13:26 
/tmp/pear/temp/pear-build-root2BeBC2/install-redis-2.2.7/usr/lib/php5
402361   4 drwxr-xr-x 2 root root   4096 Apr 13 13:26 
/tmp/pear/temp/pear-build-root2BeBC2/install-redis-2.2.7/usr/lib/php5/20131226
402466 792 -rwxr-xr-x 1 root root 809488 Apr 13 13:26 
/tmp/pear/temp/pear-build-root2BeBC2/install-redis-2.2.7/usr/lib/php5/20131226/redis.so

Build process completed successfully
Installing '/usr/lib/php5/20131226/redis.so'
upgrade-all ok: channel://pecl.php.net/redis-2.2.7
upgrade-all ok: channel://pear.php.net/PEAR-1.10.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=redis.so" to php.ini
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based 
installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based 
installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"
Segmentation fault (core dumped)

The link you gave me contains this: "Run gdb with the path to the PHP or 
PHP-enabled httpd binary, and path to the core file. Some examples:"

I don't know which command is failing so I tried with pear and php.

Here are the results:

root at debian-jessie:~# gdb /usr/bin/pear /root/core
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 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"...
"/usr/bin/pear": not in executable format: File format not recognized
[New LWP 12237]
Core was generated by `/usr/bin/php -C -q -d include_path=/usr/share/php 
-d date.timezone=UTC -d outpu'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000000b436 in ?? ()


# gdb /usr/bin/php /root/core
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 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 /usr/bin/php...Reading symbols from 
/usr/lib/debug/.build-id/0a/65056ae65e3e82e9dfae5c6fbb9928b1a6f5a4.debug...done.
done.

warning: core file may not match specified executable file.
[New LWP 12237]

warning: .dynamic section for "/usr/lib/php5/20131226/redis.so" is not 
at the expected address (wrong library or version mismatch?)
[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/bin/php -C -q -d include_path=/usr/share/php 
-d date.timezone=UTC -d outpu'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000000b436 in ?? ()
# gdb /usr/bin/php /root/core
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 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 /usr/bin/php...Reading symbols from 
/usr/lib/debug/.build-id/0a/65056ae65e3e82e9dfae5c6fbb9928b1a6f5a4.debug...done.
done.

warning: core file may not match specified executable file.
[New LWP 12237]

warning: .dynamic section for "/usr/lib/php5/20131226/redis.so" is not 
at the expected address (wrong library or version mismatch?)
[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/bin/php -C -q -d include_path=/usr/share/php 
-d date.timezone=UTC -d outpu'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000000b436 in ?? ()

It seems that gdb can't create real backtrace for some reason.

Edgar

-- 


On 2016-04-13 13:50, Ondřej Surý wrote:
> If you want somebody to help you, you should at least put some effort
> into it...
>
> https://bugs.php.net/bugs-generating-backtrace.php
>
> And don't forget to install php5-dbg first, so you have the symbols.
>
> And if you are unwilling to help to debug this issue, I am sorry I will
> not able to help you.
>
> Cheers,
>



More information about the Pkg-php-pecl mailing list