#71 segfault only on phpinfo(); with 2.4.6

open
nobody
None
7
2003-11-28
2003-11-28
No

Inside error_log from Apache 1.3.27
[31251] MMCACHE: PHP crashed on opline 0 of phpinfo()
at /home/apache/testdomain.de/info.php:2

php.ini:
extension="mmcache.so"
mmcache.shm_size="16"
mmcache.cache_dir="/tmp/mmcache"
mmcache.enable="1"
mmcache.optimizer="1"
mmcache.check_mtime="1"
mmcache.debug="0"
mmcache.filter=""
mmcache.shm_max="0"
mmcache.shm_ttl="0"
mmcache.shm_prune_period="0"
mmcache.shm_only="0"
mmcache.compress="1"

php version 4.3.4

configure script for php:
#! /bin/sh
#
# Created by configure

'./configure' \ 'i386-redhat-linux' \ '--prefix=/usr' \ '--exec-prefix=/usr' \ '--bindir=/usr/bin' \ '--sbindir=/usr/sbin' \ '--sysconfdir=/etc' \ '--datadir=/usr/share' \ '--includedir=/usr/include' \ '--libdir=/usr/lib' \ '--libexecdir=/usr/libexec' \ '--localstatedir=/var' \ '--sharedstatedir=/usr/com' \ '--mandir=/usr/share/man' \ '--infodir=/usr/share/info' \ '--prefix=/usr' \ '--with-config-file-path=/etc' \ '--enable-pic' \ '--disable-rpath' \ '--enable-inline-optimization' \ '--with-bz2' \ '--with-db3' \ '--with-curl' \ '--with-dom=/usr' \ '--with-exec-dir=/usr/bin' \ '--with-freetype-dir=/usr' \ '--with-png-dir=/usr' \ '--with-gd' \ '--enable-gd-native-ttf' \ '--with-ttf' \ '--with-gdbm' \ '--with-gettext=shared' \ '--with-gmp' \ '--with-jpeg-dir=/usr' \ '--with-mm' \ '--with-openssl' \ '--with-png' \ '--with-pspell' \ '--with-regex=system' \ '--with-xml' \ '--with-expat-dir=/usr' \ '--with-zlib' \ '--with-layout=GNU' \ '--enable-bcmath' \ '--enable-exif' \ '--with-pear=/usr/share/pear' \ '--enable-sockets' \ '--enable-discard-path' \ '--enable-track-vars' \ '--enable-trans-sid' \ '--enable-yp' \ '--enable-wddx' \ '--without-oci8' \ '--with-imap=shared' \ '--with-imap-ssl' \ '--with-kerberos=/usr/kerberos' \ '--with-ldap=shared' \ '--enable-sysvsem=shared' \ '--enable-sysvshm=shared' \ '--enable-ftp=shared' \ '--with-mysql=shared,/usr' \ '--enable-memory-limit' \ '--enable-bcmath' \ '--enable-shmop' \ '--enable-versioning' \ '--enable-calendar' \ '--enable-dbx' \ '--enable-dio' \ '--enable-mbstring' \ '--with-apxs=/usr/sbin/apxs' \ '--with-zip=/usr/src/zziplib' \ "$@"

MMCACHE Info:
MMCache 2.4.6 [shm:sysvipc sem:spinlock], PHP 4.3.4
[ZE 1.3.0], Apache [Apache/1.3.27 (Unix) (Red-
Hat/Linux) mod_gzip/1.3.26.1a DAV/1.0.3
mod_perl/1.26], Linux www 2.4.20-19.7 #1 Tue Jul 15
13:29:53 EDT 2003 i686

Using the two disable-buttons in mmcache.php didn't
change anything. apache still segfaults. The funny thing
is, it is the one and only php-function that crashes
apache.

best regards

Andreas Lange

Discussion

  • Andreas Lange

    Andreas Lange - 2003-11-28
    • priority: 5 --> 7
     
  • Olivier BONVALET

    Logged In: YES
    user_id=599881

    I have the same problem with PHP 4.3.8 and Turck 2.4.6 :(

     
  • Nobody/Anonymous

    Logged In: NO

    I had a similar problem with Turck MMCache 2.4.6 and PHP
    4.3.8 on RHEL ES 2.1. I'm not sure whether it is exactly
    the same problem or not as there are other bug reports which
    also sound very similar, but none which seem to match 100%.
    The problem that I encountered was that Apache would
    segfault on calls to phpinfo(), but only when run with
    output buffering (i.e., ob_start() had been previously
    called) and only after Apache was restarted at night by
    Logrotate. The code worked fine when Apache first started
    up, but then a few days later the same page would produce
    segfaults and I tracked it down to occurring sometimes (but
    not always) when Apache was restarted with signal HUP.

    I found two workarounds which seemed to alleviate the
    problem. First, disabling the Turck MMCache optimizer in
    "php.ini" seemed to fix things. Also, on another server
    which had the same problem, I replaced the Logrotate script
    for Apache with a script that completely shut down Apache
    and then started it again rather than having it restart
    Apache via SIGHUP, and that also seemed to fix the problem.
    In the end, I decided to just turn the optimizer off since
    it wasn't having a noticeable impact on performance.

    I don't know if these workarounds are directly relevant to
    this particular bug, but I thought I would mention them here
    in case anybody else is running into a similar problem and
    is searching for an immediate workaround.

    - Tim Macinta
    twm@alum.mit.edu

     
  • Olivier BONVALET

    Logged In: YES
    user_id=599881

    In my case I just stop the Turck MMCache session handling,
    and all works fine (after logrotate and "apachectl
    gracefull" too).

    I tested on 2 servers :
    - Debian 3.0 Woody, default package version of Apache and
    PHP : session handling seems to crash PHP on phpinfo()
    - Debian 3.0 Sarge : Apache 2.0.49, PHP 4.3.7 then 4.3.8,
    all works fine

     

Log in to post a comment.