Opened 9 years ago

Closed 9 years ago

#330 closed defect (fixed)

zonemgr exception on SIGINT

Reported by: jreed Owned by: UnAssigned
Priority: medium Milestone:
Component: secondary manager Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: 0.0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

I pressed CTRL-C to kill BIND 10:

^C[bind10] Received SIGINT.
[bind10] Stopping the server.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/reed/opt/bind10/libexec/bind10-devel/b10-zonemgr", line 351, in run_timer
    (rlist, wlist, xlist) = select.select([self._socket], [], [], timeout)
select.error: (9, 'Bad file descriptor')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/pkg/lib/python3.1/threading.py", line 509, in _bootstrap_inner
    self.run()
  File "/usr/pkg/lib/python3.1/threading.py", line 462, in run
    self._target(*self._args, **self._kwargs)
  File "/home/reed/opt/bind10/libexec/bind10-devel/b10-zonemgr", line 361, in run_timer
    raise ZonemgrException("[b10-zonemgr] Error with select(): %s\n" % e)
ZonemgrException: [b10-zonemgr] Error with select(): (9, 'Bad file descriptor')

Subtickets

Attachments (1)

zonemgr.diff (3.0 KB) - added by zzchen_pku 9 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years ago by zzchen_pku

  • Owner set to zzchen_pku
  • Status changed from new to accepted

It seems like the error happens when the run_timer() function gets the socket file
descriptor to run select on and then the main thread closes the socket due to CTRL-C operation. After this the select call is made, but the file descriptors are not valid any more.

comment:2 Changed 9 years ago by zzchen_pku

  • Owner changed from zzchen_pku to jreed
  • Status changed from accepted to reviewing

Jeremy,can you review the attached patch and give your opinions? Thanks.

comment:3 follow-up: Changed 9 years ago by jreed

The output now has no backtrace -- that is good.

But why "Zone refresh timer has been closed." message? I am unclear what it means in this context.
And should it have same log message for two different situations?
Also I get this same log message if I do a "Boss shutdown" or with a CTRL-C. I don't think we need this logged if we are purposely quiting BIND 10 or zonemgr.

Changed 9 years ago by zzchen_pku

comment:4 in reply to: ↑ 3 Changed 9 years ago by zzchen_pku

Replying to jreed:

Also I get this same log message if I do a "Boss shutdown" or with a CTRL-C. I don't think we need this logged if we are purposely quiting BIND 10 or zonemgr.

Agree. The patch has been updated. I deleted the useless log messages.

comment:5 follow-up: Changed 9 years ago by zhanglikun

Jerry, could you merge this patch to trac330, so that it can be tested together?

comment:6 in reply to: ↑ 5 Changed 9 years ago by zzchen_pku

Replying to zhanglikun:

Jerry, could you merge this patch to trac330, so that it can be tested together?

Okay, I'll do it.

comment:7 Changed 9 years ago by zzchen_pku

  • Owner changed from jreed to UnAssigned

Update the patch and commit to trac335, ticket330 and ticket335 will be reviewed together.

comment:8 Changed 9 years ago by zhanglikun

  • Resolution set to fixed
  • Status changed from reviewing to closed

Close this ticket, since the work has merged to #335

Note: See TracTickets for help on using tickets.