touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #75635
[Bug 1297678] Re: When /etc/cron.daily/apt upgrades apache2 it gets run-parts stuck forever in select() instead of going on to the next script
Support for this version has ended
** Changed in: apt (Ubuntu)
Status: Confirmed => Invalid
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1297678
Title:
When /etc/cron.daily/apt upgrades apache2 it gets run-parts stuck
forever in select() instead of going on to the next script
Status in apt package in Ubuntu:
Invalid
Bug description:
When unattended-upgrades are enabled and the daily apt cron script
upgrades apache2, somehow it ends up making run-parts stuck forever in
select([6]), where 6 is the read side of a pipe, the other end of
which is held by all apache processes.
Here's the story:
I got an email from cron, saying that it tried to start anacron at
7:30 this morning but couldn't, because
start: Job is already running: anacron
So I ssh in and look around. Here's what I see:
# pstree -aup $(pidof anacron)
anacron,5405 -s
└─sh,5408 -c nice run-parts --report /etc/cron.daily
└─run-parts,5410 --report /etc/cron.daily
└─(apt,5417)
# strace -p 5410
select(7, [6], NULL, NULL, NULL
# lsof -p 5410
run-parts 5410 root 6r FIFO 0,8 0t0 274237 pipe
# lsof | grep 274237
run-parts 5410 root 6r FIFO 0,8 0t0 274237 pipe
apache2 17943 root 40w FIFO 0,8 0t0 274237 pipe
apache2 17945 www-data 40w FIFO 0,8 0t0 274237 pipe
apache2 17946 www-data 40w FIFO 0,8 0t0 274237 pipe
apache2 17947 www-data 40w FIFO 0,8 0t0 274237 pipe
# ps -o pid,lstart,cmd 5405 5408 5410 5417 17943 17945 17946 17947
PID STARTED CMD
5405 Tue Mar 25 07:30:01 2014 anacron -s
5408 Tue Mar 25 07:35:01 2014 /bin/sh -c nice run-parts --report /etc/cron.daily
5410 Tue Mar 25 07:35:01 2014 run-parts --report /etc/cron.daily
5417 Tue Mar 25 07:35:01 2014 [apt] <defunct>
17943 Tue Mar 25 07:59:48 2014 /usr/sbin/apache2 -k start
17945 Tue Mar 25 07:59:48 2014 /usr/sbin/apache2 -k start
17946 Tue Mar 25 07:59:48 2014 /usr/sbin/apache2 -k start
17947 Tue Mar 25 07:59:48 2014 /usr/sbin/apache2 -k start
# pgrep apache2
17943
17945
17946
17947
# less /var/log/syslog
Mar 25 07:30:01 muskatas anacron[5405]: Anacron 2.3 started on 2014-03-25
Mar 25 07:30:01 muskatas anacron[5405]: Will run job `cron.daily' in 5 min.
Mar 25 07:30:01 muskatas anacron[5405]: Will run job `cron.weekly' in 10 min.
Mar 25 07:30:01 muskatas anacron[5405]: Jobs will be executed sequentially
Mar 25 07:31:55 muskatas ntpd[3288]: kernel time sync status change 6001
Mar 25 07:35:01 muskatas anacron[5405]: Job `cron.daily' started
Mar 25 07:35:01 muskatas anacron[5413]: Updated timestamp for job `cron.daily' to 2014-03-25
I also got an email from unattended-upgrades dated 07:59:54, saying
that it successfully upgraded and restarted apache2, which explains
the STARTED times.
I've no idea why run-parts is waiting for file descriptor 6, or why
apache is holding the other end of it (but not writing anything
there).
This is the second time this happens, on the same Ubuntu 10.04 LTS
server. The first time was in 2012.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: apt 0.7.25.3ubuntu9.14
ProcVersionSignature: Ubuntu 2.6.32-57.119-generic 2.6.32.61+drm33.26
Uname: Linux 2.6.32-57-generic x86_64
Architecture: amd64
Date: Wed Mar 26 09:57:36 2014
ProcEnviron:
LC_CTYPE=lt_LT.UTF-8
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: apt
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1297678/+subscriptions