Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133467 - PHP 5.1.* ldap functions kill apache 2
Summary: PHP 5.1.* ldap functions kill apache 2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: PPC64 Other
: High major (vote)
Assignee: PHP Bugs
URL: http://bugs.php.net/bug.php?id=38819
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-16 03:25 UTC by Tim Ellis
Modified: 2007-05-07 22:01 UTC (History)
3 users (show)

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


Attachments
Backtrace (dump.gz,106.05 KB, application/x-gzip)
2006-05-19 10:35 UTC, Tim Ellis
Details
php-5.1.6-ldap-api-fix.patch (php-5.1.6-ldap-api-fix.patch,4.18 KB, patch)
2007-02-28 19:53 UTC, Doug Goldstein
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Ellis 2006-05-16 03:25:30 UTC
When attempting to use ldap functions in php 5.1.4 on ppc64 it causes apache threads to die. Downgrading to 5.0.5 fixes this issue. This needs marking unstable at least on ppc64 and the 5.0.5 build retained until this issue is fixed - this might be an upstream job but I havnt had enough time yet to diagnose.
Comment 1 Tim Ellis 2006-05-16 03:31:33 UTC
Apache logs:

[Tue May 16 10:59:01 2006] [notice] child pid 12060 exit signal Segmentation fault (11)
[Tue May 16 10:59:01 2006] [notice] child pid 12061 exit signal Segmentation fault (11)
[Tue May 16 10:59:21 2006] [notice] child pid 11702 exit signal Segmentation fault (11)
[Tue May 16 10:59:21 2006] [notice] child pid 1278 exit signal Segmentation fault (11)
[Tue May 16 11:14:44 2006] [notice] child pid 11704 exit signal Segmentation fault (11)
[Tue May 16 11:14:44 2006] [notice] child pid 12032 exit signal Segmentation fault (11)
[Tue May 16 11:14:44 2006] [notice] child pid 12034 exit signal Segmentation fault (11)
[Tue May 16 11:14:44 2006] [notice] child pid 2944 exit signal Segmentation fault (11)
[Tue May 16 11:14:53 2006] [notice] child pid 2942 exit signal Segmentation fault (11)
[Tue May 16 11:14:53 2006] [notice] child pid 2943 exit signal Segmentation fault (11)

Emerge Info:

Portage 2.0.54-r2 (default-linux/ppc64/2005.0, gcc-3.4.6, glibc-2.3.4.20041102-r2, 2.6.14.3 ppc64)
=================================================================
System uname: 2.6.14.3 ppc64 PPC970, altivec supported
Gentoo Base System version 1.6.14
distcc 2.18.3 powerpc64-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r4
ACCEPT_KEYWORDS="ppc64"
AUTOCLEAN="yes"
CBUILD="powerpc64-unknown-linux-gnu"
CFLAGS="-O2 -mcpu=G5 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
CHOST="powerpc64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=G5 -maltivec -mabi=altivec -fno-strict-aliasing -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ "
LDFLAGS="-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="ppc64 X aac aalib alsa altivec apache2 arts audiofile bcmath berkdb bitmap-fonts bzip2 bzlib cli crypt ctype cups curl dba dri dts emboss encode esd exif expat fam ffmpeg fortran ftp gd gd-external gdbm geoip gif glut gmp gpm gtk howl iconv idn imagemagick imap imlib jpeg lcms ldap libwww mad mhash mime mng mp3 mpeg4 mysql ncurses nls nptl nptlonly ogg opengl pam pcntl pcre pdflib perl php png python qt readline reflection sdl session simplexml slang sockets spell spl sqlite ssl tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb vorbis wddx xml2 xmlrpc xmms xorg xpm xsl xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
Comment 2 Sebastian Bergmann (RETIRED) gentoo-dev 2006-05-16 04:16:57 UTC
Without a backtrace this bug report is useless, sorry.

Please read http://www.gentoo.org/doc/en/bugzilla-howto.xml and http://bugs.php.net/bugs-generating-backtrace.php and come back with the required information.

Thank you.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-05-16 04:20:34 UTC
One more link: http://www.gentoo.org/proj/en/qa/backtraces.xml
Comment 4 Tim Ellis 2006-05-16 05:18:48 UTC
Well like I said, I havnt had time to test this yet, I cant just go around breaking live servers with unstable packages (this happened reliably on TWO live servers, both ppc64) but will make time to test it out of hours sometime this week.
Comment 5 Tim Ellis 2006-05-19 10:35:26 UTC
Created attachment 87068 [details]
Backtrace
Comment 6 Tim Ellis 2006-05-19 10:38:38 UTC
I have attached the backtrace now I have been able to take the server down for a bit, sorry I can't provide the code but will make time to nail it down to a function call as soon as I can make more time! Please advise if I have done this incorrectly!

On Sebastians advice I will submit this upstream as well - cheers!
Comment 7 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-08-24 05:46:54 UTC
This happens to me on amd64 too - I'm trying to use:

katmai ~ # emerge -pv dev-lang/php apache phpldapadmin openldap

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-lang/php-5.1.4-r6  USE="apache2 berkdb bzip2 crypt ipv6 ldap ncurses nls pcre pic readline reflection session spl ssl xml zlib -apache -bcmath -calendar -cdb -cgi -cjk -cli -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase -debug -discard-path -doc -exif -fastbuild -flatfile -force-cgi-redirect -ftp -gd -gd-external -gdbm -gmp -hardenedphp -hash -hyperwave-api -iconv -imap -inifile -interbase -iodbc -java-external -kerberos -libedit -mcve -memlimit -mhash -ming -msql -mssql -mysql -mysqli -oci8 -odbc -pcntl -pdo -pdo-external -posix -postgres -qdbm -recode -sapdb -sasl -sharedext -sharedmem -simplexml -snmp -soap -sockets -spell -sqlite -sysvipc -threads -tidy -tokenizer -truetype -unicode -vm-goto -vm-switch -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip" 0 kB
[ebuild   R   ] net-www/apache-2.0.58-r2  USE="apache2 mpm-prefork no-suexec -debug -doc -ldap -mpm-itk -mpm-leader -mpm-peruser -mpm-threadpool -mpm-worker -ssl -static-modules -threads" 0 kB
[ebuild   R   ] net-nds/phpldapadmin-1.0.1  USE="-vhosts" 0 kB
[ebuild   R   ] net-nds/openldap-2.3.24-r1  USE="berkdb crypt ipv6 readline ssl tcpd -debug -gdbm -kerberos -minimal -odbc -overlays -perl -samba -sasl -slp" 0 kB

Total size of downloads: 0 kB
katmai ~ #


dev-lang/php-5.0.5-r5 fails also.

katmai ~ # emerge --info
Portage 2.1-r2 (default-linux/amd64/2006.0/no-multilib, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-hardened-r11 x86_64)
=================================================================
System uname: 2.6.16-hardened-r11 x86_64 AMD Sempron(tm) Processor 3000+
Gentoo Base System version 1.12.4
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/nfs/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer noinfo sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/nfs/trees/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 alsa apache2 avi bash-completion berkdb bitmap-fonts bzip2 cli crypt cups dlloader dri eds emboss encode foomaticdb fortran gif gstreamer gtk2 hardened imlib ipv6 isdnlog jpeg lzw lzw-tiff mp3 mpeg ncurses nls nptl nptlonly opengl pam pcre pdflib pic png pppd qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd tiff truetype-fonts type1-fonts urandom usb xorg xpm xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i810 video_cards_mga video_cards_neomagic video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

katmai ~ #
Comment 8 Doug Goldstein gentoo-dev 2007-02-27 21:36:04 UTC
I'm having the same issues here. I'll try to provide a backtrace when I can. 
Using: Apache 2.2.4 (problem did not happen with 2.0.58), PHP 5.1.6-r6, 2.3.30-r2

# emerge --info
Portage 2.1.2-r9 (hardened/amd64/multilib, gcc-3.4.6, glibc-2.3.6-r5, 2.6.17-hardened-r1 x86_64)
=================================================================
System uname: 2.6.17-hardened-r1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Gentoo Base System release 1.12.9
Timestamp of tree: Tue, 27 Feb 2007 16:01:01 +0000
ccache version 2.4 [enabled]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 bash-completion berkdb bzip2 crypt fam hardened justify ldap logrotate midi ncurses nptl nptlonly pam pic python readline samba sse2 ssl tcpd vhosts xorg zlib" ELIBC="glibc" KERNEL="linux" USERLAND="GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 9 Doug Goldstein gentoo-dev 2007-02-27 21:45:05 UTC
Pretty sure it's this bug here: http://bugs.php.net/bug.php?id=38819

Because the test case that the user provided happens for me as well.
Comment 10 Doug Goldstein gentoo-dev 2007-02-28 14:54:39 UTC
The issue was taken up with OpenLDAP upstream and they stated that PHP needs to be built with -DLDAP_DEPRECATED=1. Which when I do that, it compiles for me and PHP no longer segfaults. However, phpldapadmin can no longer retrieve schema data and info from my LDAP server with that change in there.

http://www.openldap.org/its/index.cgi/Build?id=4690;selectid=4690

http://www.openldap.org/its/index.cgi/Build?id=4168;selectid=4168
Comment 11 Doug Goldstein gentoo-dev 2007-02-28 19:52:02 UTC
I added a patch and submitted it upstream. http://bugs.php.net/bug.php?id=40671
Comment 12 Doug Goldstein gentoo-dev 2007-02-28 19:53:37 UTC
Created attachment 111617 [details, diff]
php-5.1.6-ldap-api-fix.patch
Comment 13 Doug Goldstein gentoo-dev 2007-04-28 15:39:53 UTC
The fix for this has been commited upstream and should be in the PHP 5.2.2 release.
Comment 14 Luca Longinotti (RETIRED) gentoo-dev 2007-05-07 22:01:36 UTC
This should be now fixed in 5.2.2, which includes Doug's fix for this.
Closing the bug, reopen if needed.
Best regards, CHTEKK.