BIND 10 #2400: notify auth::DataSrcClientsMgr when the builder thread dies

BIND 10 Development do-not-reply at isc.org
Wed Oct 24 03:43:10 UTC 2012


#2400: notify auth::DataSrcClientsMgr when the builder thread dies
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  defect        |                       Status:  new
            Priority:  medium        |                    Milestone:  Next-
           Component:  b10-auth      |  Sprint-Proposed
           Sensitive:  0             |                     Keywords:
         Sub-Project:  DNS           |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:
         Total Hours:  0             |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 Currently, there's no effective way to notify the main thread of
 b10-auth that runs the `DataSrcClientsMgr` object when the separate
 thread running `DataSrcClientsBuilder` object dies due to an
 unexpected exception.  This is not good: the auth server keeps running
 with older zone data without noticing it, and the communication queue
 is growing.

 So the current implementation takes a harsh way: the builder thread
 terminates the entire process by `assert(false)`.  This is still
 suboptimal.

 We should provide a way to notify the main thread when the builder
 thread needs to terminate itself due to an unexpected exception.
 My current idea is something like this:

 - introduce another shared variable (of boolean), say, builder_ok_.
   it's a member of the manager, set to true initially, and its pointer
   will be passed to the builder.
 - on unexpected termination, the builder sets it to false.  (this
   could be protected by a mutex, but that's not absolutely necessary)
 - the manager checks variable every time it sends a new command to the
   builder or allow the application to access the client lists via the
   holder.  If the value has been changed to false, it takes an
   appropriate action (in practice, it would throw a fatal exception to
   terminate the process anyway).

-- 
Ticket URL: <http://bind10.isc.org/ticket/2400>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list