Opened 10 years ago

Closed 10 years ago

#135 closed defect (fixed)

shutdown command not honored nor sent to all

Reported by: jreed Owned by: jreed
Priority: medium Milestone: 04. 2nd Incremental Release: Early Adopters
Component: ~Boss of BIND (obsolete) Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: Add Hours to Ticket:
Total Hours: Internal?:


bind10 is supposed to send shutdown over msgq command channel to its children to ask them to exit cleanly.

^CReceived SIGINT.
Stopping the server.
Sent shutdown message on command channel.
Process msgq (PID 19115) died.
Process b10-xfrin (PID 24150) died.
Process b10-auth (PID 21778) died.
Sending SIGTERM to b10-xfrout (PID 4672).
Sending SIGTERM to b10-cfgmgr (PID 20450).
Process b10-cmdctl (PID 22397) died.
Process b10-cfgmgr (PID 20450) died.
Sending SIGKILL to b10-xfrout (PID 4672).
Process b10-xfrout (PID 4672) died.
All processes ended, server done.

(Ignore the sigkill issue -- that is ticket #121.)

See above that msgq, xfrin, and auth all died and no SIGTERM is sent to them. A SIGTERM is sent to xfrout, cfgmgr, and cmdctl.

bind10 has: (The verbose output is my custom addition)

    def stop_all_processes(self):
        """Stop all processes."""
        cmd = { "command": ['shutdown']}
        self.cc_session.group_sendmsg(cmd, 'Boss', 'Cmd-Ctrld')
        self.cc_session.group_sendmsg(cmd, "Boss", "ConfigManager")
        self.cc_session.group_sendmsg(cmd, "Boss", "Auth")
        if self.verbose:
            sys.stdout.write("Sent shutdown message on command channel.\n")

I don't understand why xfrin and msgq died. What told them to die? I don't understand why cfgmgr did not die (before SIGTERM). And I don't understand why the cmdctl died after other processes were sent a SIGTERM. Is it not waiting long enough?


Attachments (1) (589 bytes) - added by zhanglikun 10 years ago.
The patch for fixing ticket 135

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by jreed

Also why isn't shutdown command sent to all processes?

comment:2 Changed 10 years ago by zhanglikun

When Ctrl-C is inputted, boss should send 'shutdown' command to all sub processes.

Changed 10 years ago by zhanglikun

The patch for fixing ticket 135

comment:3 Changed 10 years ago by zhanglikun

  • Owner set to jreed
  • Status changed from new to assigned

Fixed in revision 1797. You can find more details in comment of ticket 134.

comment:4 Changed 10 years ago by shane

  • Component changed from Unclassified to Boss of BIND
  • Milestone set to 04. 2nd Incremental Release
  • Resolution set to fixed
  • Status changed from assigned to closed

I'm declaring this one fixed.

Note: See TracTickets for help on using tickets.