Solved Postfix causing "rc.shutdown: 90 second watchdog timeout expired. Shutdown terminated."?

For some unknown(yet) reason shutdown -r now stops on
Code:
postfix/postfix-script: stopping the Postfix mail system
I got smtpd -vv in /usr/local/etc/postfix/master.cf but my /var/log/maillog isn't that verbose.
Code:
smtp  inet  n  -  n  -  -  smtpd -vv
/var/log/maillog
Code:
Dec 19 17:32:59 beast postfix/postfix-script[1451]: stopping the Postfix mail system
Dec 19 17:32:59 beast postfix/master[1290]: terminating on signal 15
/var/log/messages
Code:
Dec 19 17:34:29 beast rc.shutdown: 90 second watchdog timeout expired. Shutdown terminated.
Dec 19 17:34:29 beast init: /bin/sh on /etc/rc.shutdown terminated abnormally, going to single user mode
Dec 19 17:34:29 beast syslogd: exiting on signal 15
service postfix restart works instantly
Code:
postfix/postfix-script: stopping the Postfix mail system
postfix/postfix-script: starting the Postfix mail system
It's even more interesting I get the same delay (which may be less than 90 seconds, it varies) when postfix(1) service is already stopped prior shutdown -r now with a "not running" warning. There is no delay at startup. All other services (say 10) work just fine. This machine does not serve mail. What's bad about this if uptime isn't such a problem is that other services which are supposed to be stopped after the Postfix service are not.
FreeBSD 10.2-RELEASE-p7, Postfix 3.0.3.

Any ideas?
 
What's immediately after postfix? rcorder /etc/rc.d/* /usr/local/etc/rc.d/*
Does /var/run/postfix* look reasonable before shutdown ? pids etc.
Tried with ?
Code:
rc_debug="YES"

Juha

wonders if those "" are really needed :)
 
Juha, thanks for the tip, with rc_debug enabled it turned out that Postfix isn't the real cause.
Code:
Dec 20 07:53:36 beast root: /etc/rc.shutdown: DEBUG: run_rc_script /usr/local/etc/rc.d/serviio faststop
Dec 20 07:53:36 beast root: /etc/rc.shutdown: DEBUG: checkyesno: serviio_enable is set to YES.
Dec 20 07:53:36 beast root: /etc/rc.shutdown: DEBUG: run_rc_command: doit: /usr/local/sbin/serviiod -stop
Dec 20 07:54:52 beast root: /etc/rc.shutdown: DEBUG: run_rc_script /usr/local/etc/rc.d/smartd faststop
Serviio (DLNA service) took 1min 16sec in this case.

For now I did:
/etc/sysctl.conf
Code:
kern.init_shutdown_timeout=180
/etc/rc.conf
Code:
rcshutdown_timeout="120"
which solved the "90 second watchdog timeout expired. Shutdown terminated." problem, anyway I don't like this solution so I posted on Serviio forum to see if there is something I can do about it http://forum.serviio.org/viewtopic.php?f=5&t=21314
 
Peeking into shutdown intestines, there is a nice
Code:
if [ -n "$rc_fast_and_loose" ]; then
  set $_arg; . $_file
else
  ( trap "echo Script $_file interrupted >&2 ; kill -QUIT $$" 3
  trap "echo Script $_file interrupted >&2 ; exit 1" 2
  trap "echo Script $_file running >&2" 29
  set $_arg; . $_file )
fi
but, the stopwatch child does a
Code:
sleep $rcshutdown_timeout && (
  _msg="$rcshutdown_timeout second watchdog"
  _msg="$_msg timeout expired. Shutdown terminated."
  logger -t rc.shutdown "$_msg"
  echo "$_msg"
  date
  kill -KILL $$ >/dev/null 2>&1
  ) &
Would be nice if there was a kill -INFO $$ ; sleep 1 before the axe.

Juha
 
Back
Top