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 libpthread-2.15.so[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:

pwd
/etc/cron.weekly

ls
apt-xapian-index man-db

cat apt-xapian-index

#!/bin/sh

CMD=/usr/sbin/update-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
    ON_BATTERY=$?

    # 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
fi

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

cat man-db
#!/bin/sh
#
# man-db cron weekly

set -e

iosched_idle=
# 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'
    fi
fi

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
fi

# 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
fi

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.

Regards,