Project

General

Profile

Bug #8890

ipfilter and nfs/server are locked in death race

Added by Andrew Stormont over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2016-08-04
Due date:
2016-08-04
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

ipfilter and nfs/server both check the state of the other service on boot, and if it's transitioning they wait. This can lead to both services blocking indefinitely, causing the timeout to be reached and SMF to kill them.

From ipfilter service log

+ svcprop -p restarter/next_state svc:/network/nfs/server:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/nfs/server:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/nfs/server:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/nfs/server:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/nfs/server:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/nfs/server:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/nfs/server:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/nfs/server:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/nfs/server:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/nfs/server:default
+ [ online != none ]
+ sleep 1
[ Dec  4 16:06:58 Method or service exit timed out.  Killing contract 103. ]
[ Dec  4 16:06:58 Rereading configuration. ]
[ Dec  4 16:06:58 Leaving maintenance because disable requested. ]
[ Dec  4 16:06:58 Rereading configuration. ]
[ Dec  4 16:06:58 Disabled. ]

From nfs service log

+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ online != none ]
+ sleep 1
+ svcprop -p restarter/next_state svc:/network/ipfilter:default
+ [ none != none ]
+ svcprop -p restarter/state svc:/network/ipfilter:default
+ [ disabled = online ]
+ return 1
+ return 0
+ exit 0

Ultimately the one with the longest timeout wins.


Related issues

Follows illumos gate - Bug #7267: SMF is fast and loose with optional dependenciesClosed2016-08-03

Actions

History

#1

Updated by Andrew Stormont over 1 year ago

  • Description updated (diff)
#2

Updated by Andrew Stormont over 1 year ago

  • Due date set to 2016-08-04
  • Start date changed from 2017-12-04 to 2016-08-04
  • Follows Bug #7267: SMF is fast and loose with optional dependencies added
#3

Updated by Andrew Stormont over 1 year ago

The problem that I think this code was originally trying to solve is that the start order for optional dependencies is unpredictable, meaning that nfs/server could start before ipfilter has finished transitioning. This was fixed in #7267. In addition, dependents are now restarted when an optional dependency comes online, meaning the method files shouldn't need to do anything.

Also available in: Atom PDF