Return of the core files

Discussion in 'PHP' started by felosi, Jun 5, 2008.

  1. felosi

    felosi Well-Known Member

    looks like from the last versions of lsws and php sapi that the core file thng is back, multiple gbit core files taking over all disk space.

    Php thing or not. I have core files disabled in limits.conf and it still does it!

    core files are disabled in lsws admin as well.

    I know Ive heard from here this is a "php" problem not a litespeed problem but Ive yet to see this on an a webserver running apache or lighttpd. I got people whos disk space is running out in minutes.

    Looking at the stack its usually bus error or signal something from lsphp5. Only seems to be happening on 64 bit servers.

    Now for real guys you got to help find a solution for this, I know Im not the only one its happening to. Last few weeks has been spent monitoring peoples folders for these things and deleting them.

    So please, without blaming php please help find a solution on these core dumps.
  2. mistwang

    mistwang LiteSpeed Staff

    We will not able to fix a php internal bug, which we believe it is the root cause of the core dump. However, if you do not want to have lsphp stop producing core dump files any more, the solution is easy.

    Just add the following code to LSAPI_Init_Env_Parameters() function in sapi/litespeed/lsapilib.c, the location is not important, we added it below the code that tests "LSAPI_AVOID_FORK".
        p = getenv( "LSAPI_ALLOW_CORE_DUMP" );
        if ( !p )
            struct rlimit limit = { 0, 0};
            setrlimit( RLIMIT_CORE, &limit );

    Then run "make" under php-5.2.6/ directory to build your lsphp binary again. then copy sapi/litespeed/php over to lsws/fcgi-bin/lsphp-5.2.6

    However, this solution only stop the core file, but the PHP will still crash.

Share This Page