Project

General

Profile

Bug #3991

startd, configd spinning due to bad sac start method

Added by Robert Mustacchi over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
cmd - userland programs
Start date:
2013-08-04
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

The sac service (svc:/system/sac:default) seems to be enabled by default on "joyent" branded zones, but its start method isn't right. The service is constantly restarting, with the log spewing this:

[ Jul  9 16:27:27 Executing start method ("/usr/lib/saf/sac"). ]
[ Jul  9 16:27:27 Stopping because service exited with an error. ]
[ Jul  9 16:27:27 Failing too quickly, throttling. ]
[ Jul  9 16:27:29 Executing start method ("/usr/lib/saf/sac"). ]
[ Jul  9 16:27:29 Stopping because service exited with an error. ]
[ Jul  9 16:27:29 Failing too quickly, throttling. ]
[ Jul  9 16:27:30 Executing start method ("/usr/lib/saf/sac"). ]
[ Jul  9 16:27:30 Stopping because service exited with an error. ]

I ran /usr/lib/saf/sac by hand and found that it doesn't emit anything to stderr, but writes directly to /dev/console. And indeed, on the zone's console, I found this:

SAC: Usage: sac -t sanity_interval
SAC: Usage: sac -t sanity_interval
SAC: Usage: sac -t sanity_interval
SAC: Usage: sac -t sanity_interval
SAC: Usage: sac -t sanity_interval
SAC: Usage: sac -t sanity_interval
SAC: Usage: sac -t sanity_interval

This is problematic because it causes startd and configd to be doing a lot of work, using up CPU to restart this service continuously.

The problem was due to the incorrect handling of the env var prefix checking code on the start method existence check. This was leave the method string as "/usr/lib/saf/sac" instead of "/usr/lib/saf/sac -t 300". Since smf doesn't support setting env vars on the start method string (it uses the method context from the manifest), I simply removed that code and simplified the existence check for the method.

History

#1

Updated by Robert Mustacchi over 6 years ago

  • Status changed from New to Resolved

Resolved in 2a17138d7a5102bc6e0bf0444224cd0c416d98f0.

Also available in: Atom PDF