Opened 7 years ago

Closed 6 years ago

#2761 closed defect (wontfix)

CONFIG_SESSION_STOPPING_FAILED error sending stopping message: [Errno 32] Broken pipe on Init shutdown

Reported by: cas Owned by:
Priority: medium Milestone: Remaining BIND10 tickets
Component: ~bind-ctl (obsolete) Version: bind10-old
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Low
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 5 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

When I shutdown BIND 10 from bindctl "Init shutdown", I'm getting this error and stack trace:

2013-02-15 20:23:59.178 ERROR [b10-stats.config/3471] CONFIG_SESSION_STOPPING_FAILED error sending stopping message: [Errno 32] Broken pipe
Traceback (most recent call last):
  File "/usr/local/libexec/bind10/b10-cfgmgr", line 131, in <module>
2013-02-15 20:23:59.182 ERROR [b10-auth.cc/3470] CC_ASYNC_READ_FAILED asynchronous read failed (error code = 2)
    sys.exit(main())
  File "/usr/local/libexec/bind10/b10-cfgmgr", line 119, in main
    cm.run()
  File "/usr/local/lib/python3.3/site-packages/isc/config/cfgmgr.py", line 600, in run
Traceback (most recent call last):
  File "/usr/local/libexec/bind10/b10-stats", line 687, in <module>
    msg, env = self.cc.group_recvmsg(False)
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 280, in group_recvmsg
    env, msg  = self.recvmsg(nonblock, seq)
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 147, in recvmsg
    return self.recvmsg(nonblock, seq)
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 135, in recvmsg
    data = self._receive_full_buffer(nonblock)
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 217, in _receive_full_buffer
    self._receive_len_data()
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 177, in _receive_len_data
    new_data = self._receive_bytes(self._recv_len_size)
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 165, in _receive_bytes
    raise ProtocolError("Read of 0 bytes: connection closed")
isc.cc.session.ProtocolError: Read of 0 bytes: connection closed

Version 1.0.0-rc

Subtickets

Change History (5)

comment:1 Changed 7 years ago by cas

This time I have a different TrackBack? when doing shutdown (different server, different configuration - DNS resolver and DHCPv4):

Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/local/libexec/bind10/b10-stats-httpd", line 622, in <module>
  File "/usr/local/libexec/bind10/b10-cfgmgr", line 131, in <module>
    sys.exit(main())
  File "/usr/local/libexec/bind10/b10-cfgmgr", line 119, in main
    cm.run()
  File "/usr/local/lib/python3.3/site-packages/isc/config/cfgmgr.py", line 600, in run
    msg, env = self.cc.group_recvmsg(False)
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 280, in group_recvmsg
    env, msg  = self.recvmsg(nonblock, seq)
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 147, in recvmsg
    return self.recvmsg(nonblock, seq)
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 135, in recvmsg
    data = self._receive_full_buffer(nonblock)
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 217, in _receive_full_buffer
    self._receive_len_data()
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 177, in _receive_len_data
    new_data = self._receive_bytes(self._recv_len_size)
  File "/usr/local/lib/python3.3/site-packages/isc/cc/session.py", line 165, in _receive_bytes
    raise ProtocolError("Read of 0 bytes: connection closed")
isc.cc.session.ProtocolError: Read of 0 bytes: connection closed
Unhandled exception in thread started by <bound method Thread._bootstrap of <Thread(Thread-1, stopped daemon 140006474983168)>>

comment:2 Changed 7 years ago by shane

  • Component changed from Unclassified to bind-ctl
  • Defect Severity changed from N/A to Low
  • Milestone changed from New Tasks to Next-Sprint-Proposed

So we need to gracefully handle the ProtocolError? exception. We can check for the specific error and re-raise the exception if it is not connection closed, to give us stack traces in those cases.

comment:3 Changed 7 years ago by shane

I got a related issue on my own server. The b10-xfrin process restarted:

2013-03-11 17:16:12.130 INFO  [b10-xfrin.xfrin/23059] XFRIN_XFR_TRANSFER_STARTED IXFR transfer of zone time-travellers.nl.eu.org/IN started
2013-03-11 17:16:12.297 INFO  [b10-xfrin.xfrin/23059] XFRIN_IXFR_TRANSFER_SUCCESS incremental IXFR transfer of zone time-travellers.nl.eu.org/IN succeeded (messages: 1, changesets: 2, deletions: 10, additions: 10, bytes: 2223, run time: 0.275 seconds, 8073 bytes/second)
2013-03-12 16:39:06.557 ERROR [b10-xfrin.xfrin/23059] XFRIN_UNKNOWN_ERROR unknown error: Read of 0 bytes: connection closed
2013-03-12 16:39:06.643 ERROR [b10-xfrin.config/23059] CONFIG_SESSION_STOPPING_FAILED error sending stopping message: [Errno 32] Broken pipe
2013-03-12 16:39:07.058 INFO  [b10-xfrin.xfrin/23059] XFRIN_EXITING exiting
2013-03-12 16:39:07.648 INFO  [b10-init.init/22470] BIND10_PROCESS_ENDED process 23059 of b10-xfrin ended with status 0
2013-03-12 16:39:07.673 ERROR [b10-init.init/22470] BIND10_COMPONENT_FAILED component b10-xfrin (pid 23059) failed: process exited normally with exit status 0
2013-03-12 16:39:07.681 INFO  [b10-init.init/22470] BIND10_COMPONENT_START component b10-xfrin is starting
2013-03-12 16:39:07.685 INFO  [b10-init.init/22470] BIND10_STARTING_PROCESS starting process b10-xfrin

I dug a bit, and the error message "Read of 0 bytes" comes from session.py:

    def _receive_bytes(self, size):
        """Try to get size bytes of data from the socket.
           Raises a ProtocolError if the size is 0.
           Raises any error from recv().
           Returns whatever data was available (if >0 bytes).
           """
        data = self._socket.recv(size)
        if len(data) == 0: # server closed connection
            raise ProtocolError("Read of 0 bytes: connection closed")
        return data

So... as I said, we need to handle the ProtocolError exception.

comment:4 Changed 6 years ago by tomek

  • Milestone set to Remaining BIND10 tickets

comment:5 Changed 6 years ago by tomek

  • Resolution set to wontfix
  • Status changed from new to closed
  • Version set to old-bind10

This issue is related to bind10 code that is no longer part of Kea.

If you are interested in BIND10/Bundy framework or its DNS components,
please check http://bundy-dns.de.

Closing ticket.

Note: See TracTickets for help on using tickets.