Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196407 - dev-lang/php-5.2.4_p20070914-r2 - double free or corruption w/ apache-2.2.6-r1
Summary: dev-lang/php-5.2.4_p20070914-r2 - double free or corruption w/ apache-2.2.6-r1
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-19 12:06 UTC by Dave
Modified: 2007-11-24 15:39 UTC (History)
0 users

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


Attachments
emerge --info (uhura-info,14.15 KB, text/plain)
2007-10-19 12:06 UTC, Dave
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave 2007-10-19 12:06:12 UTC
Hi all,

I have installed dev-lang/php-5.2.4_p20070914-r2 and apache-2.2.6-r1.  However, when I go to run a lot of non-trival php apps, I get this error:
*** glibc detected *** /usr/sbin/apache2: double free or corruption (!prev): 0x08494588 ***
And then the app grinds to a halt.

I think I have ruled out hardware, since I get a similar error on other boxes on my network and get the same error (what are the chances that memory on all these boxes is bad and I would get the same error?)

I've tried compiling with different CFLAGS, USE flags, Compilier versions (gcc 4.1 and gcc 4.2), both AMD and Intel CPU's, etc.

php-5.2.4 works fine, though.
Comment 1 Dave 2007-10-19 12:06:45 UTC
Created attachment 133890 [details]
emerge --info
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-10-19 12:10:09 UTC
Post emerge -pv php output.
Comment 3 Dave 2007-10-19 12:14:04 UTC
Hi Jakub,

I've unistalled this version in my latest playing, but here is the output:
uhura ~ # emerge php -pv

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

Calculating dependencies... done!
[ebuild  NS   ] dev-lang/php-5.2.4_p20070914-r2  USE="apache2 bcmath berkdb bzip2 calendar cdb cgi cjk cli crypt ctype curl curlwrappers dbase discard-path doc exif fdftk filter flatfile force-cgi-redirect ftp gd gmp hash iconv imap inifile iodbc ipv6 json kerberos ldap ldap-sasl mcve mhash mysql mysqli ncurses nls odbc pcntl pcre pdo pic posix postgres qdbm readline reflection session sharedext sharedmem simplexml snmp soap sockets spell spl sqlite ssl suhosin sysvipc tidy tokenizer truetype unicode wddx xml xmlreader xmlrpc xmlwriter xpm xsl yaz zip zlib -adabas -birdstep -concurrentmodphp -db2 -dbmaker -debug -empress -empress-bcs -esoob -fastbuild -firebird -frontbase -gd-external -gdbm -interbase -java-external -libedit -msql -mssql -oci8 -oci8-instant-client -recode -sapdb -solid -sybase -sybase-ct -threads -zip-external" 0 kB
[ebuild  N    ] dev-php5/pecl-yaz-1.0.8  0 kB
[ebuild  N    ] dev-php5/pecl-mcve-5.2.2-r1  0 kB
[ebuild  N    ] dev-php5/suhosin-0.9.20  0 kB

Total: 4 packages (3 new, 1 in new slot), Size of downloads: 0 kB
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-11-19 11:45:39 UTC
Try w/ 5.2.5 please; can't reproduce this anyway.
Comment 5 B.Pennacchi 2007-11-23 04:22:07 UTC
I got a similar problem, but this time with apache-2.2.6 and php 5.2.5 on a hardened amd64 gentoo box.

From /var/log/apache2/error_log I get a lot of this stuff:

======= Memory map: ========
[Wed Nov 21 20:11:24 2007] [notice] child pid 5713 exit signal Aborted (6)
[Wed Nov 21 20:12:08 2007] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread
*** glibc detected *** /usr/sbin/apache2: corrupted double-linked list: 0x00000158e9c25c60 ***
======= Backtrace: =========
/lib/libc.so.6[0x3150f1ca92c3]
/lib/libc.so.6(cfree+0x8c)[0x3150f1ca971c]
/usr/lib64/apache2/modules/libphp5.so(tsrm_shutdown+0xa9)[0x3150f5505639]
/usr/lib64/apache2/modules/libphp5.so[0x3150f55feb05]
/usr/lib/libapr-1.so.0[0x3150f10bebad]
/usr/lib/libapr-1.so.0(apr_pool_destroy+0x3b)[0x3150f10bfbeb]
/usr/sbin/apache2[0x158e95119d7]
/usr/sbin/apache2[0x158e9512c14]
/usr/lib/libapr-1.so.0[0x3150f10c8e2d]
/lib/libpthread.so.0[0x3150f181f73c]
/lib/libc.so.6(clone+0x6d)[0x3150f1d0c99d]
======= Memory map: ========

my emerge --info:

Portage 2.1.3.19 (hardened/amd64/multilib, gcc-3.4.6, glibc-2.6.1-r0, 2.6.22-hardened-r8 x86_64)
=================================================================
System uname: 2.6.22-hardened-r8 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Timestamp of tree: Fri, 23 Nov 2007 02:46:01 +0000
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ABI="amd64"
ACCEPT_KEYWORDS="amd64"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol"
ARCH="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CDEFINE_amd64="__x86_64__"
CDEFINE_x86="__i386__"
CFLAGS="-O2 -march=athlon64 -pipe -fforce-addr -msse3"
CFLAGS_x86="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CVS_RSH="ssh"
CXXFLAGS="-O2 -march=athlon64 -pipe -fforce-addr -msse3"
DEFAULT_ABI="amd64"
DISTDIR="/usr/portage/distfiles"
EDITOR="/usr/bin/vim"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--verbose"
EMERGE_WARNING_DELAY="10"
FEATURES="autoconfig distlocks metadata-transfer notitles parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O ${DISTDIR}/${FILE} ${URI}"
GCC_PATH="/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.6"
GCC_SPECS=""
GENTOO_MIRRORS="http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/ http://mirror.switch.ch/ftp/mirror/gentoo/ http://gentoo.mirror.solnet.ch"
HOME="/root"
INFOPATH="/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.6/info"
INPUT_DEVICES="evdev keyboard mouse"
KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LDFLAGS_amd64="-m elf_x86_64"
LDFLAGS_x86="-m elf_i386 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe.sh %s"
LIBDIR_amd64="lib64"
LIBDIR_x86="lib32"
LOGNAME="root"
LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:"
MAKEOPTS="-j3"
MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4.6/man:/usr/lib64/php5/man/"
MULTILIB_ABIS="x86 amd64"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib /usr/lib /usr/kde/*/lib /usr/qt/*/lib /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|eclipse-3|debug|portage)"
NOCOLOR="true"
PAGER="/usr/bin/less"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.6"
PKGDIR="/usr/portage/packages"
PORTAGE_ARCHLIST="ppc s390 amd64 x86 ppc64 x86-fbsd m68k arm sparc sh mips ia64 alpha ppc-macos hppa sparc-fbsd"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_BIN_PATH="/usr/lib64/portage/bin"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save_summary echo"
PORTAGE_GID="250"
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_NICENESS="3"
PORTAGE_PYM_PATH="/usr/lib64/portage/pym"
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 --filter=H_**/files/digest-*"
PORTAGE_RSYNC_RETRIES="3"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_TMPFS="/dev/shm"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
PORT_LOGDIR="/var/log/portage"
PWD="/root"
PYTHONPATH="/usr/lib64/portage/pym"
RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O ${DISTDIR}/${FILE} ${URI}"
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.6"
RPMDIR="/usr/portage/rpm"
SHELL="/bin/bash"
SHLVL="1"
STAGE1_USE="hardened pic"
SYMLINK_LIB="yes"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
TERM="xterm"
TZ="Europe/Rome"
USE="7zip acl acpi amavis amd64 animgif apache2 attachment bash-completion berkdb bzip2 cdr checkpath chroot clamav clamd colordiff compress contentcache cpio cracklib crypt dar64 db2 dbase dbm dbus directfb diskcache dri dvd dvdr extensions faillog fam fbcon filter flatfile gcc64 gd gdbm gif glibc-omitfp gocr hal hardened hash hddtemp hpn hybrid idea innodb ipsec ithreads jpeg jpeg2k justify lcms libedit libnotify lm_sensors logrotate logwatch lzw mailwrapper max-idx-128 md5sum memlimit mhash mime mmap mng mode-paranoid mpi mysql mysqli ncurses nfconntrack nfqueue nls no-suexec noaudio novideo nptl nptlonly ocrad odbc pam pam_chroot pam_nuauth pam_timestamp pcre pdf perl pic png posix postfix quotas rar readline regex rpc search sensord sftp sftplogging slang spoof-source ssl startup-notification subject-rewrite svg syslog szip tcpd tesseract threads tidy tiff tomsfastmath tools unicode urandom usb userlocales vhosts wmf xpm xtended zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vga svga fbdev"
USER="root"
USERLAND="GNU"
USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS USERLAND VIDEO_CARDS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d"
VIDEO_CARDS="vga svga fbdev"
XARGS="xargs -r"
_="/usr/bin/emerge"


"emerge -pv php":
[ebuild   R   ] dev-lang/php-5.2.5  USE="apache2 berkdb bzip2 crypt dbase filter flatfile gd gdbm hash iconv mhash mysql mysqli ncurses nls odbc pcre pic posix readline session spl ssl suhosin threads tidy truetype unicode xml xpm zip zlib (-adabas) -bcmath (-birdstep) -calendar -cdb -cgi -cjk -cli -concurrentmodphp -ctype -curl -curlwrappers -db2 (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -exif -fastbuild (-fdftk) (-firebird) -force-cgi-redirect (-frontbase) -ftp -gd-external -gmp -imap -inifile -interbase -iodbc -ipv6 -java-external -json -kerberos -ldap -ldap-sasl -libedit -mcve -msql -mssql -oci8 (-oci8-instant-client) -pcntl -pdo -postgres -qdbm -recode -reflection -sapdb -sharedext -sharedmem -simplexml -snmp -soap -sockets (-solid) -spell -sqlite (-sybase) (-sybase-ct) -sysvipc -tokenizer -wddx -xmlreader -xmlrpc -xmlwriter -xsl -yaz -zip-external" 0 kB 

"emerge -pv apache":
[ebuild   R   ] www-servers/apache-2.2.6  USE="mpm-worker no-suexec ssl threads -debug -doc -ldap -mpm-event -mpm-itk -mpm-peruser -mpm-prefork (-selinux) -static-modules" 0 kB 

I already tried and re-tried rebuilding php, apr, apache-tools and apache but the problem remains. The webserver hasn't yet shutdown completely by it, but I'm not really feeling at ease with this situation.

Please, at least help me understand, as I see around the net that glibc protests a lot against corrupted double-lists in many different contexts.
Comment 6 B.Pennacchi 2007-11-24 15:39:45 UTC
Apologies, looks like that, after doing an "emerge -uvN glibc" and restarting apache, all the errors I cited above disappearerd.

Hopefully this might be still useful to anyone else having a similar error output in their logs.