Subscribe

Segmentation fault

  1. 2003-04-01 02:34:08 PST
    I've posted this message in Bugs section too.

    When modify a php script and then I try to access via
    web the page hang.
    If I try to acess again all works again without problems.

    In apache error log appears:
    [notice] child pid 23331 exit signal Segmentation fault
    (11)

    My configuration:
    MMCache 2.3.8, MM 1.3.0, PHP 4.3.1, Apache 2.0.44

    PHP configure:
    './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--
    with-exec-dir=/usr/bin' '--with-config-file-
    path=/usr/local/etc' '--with-zlib' '--with-bz2' '--with-gd' '--
    with-ttf' '--with-png' '--with-jpeg-dir=/usr' '--with-png-
    dir=/usr' '--with-freetype-dir=/usr' '--with-expat-dir=/usr' '--
    with-gmp' '--with-xml' '--with-pear=/usr/share/pear' '--with-
    mysql=shared' '--with-interbase=shared,/opt/interbase' '--
    with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-
    pgsql=shared' '--with-ldap=shared' '--with-pspell' '--with-
    kerberos' '--enable-mbstring=all' '--disable-debug' '--
    disable-rpath' '--disable-posix' '--enable-pic' '--enable-
    discard-path' '--enable-magic-quotes' '--enable-bcmath' '--
    enable-dio' '--enable-gd-native-ttf' '--enable-sysvsem' '--
    enable-sysvshm' '--enable-track-vars' '--enable-wddx' '--
    enable-inline-optimization' '--enable-memory-limit'

    PHP ini:
    zend_extension="/usr/local/lib/php/extensions/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=""

    Sorry about my english, I'm spanish
    Good work, is incredibly fast :)
  2. 2003-04-02 22:14:52 PST
    Please check is PHP crache on any page or only on the one.

    If PHP craches only on one script I think this is a problem in optimizer. Try to disable optimizer (mmcache.optimizer="0") or throught mmcache.php "Disable Optimizer" and "Clear". If now same file will work - this is an optimizer bug.

    If you will diside what this is an optimizer bug I will need your sources to fix MMCahce BUG.
  3. 2003-04-04 02:04:39 PST
    The problem is related to the optimizer, when I disable all works fine.
    Here 3 files to reproduce the error:

    error.php:
    ------------
    <?php
    include_once('error1.php');
    include_once('error2.php');
    echo test;
    ?>

    error1.php:
    --------------
    <?php
    //error1
    ?>

    <?php

    error2.php:
    --------------
    function err($ierr)
    {
    if($ierr=='')
    $a=2;
    else
    $a=1;

    exit('end');
    }
    ?>


    Access to error.php
    The first time all works fine.
    Now modify error2 (add a comment or modify $a)

    Access to error.php
    Now you can see an error (seg. fault) in apache log.

    To repair I only need to change exit('end') by exit without string or eliminate the 'else'

    Notes:
    Some times the server is freeze and you must have to refresh the page.

    Sometimes when I stop apache I need to do a:
    killall -9 httpd
    because the server is not stopped properly.

    Thanks for your good work
  4. 2003-04-06 23:16:43 PDT
    I hope, I fixed this bug.

    Please test it with latest version of MMCache from sourceforge CVS or wait for next release (2.3.9).
  5. 2003-04-07 03:39:58 PDT
    I've tested with the latest version from CVS and now all works perfectly.
    Fast and good job :)
Jump To:
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.