[horde] Segmentation fault (11) in apache2

Virgil E. Alderson valderson at xtg.bz
Wed Dec 13 12:48:24 PST 2006


I know this is related to php but I was hoping somebody has encountered
this and could help out. I believe it is caused by imap in php because i
only see the segfault when I click on folders in the imap tree, and it
does not occur if a disable imap in php.

I am running on debian sarge kernel 2.4.27, Apache/2.0.54 (Debian
GNU/Linux) mod_ssl/2.0.54 OpenSSL/0.9.7e mod_perl/1.999.21 Perl/v5.8.4,
and php 4-4.3.10. I have recompiled all packages related and cannot make
the seg fault go away. From googling it looks like it could be related
to the c-client, i tried both debian source and Berkeley and it makes no
difference.

here is how php4 is configured

'./configure' '--prefix=/usr' '--with-apxs2=/usr/bin/apxs2'
'--with-config-file-path=/etc/php4/apache2' '--enable-debug'
'--with-regex=php' '--disable-rpath' '--disable-static' '--with-pic'
'--with-layout=GNU' '--with-pear=/usr/share/php' '--enable-calendar'
'--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg'
'--enable-track-vars' '--enable-trans-sid' '--enable-bcmath'
'--with-bz2' '--enable-ctype' '--with-db4' '--with-iconv'
'--enable-exif' '--enable-filepro' '--enable-ftp' '--with-gettext'
'--enable-mbstring' '--with-pcre-regex=/usr' '--enable-shmop'
'--enable-sockets' '--enable-wddx' '--disable-xml'
'--with-expat-dir=/usr' '--with-xmlrpc' '--enable-yp' '--with-zlib'
'--without-pgsql' '--with-kerberos=/usr' '--with-openssl=/usr'
'--with-zip=/usr' '--enable-dbx'
'--with-mime-magic=/usr/share/misc/file/magic.mime'
'--with-exec-dir=/usr/lib/php4/libexec' '--without-mm' '--without-mysql'
'--without-sybase-ct' '--enable-inline-optimization' '--with-gd'
'--enable-gd-native-ttf' '--with-dom=/usr' '--with-jpeg-dir'
'--with-png-dir' '--with-ttf=/usr' '--with-mcrypt'
'--with-oci8=/usr/share/oracle/product/10.2.0/client_1'
'--with-pspell=/usr' '--enable-memcache' '--with-ldap'
'--disable-memory-limit' '--with-imap=/usr' '--with-imap-ssl=/usr'

here is my backtrace from gdb

gdb /usr/sbin/apache2 -X -k start -D PHP4 -D SSL -D DOC
gdb: unrecognized option `-X'
Use `gdb --help' for a complete list of options.
xtgpl-group01:~# gdb
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux".
(gdb) run /usr/sbin/apache2 -X -k start -D PHP4 -D SSL -D DOC
Starting program:  /usr/sbin/apache2 -X -k start -D PHP4 -D SSL -D DOC
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) run -f /usr/sbin/apache2 -X -k start -D PHP4 -D SSL -D DOC
Starting program:  -f /usr/sbin/apache2 -X -k start -D PHP4 -D SSL -D DOC
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) quit
xtgpl-group01:~# gdb --args apache2 -X -k start -D PHP4 -D SSL -D DOC
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
 
(gdb) r
Starting program: /usr/sbin/apache2 -X -k start -D PHP4 -D SSL -D DOC
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 13570)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 13570)]
0x4042faff in memcpy () from /lib/libc.so.6
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) n
Program not restarted.
(gdb) backtrace
#0  0x4042faff in memcpy () from /lib/libc.so.6
#1  0x4089df95 in php_var_serialize_intern (buf=0xbffff240,
struc=0x84b90b0, var_hash=0xbffff210) at php_smart_str.h:84
#2  0x4089db55 in php_var_serialize_intern (buf=0xbffff240,
struc=0x84b90e8, var_hash=0xbffff210)
    at /downloads/php4/php4-4.3.10/ext/standard/var.c:646
#3  0x4089db55 in php_var_serialize_intern (buf=0xbffff240,
struc=0x8e650a0, var_hash=0xbffff210)
    at /downloads/php4/php4-4.3.10/ext/standard/var.c:646
#4  0x4089db55 in php_var_serialize_intern (buf=0xbffff240,
struc=0x8e650d8, var_hash=0xbffff210)
    at /downloads/php4/php4-4.3.10/ext/standard/var.c:646
#5  0x4089db55 in php_var_serialize_intern (buf=0xbffff240,
struc=0x8e65c38, var_hash=0xbffff210)
    at /downloads/php4/php4-4.3.10/ext/standard/var.c:646
#6  0x4089e922 in php_var_serialize (buf=0xbffff240, struc=0x8af5927,
var_hash=0x8af5927)
    at /downloads/php4/php4-4.3.10/ext/standard/var.c:661
#7  0x40843276 in ps_srlzr_encode_php (newstr=0x8af5927, newlen=0xbffff2b0)
    at /downloads/php4/php4-4.3.10/ext/session/session.c:440
#8  0x408438e6 in php_session_encode (newlen=0x8af5927) at
/downloads/php4/php4-4.3.10/ext/session/session.c:537
#9  0x40843f12 in php_session_save_current_state () at
/downloads/php4/php4-4.3.10/ext/session/session.c:704
#10 0x40846ebb in php_session_flush () at
/downloads/php4/php4-4.3.10/ext/session/session.c:1654
#11 0x40846edb in zm_deactivate_session (type=1, module_number=13) at
/downloads/php4/php4-4.3.10/ext/session/session.c:1668
#12 0x408f9cb9 in module_registry_cleanup (module=0x8af5927) at
/downloads/php4/php4-4.3.10/Zend/zend_API.c:1168
#13 0x408fc129 in zend_hash_apply (ht=0x40ae1d60, apply_func=0x408f9c80
<module_registry_cleanup>)
    at /downloads/php4/php4-4.3.10/Zend/zend_hash.c:701
#14 0x408f6bb0 in zend_deactivate_modules () at
/downloads/php4/php4-4.3.10/Zend/zend.c:653
#15 0x408c7e55 in php_request_shutdown (dummy=0x0) at
/downloads/php4/php4-4.3.10/main/main.c:982
#16 0x4090c2e0 in php_apache_request_dtor (r=0x8989708) at
/downloads/php4/php4-4.3.10/sapi/apache2handler/mod_php4.c:461
#17 0x4090c5ba in php_handler (r=0x8989708) at
/downloads/php4/php4-4.3.10/sapi/apache2handler/mod_php4.c:595
#18 0x08078375 in ap_run_handler ()
#19 0x08078980 in ap_invoke_handler ()
#20 0x08069c6a in ap_process_request ()
#21 0x0806512d in _start ()
#22 0x08989708 in ?? ()
#23 0x00000004 in ?? ()
#24 0x08989708 in ?? ()
#25 0x40603d80 in modperl_process_connection_handler () from
/usr/lib/apache2/modules/mod_perl.so
#26 0x080835c5 in ap_run_process_connection ()
#27 0x08076974 in ap_graceful_stop_signalled ()
#28 0x08076b8b in ap_graceful_stop_signalled ()
#29 0x08076be8 in ap_graceful_stop_signalled ()
#30 0x0807745a in ap_mpm_run ()
#31 0x0807da8d in main ()
(gdb)


   I hope I have included enough info.

    Thanks
       Virgil



More information about the horde mailing list