Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Aug 2009 10:23:30 -0400
From:      Michael Scheidell <scheidell@secnap.net>
To:        freebsd-jail@FreeBSD.org
Subject:   Re: crontab hanging won't die on SIGTERM in jail
Message-ID:  <4A7AE762.2070408@secnap.net>
In-Reply-To: <4A7AE4D4.2090600@secnap.net>
References:  <4A7AE4D4.2090600@secnap.net>

next in thread | previous in thread | raw e-mail | index | archive | help
this doesn't stop cron:

/etc/rc.d/cron stop
(just keeps spitting out the pid)

killall -SIGTERM cron (doesn't work)

killall -SIGQUIT|SIGKILL seems to work.


Workaround is this:

echo "sigstop=SIGQUIT" > /etc/rc.conf.d/cron

works fine now.


isn't needed in base, just in jail.



Michael Scheidell wrote:
> anyone having problems during an in jail shutdown with crontab hanging?
> I have seen this in 6.4 and 7.1, on i386 and amd64.
> I don't remember problems with 6.3
>
>
> using jailtools (jkill -r), OR
> shutdown -r +0
>
> OR
>
> reboot
> reboot: SIGTSTP init: No such process
>
> truss shows:
> truss -p 87553
> (null)()                                         = 0 (0x0)
> gettimeofday({1249567500.835698},0x0)            = 0 (0x0)
> stat("tabs",{mode=drwx------ ,inode=10458278,size=512,blksize=4096}) = 
> 0 (0x0)
> stat("/etc/crontab",{mode=-rw-r--r-- 
> ,inode=10461256,size=748,blksize=4096}) = 0 (0x0)
> gettimeofday({1249567500.836244},0x0)            = 0 (0x0)
> fork()                                           = 88217 (0x15899)
> gettimeofday({1249567500.836862},0x0)            = 0 (0x0)
> nanosleep({60.000000000})                        ERR#4 'Interrupted 
> system call'
> SIGNAL 20 (SIGCHLD)
> SIGNAL 20 (SIGCHLD)
> wait4(0xffffffff,0xbfbfe99c,0x1,0x0)             = 88217 (0x15899)
> wait4(0xffffffff,0xbfbfe99c,0x1,0x0)             ERR#10 'No child 
> processes'
> sigreturn(0xbfbfe9d0)                            ERR#4 'Interrupted 
> system call'
> gettimeofday({1249567500.842115},0x0)            = 0 (0x0)
>
>
> killall -SIGTERM cron
>
> (caused NO truss activity)
>
> it sees a HUP:
>
> killall -SIGHUP  cron
>
> truss:
> SIGNAL 1 (SIGHUP)
> (null)()                                         ERR#4 'Interrupted 
> system call'
> gettimeofday({17.000000},0x0)                    = 0 (0x0)
> (null)()                                         = 0 (0x0)
>
>
> SIGKILL will kill it.
>
>

-- 
Michael Scheidell, CTO
Phone: 561-999-5000, x 1259
 > *| *SECNAP Network Security Corporation

    * Certified SNORT Integrator
    * 2008-9 Hot Company Award Winner, World Executive Alliance
    * Five-Star Partner Program 2009, VARBusiness
    * Best Anti-Spam Product 2008, Network Products Guide
    * King of Spam Filters, SC Magazine 2008


_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.secnap.com/products/spammertrap/
_________________________________________________________________________
   



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A7AE762.2070408>