mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
rdnbrd "Interrupted system call" traceback in nlmanager
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: roopa@cumulusnetworks.com Ticket: CM-12487
This commit is contained in:
@ -96,12 +96,17 @@ class NetlinkListener(Thread):
|
|||||||
# Extract the length, etc from the header
|
# Extract the length, etc from the header
|
||||||
(length, msgtype, flags, seq, pid) = unpack(header_PACK, data[:header_LEN])
|
(length, msgtype, flags, seq, pid) = unpack(header_PACK, data[:header_LEN])
|
||||||
|
|
||||||
if manager.debug_listener:
|
log.debug('%s %s: RXed %s seq %d, pid %d, %d bytes (%d total)' %
|
||||||
log.debug('%s %s: RXed %s seq %d, pid %d, %d bytes (%d total)' %
|
(self, socket_string[s], NetlinkPacket.type_to_string[msgtype],
|
||||||
(self, socket_string[s], NetlinkPacket.type_to_string[msgtype],
|
seq, pid, length, total_length))
|
||||||
seq, pid, length, total_length))
|
possible_ack = False
|
||||||
|
|
||||||
|
if msgtype == NLMSG_DONE:
|
||||||
|
possible_ack = True
|
||||||
|
|
||||||
|
elif msgtype == NLMSG_ERROR:
|
||||||
|
possible_ack = True
|
||||||
|
|
||||||
if msgtype == NLMSG_ERROR:
|
|
||||||
# The error code is a signed negative number.
|
# The error code is a signed negative number.
|
||||||
error_code = abs(unpack('=i', data[header_LEN:header_LEN+4])[0])
|
error_code = abs(unpack('=i', data[header_LEN:header_LEN+4])[0])
|
||||||
msg = Error(msgtype, True)
|
msg = Error(msgtype, True)
|
||||||
@ -110,10 +115,9 @@ class NetlinkListener(Thread):
|
|||||||
if error_code:
|
if error_code:
|
||||||
log.debug("%s %s: RXed NLMSG_ERROR code %s (%d)" % (self, socket_string[s], msg.error_to_string.get(error_code), error_code))
|
log.debug("%s %s: RXed NLMSG_ERROR code %s (%d)" % (self, socket_string[s], msg.error_to_string.get(error_code), error_code))
|
||||||
|
|
||||||
if seq == manager.target_seq and pid == manager.target_pid:
|
if possible_ack and seq == manager.target_seq and pid == manager.target_pid:
|
||||||
if manager.target_seq_pid_debug:
|
log.debug("%s %s: Setting RXed ACK alarm for seq %d, pid %d" %
|
||||||
log.debug("%s %s: Setting RXed ACK alarm for seq %d, pid %d" %
|
(self, socket_string[s], seq, pid))
|
||||||
(self, socket_string[s], seq, pid))
|
|
||||||
set_tx_socket_rxed_ack_alarm = True
|
set_tx_socket_rxed_ack_alarm = True
|
||||||
|
|
||||||
# Put the message on the manager's netlinkq
|
# Put the message on the manager's netlinkq
|
||||||
@ -229,6 +233,11 @@ class NetlinkManagerWithListener(NetlinkManager):
|
|||||||
|
|
||||||
if not self.tx_socket:
|
if not self.tx_socket:
|
||||||
self.tx_socket_allocate()
|
self.tx_socket_allocate()
|
||||||
|
|
||||||
|
log.debug('%s TX: TXed %s seq %d, pid %d, %d bytes' %
|
||||||
|
(self, NetlinkPacket.type_to_string[nlpacket.msgtype],
|
||||||
|
nlpacket.seq, nlpacket.pid, nlpacket.length))
|
||||||
|
|
||||||
self.tx_socket.sendall(nlpacket.message)
|
self.tx_socket.sendall(nlpacket.message)
|
||||||
|
|
||||||
# Wait for NetlinkListener to RX an ACK or DONE for this (seq, pid)
|
# Wait for NetlinkListener to RX an ACK or DONE for this (seq, pid)
|
||||||
|
Reference in New Issue
Block a user