php5-fpm segfault

  • Hi,
    on a recent default installation on Ubuntu - 14 LTS and 1.2.9 we encountered lots of segmentation faults:
    #dmes
    php5-fpm[30736]: segfault at 7f45016b7021 ip 000000000070cb99 sp 00007ffd9d87ced0 error 4 in php5-fpm[400000+800000]


    the entire domain is down until we re-start Apache. We know that the segmentation fault is possibly caused by PHP based file downloader(Using a 8MB buffer), in detail, its triggered by users, downloading large files through PHP.


    It happens every 10 minutes and I am wondering what to do now!?


    Other details:
    3.19.0-25-generic (SMP)
    PHP: 5.5.9-1ubuntu4.11
    all on default, nothing changed.


    Any hints are welcome. If we could change to good old apache PHP module, I think that could do; just don't know how!?
    Thanks

  • Hello ;


    Here, all is about configuration.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hi,
    thanks for the tips! I will do so.


    I just noticed that crash doesn't occur when the file is printed out on a fast connection. Weird, this code worked so far with all PHP versions below 5.5.9:
    self::sendHeader( $mime, false, basename( $target_file ) );


    // chunk file
    $chunk_size = intval( $options[ self::OPTION_CHUNK_SIZE ] ) * 1024 * 1024; // Convert chunk size to bytes
    $handle = fopen( $target_file, 'rb' );
    while ( ! feof( $handle ) ) {
    $buffer = fread( $handle, $chunk_size );
    echo $buffer;
    set_time_limit( 50 );
    ob_flush();
    flush();
    }
    fclose( $handle );


    I will ask the PHP guys ;-)
    g