Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36497 - 'pear' crashes when the xdebug extension is loaded. (PHP)
Summary: 'pear' crashes when the xdebug extension is loaded. (PHP)
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-25 16:41 UTC by Roman Weber
Modified: 2003-12-26 03:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Weber 2003-12-25 16:41:00 UTC
If you install dev-php/xdebug and add the extension line to /etc/php/cli-php4/php.ini, the command 'pear' (used for installing PEAR packages) segfaults.
Workaround: Remove 'zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20020429/xdebug.so' from cli-php4/php.ini


Reproducible: Always
Steps to Reproduce:
1. Make a clean install of PHP
2. emerge dev-php/xdebug
3. etc-update
4. emerge some dev-php/PEAR-* packages (Sometimes the first package will work...)
Actual Results:  
root@wintermute dev-php # pear
Segmentation fault

Expected Results:  
root@wintermute dev-php # pear
Usage: pearcmd.php [options] command [command-options] <parameters>
Type "pearcmd.php help options" to list all options.
Type "pearcmd.php help <command>" to get the help for the specified command.
Commands:
build                  Build an Extension From C Source
bundle                 Unpacks a Pecl Package
clear-cache            Clear XML-RPC Cache
config-get             Show One Setting
config-help            Show Information About Setting
config-set             Change Setting
config-show            Show All Settings
cvsdiff                Run a "cvs diff" for all files in a package
cvstag                 Set CVS Release Tag
download               Download Package
download-all           Downloads each avaible Package from master_server
info                   Display information about a package
install                Install Package
list                   List Installed Packages
list-all               List All Packages
list-upgrades          List Available Upgrades
login                  Connects and authenticates to remote server
logout                 Logs out from the remote server
makerpm                Builds an RPM spec file from a PEAR package
package                Build Package
package-dependencies   Show package dependencies
package-validate       Validate Package Consistency
remote-info            Information About Remote Packages
remote-list            List Remote Packages
run-tests              Run Regression Tests
search                 Search remote package database
shell-test             Shell Script Test
sign                   Sign a package distribution file
uninstall              Un-install Package
upgrade                Upgrade Package
upgrade-all            Upgrade All Packages


Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031212-r0, 2.4.20-gentoo-r8)
============================================================
=====
System uname: 2.4.20-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.4.3.12
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/
config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.inode.at/ http://sunsite.cnlab-switch.ch/ftp/mirror/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage.local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d [am aalib acpi alsa apache2 avi berkdb cdr crypt cups curl dga directfb dvd encode 
fbcon flash foomaticdb gd gdbm ggi gif gtk gtk2 imap imlib innodb ipv6 jpeg lcms libwww lirc mad 
maildir mcal mikmod mmx motif mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl 
png ppds python qt quicktime readline samba sdl slang slp snmp socks5 spell sse ssl svga tcltk tiff 
truetype usb videos wmf wxwindows x86 xface xml xml2 xmms xosd xv zlib video_cards_radeon"
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-12-25 16:59:07 UTC
I can't reproduce this at all.

compile dev-php/php and xdebug with CFLAGS="-O0 -g", do ulimit -c 800000, and come back with the gdb backtrace. 'gdb `which php` core', 'bt'.
(and ensure no password strings are in the gdb output when you paste it in).
Comment 2 Roman Weber 2003-12-25 17:24:40 UTC
(gdb) bt
#0  0x413a17a8 in strcmp () from /lib/libc.so.6
#1  0x416562a8 in add_stack_frame (zdata=0xbfffa990, op_array=0x862ea60, type=2) at /var/tmp/portage/xdebug-1.3.0_rc1/work/xdebug-1.3.0rc1/xdebug.c:594
#2  0x41656b42 in xdebug_execute (op_array=0x862ea60) at /var/tmp/portage/xdebug-1.3.0_rc1/work/xdebug-1.3.0rc1/xdebug.c:765
#3  0x08268f92 in call_user_function_ex ()
#4  0x08271596 in zend_error ()
#5  0x082850f1 in execute ()
#6  0x0827d6ad in zend_assign_to_variable_reference ()
#7  0x0827f0e2 in execute ()
#8  0x41656d90 in xdebug_execute (op_array=0x86141c4) at /var/tmp/portage/xdebug-1.3.0_rc1/work/xdebug-1.3.0rc1/xdebug.c:807
#9  0x082716ec in zend_execute_scripts ()
#10 0x0824332d in php_execute_script ()
#11 0x08291aec in main ()

Roman
Comment 3 Tal Peer (RETIRED) gentoo-dev 2003-12-26 03:42:14 UTC
It's an xdebug bug (see http://pear.php.net/bugs/bug.php?id=194 and http://pear.php.net/bugs/bug.php?id=182).
Hopefully will be fixed in 1.3.0 which whould be released RSN.