[bug-notifications] [nrpe 0003730]: svcadm disable cswnrpe does not gracefully handle missing pid_file param, hangs system on shutdown

Mantis Bug Tracker noreply at opencsw.org
Tue Jul 7 18:42:41 CEST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://opencsw.org/bugtrack/view.php?id=3730 
====================================================================== 
Reported By:                gadavis
Assigned To:                ja
====================================================================== 
Project:                    nrpe
Issue ID:                   3730
Category:                   regular use
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             2009-06-26 00:28 CEST
Last Modified:              2009-07-07 18:42 CEST
====================================================================== 
Summary:                    svcadm disable cswnrpe does not gracefully handle
missing pid_file param, hangs system on shutdown
Description: 
CSWnpre 2.12,REV=2009.06.18 fails to successfully shutdown on Solaris 10
SPARC. This causes something in the SMF framework to hang when the system
is init 6'd or init 1'd. The system must be Stop-A'd and rebooted.

When a manual svcadm enable/ svcadm disable is issued, the following is
observed in /var/svc/log/application-cswnrpe:default.log:

[ Jun 25 22:01:14 Executing start method
("/var/opt/csw/svc/method/svc-cswnrpe s
tart") ]
[ Jun 25 22:01:16 Method "start" exited with status 0 ]
[ Jun 25 22:02:12 Stopping because service disabled. ]
[ Jun 25 22:02:12 Executing stop method
("/var/opt/csw/svc/method/svc-cswnrpe st
op") ]
/usr/bin/kill[8]: kill: bad argument count
[ Jun 25 22:02:13 Method "stop" exited with status 0 ]

svcs -xv shows:
# svcs -xv cswnrpe
svc:/application/cswnrpe:default (?)
 State: online since June 25, 2009 10:02:12 PM UTC
   See: /var/svc/log/application-cswnrpe:default.log
Impact: None.

Digging a bit further, it appears that the stop method script does not
have any sort of error checking to see if pid_file is defined in nrpe.cfg.

This is a bit of a problem for those of us upgrading from an older version
of NRPE that didn't support the pid_file argument.

====================================================================== 

---------------------------------------------------------------------- 
 (0006407) gadavis (reporter) - 2009-07-07 18:42
 http://opencsw.org/bugtrack/view.php?id=3730#c6407 
---------------------------------------------------------------------- 
Another oddity, and probably the reason why the system hands when the
method script errors out, is that the timeout values are all set to
something huge.

[root at plinian:/root]
{516}# svccfg -s cswnrpe listprop start/timeout_seconds
start/timeout_seconds  count    18446744073709551615
[root at plinian:/root]
{517}# svccfg -s cswnrpe listprop stop/timeout_seconds
stop/timeout_seconds  count    18446744073709551615
[root at plinian:/root]
{518}# svccfg -s cswnrpe listprop restart/timeout_seconds
restart/timeout_seconds  count    18446744073709551615

Could you tweak your manifest so that those timeout values are brought
down to something reasonable like 60 seconds?

You might also consider just changing the stop/method property to ":kill"
- this negates the whole pid_file problem as well as the zone problem




More information about the bug-notifications mailing list