Comment 5 for bug 1159748

Hello again,
last sunday the apache2 process died again:
[1710511.756125] /usr/sbin/apach[4244]: segfault at 6c ip 00007f2e061b7e84 sp 00007fffbdc40060 error 4 in[7f2e061ae000+18000]

I attach the apache2 (CoreDumpDirectory in the apache configuration file ) core generate in this crash.

Thinking about this crash, as it happens regularly almost every sunday around 06:45 AM, maybe the crash is generated by the tasks crond runs weekly:
grep weekly /etc/crontab
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )

Weekly, crontab runs this tasks:


apt-xapian-index man-db

cat apt-xapian-index



# ionice should not be called in a virtual environment
# (similar to man-db cronjobs)
egrep -q '(envID|VxID):.*[1-9]' /proc/self/status || IONICE=/usr/bin/ionice

# Check if we're on battery
if which on_ac_power >/dev/null 2>&1; then
    on_ac_power >/dev/null 2>&1

    # Here we use "-eq 1" instead of "-ne 0" because
    # on_ac_power could also return 255, which means
    # it can't tell whether we are on AC or not. In
    # that case, run update-a-x-i nevertheless.
    [ "$ON_BATTERY" -eq 1 ] && exit 0

# Rebuild the index
if [ -x "$CMD" ]
        if [ -x "$IONICE" ]
                nice -n 19 $IONICE -c 3 $CMD --quiet
                nice -n 19 $CMD --quiet

cat man-db
# man-db cron weekly

set -e

# Don't try to change I/O priority in a vserver or OpenVZ.
if ! egrep -q '(envID|VxID):.*[1-9]' /proc/self/status && \
   ([ ! -d /proc/vz ] || [ -d /proc/bc ]); then
    dpkg_version="$(dpkg-query -W -f '${Version}' dpkg 2>/dev/null)"
    if dpkg --compare-versions "$dpkg_version" ge 1.15.0; then
        iosched_idle='--iosched idle'

if ! [ -d /var/cache/man ]; then
    # Recover from deletion, per FHS.
    mkdir -p /var/cache/man
    chown man:root /var/cache/man || true
    chmod 2755 /var/cache/man

# regenerate man database
if [ -x /usr/bin/mandb ]; then
    # --pidfile /dev/null so it always starts; mandb isn't really a daemon,
    # but we want to start it like one.
    start-stop-daemon --start --pidfile /dev/null \
                      --startas /usr/bin/mandb --oknodo --chuid man \
                      $iosched_idle \
                      -- --quiet

exit 0

Then, i will deactivate this two crontab tasks (apt-xapian-index and man-db) and monitor the next Sunday if the apache crash happens again :)

Anyway, i have configured a watchdog that checks every 3 minutes if the apache2 process is running, if not, it starts it.