Score:1

Apache2 Segmentation Fault after upgrading to PHP8.0 Ubuntu 20

ke flag

I recently upgraded a production server from PHP 7.4 to PHP 8.0 (this is using the ondrej packages). As a reference, I'm using Ubuntu 20.04.3, apache2.4.46 and now PHP8.0.

After about 18 hours, the apache server stopped responding, giving an empty response data error. Apache gave the following error:

[core:notice] [pid 1285919] AH00051: child pid 1329445 exit signal Segmentation fault (11), possible coredump in /etc/apache2

Unfortunately no coredumps were in /etc/apache2/. I also saw conflicting information on enabling coredumps, namely that the CoreDumpDirectory could cause issues with file sizes and other things.

I was wondering a couple of things:

  1. How should I go about debugging apache2 on a production system? Should I enable coredumps? What is the best way to ensure it doesn't go crazy and fill up disk space?
  2. How can I ensure that it doesn't go down again? Is there some monitoring tool or tool I should use to restart apache?
  3. Is this just a PHP8.0 package issue? Has anyone run into this recently? Below are the packages installed via php -m:
    [PHP Modules]
    amqp
    calendar
    Core
    ctype
    curl
    date
    decimal
    dom
    exif
    FFI
    fileinfo
    filter
    ftp
    gd
    gettext
    gmagick
    hash
    iconv
    igbinary
    intl
    json
    ldap
    libxml
    mbstring
    memcache
    memcached
    mongodb
    msgpack
    mysqli
    mysqlnd
    OAuth
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    raphf
    readline
    redis
    Reflection
    rrd
    session
    shmop
    SimpleXML
    sockets
    sodium
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    uuid
    xhprof
    xml
    xmlreader
    xmlwriter
    xsl
    yac
    yaml
    Zend OPcache
    zip
    zlib
    zmq
    
    [Zend Modules]
    Zend OPcache

I was able to just run service apache2 restart to get everything back up and running, but in the ~3 years or so from when I've done upgrades from PHP7/7.1/7.2/7.3/7.4, I haven't had any apache2 issues like this.

Any advice is appreciated.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.