BIND 10 #698: ModuleCCSession object may group_unsubscribe in the closed CC session in being deleted (was: ModuleCCSession may operate the closed CC session in being deleted)
BIND 10 Development
do-not-reply at isc.org
Thu Mar 17 06:42:12 UTC 2011
#698: ModuleCCSession object may group_unsubscribe in the closed CC session in
being deleted
-------------------------------------+-------------------------------------
Reporter: | Owner: naokikambe
naokikambe | Status: new
Type: defect | Milestone: feature
Priority: major | backlog item
Component: | Resolution:
message-library | Sensitive: 0
Keywords: | Add Hours to Ticket: 0
Estimated Number of Hours: 3.0 | Total Hours: 0
Billable?: 1 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by naokikambe):
In trac547, we can see this verbose massage in boss shutting down.
{{{
Exception isc.cc.session.SessionError: SessionError('Session has been
closed.',) in <bound method ModuleCCSession.__del__ of
<isc.config.ccsession.ModuleCCSession object at 0x9f926ac>> ignored
}}}
But note that this is an independent defect from trac547. This is because
that the ModuleCCSession object does group_unsubscribe in the closed CC
session when this object is being deleted. To avoid this, we need to add
the lines in {{{__del__}}} function that detects whether CC session has
been closed and returns immediately if it's closed. This is a proposed
patch.
{{{
--- a/src/lib/python/isc/config/ccsession.py
+++ b/src/lib/python/isc/config/ccsession.py
@@ -152,6 +152,9 @@ class ModuleCCSession(ConfigData):
self._remote_module_configs = {}
def __del__(self):
+ # If the CC Session obejct has been closed, it returns
+ # immediately.
+ if self._session._closed: return
self._session.group_unsubscribe(self._module_name, "*")
for module_name in self._remote_module_configs:
self._session.group_unsubscribe(module_name)
}}}
--
Ticket URL: <https://bind10.isc.org/ticket/698#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list