Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 388371

Summary: sys-process/fcron refuses to stop with --pidfile in start-stop-daemon
Product: Gentoo Linux Reporter: Steve Dibb (RETIRED) <beandog>
Component: New packagesAssignee: Thomas Deutschmann (RETIRED) <whissi>
Status: RESOLVED NEEDINFO    
Severity: normal CC: barzog, cron-bugs+disabled, staff
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Steve Dibb (RETIRED) gentoo-dev 2011-10-24 19:24:32 UTC
Anytime fcron is running more than one process (multiple PIDs), it refuses to stop using start-stop-daemon --pidfile ${FCRON_PIDFILE}

However, using -n fcron works great.

Lemme know if you need me to post any info.  I'd love to patch the init script.  This happens all the time, on every box I maintain.
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-10-24 19:36:01 UTC
Define "multiple PIDs" please.. cron tasks running?
Comment 2 Steve Dibb (RETIRED) gentoo-dev 2011-10-24 19:59:55 UTC
(In reply to comment #1)
> Define "multiple PIDs" please.. cron tasks running?

Nope, it just creates them sometimes.

# ps axf | grep fcron
 5804 pts/0    S+     0:00                          \_ grep --colour=auto fcron
 5357 ?        Ss     0:00 /usr/sbin/fcron -c /etc/fcron/fcron.conf
 5710 ?        S      0:00  \_ /usr/sbin/fcron -c /etc/fcron/fcron.conf


# pidof fcron
5710 5357
Comment 3 Steve Dibb (RETIRED) gentoo-dev 2011-10-24 20:00:25 UTC
# cat /var/run/fcron.pid 
5357
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-10-24 20:17:31 UTC
Check for defunct processes, please.

Those really look like the child fcron spawns to execute tasks, and those are correctly not TERM'd by s-s-d.
Comment 5 Steve Dibb (RETIRED) gentoo-dev 2011-10-24 21:16:15 UTC
(In reply to comment #4)
> Check for defunct processes, please.
> 
> Those really look like the child fcron spawns to execute tasks, and those are
> correctly not TERM'd by s-s-d.

Hmm, in that case, there may be some runaway cron jobs.  I'll keep an eye on the logs and do some research.

I do see this:

Oct 24 14:10:00 localhost fcron[5357]:     process already running: systab's test -x /usr/sbin/run-crons && /usr/sbin/run-crons
Oct 24 14:20:00 localhost fcron[5357]:     process already running: systab's test -x /usr/sbin/run-crons && /usr/sbin/run-crons
Oct 24 14:30:00 localhost fcron[5357]:     process already running: systab's test -x /usr/sbin/run-crons && /usr/sbin/run-crons
Oct 24 14:40:00 localhost fcron[5357]:     process already running: systab's test -x /usr/sbin/run-crons && /usr/sbin/run-crons
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-12-23 12:42:00 UTC
*** Bug 444302 has been marked as a duplicate of this bug. ***
Comment 7 Oleg Gawriloff 2013-01-29 06:39:49 UTC
It seems in my case the problem is with systat:

Jan 29 09:00:00 peerbox-r2 fcron[7883]: Job test -x /usr/sbin/run-crons && /usr/sbin/run-crons started for user systab (pid 7884)
Jan 29 09:00:00 peerbox-r2 run-crons[7890]: (root) CMD (/etc/cron.hourly/sysstat)
Jan 29 09:10:00 peerbox-r2 fcron[7815]:     process already running: systab's test -x /usr/sbin/run-crons && /usr/sbin/run-crons

root      7815  0.0  0.0  14496   748 ?        Ss   08:37   0:00 /usr/libexec/fcron -c /etc/fcron/fcron.conf
root      7883  0.0  0.0  52404  2016 ?        S    08:59   0:00 /usr/libexec/fcron -c /etc/fcron/fcron.conf
root      7884  0.0  0.0      0     0 ?        Zs   08:59   0:00 [bash] <defunct>

/etc/cron.hourly/sysstat:
/usr/lib64/sa/sa1 600 6 &
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2016-11-17 22:21:20 UTC
Are you running multiple fcron instances?

There were some problemes with the runscript which didn't return the pidfile all the time. Can you please retry with =sys-process/fcron-3.2.1? See

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=531e27c45e1f413da44d8a51ece0f59e454586fb

Please re-open if you are still see this with fcron-3.2.1.