[Zodb-checkins] SVN: ZODB/branches/3.7/ Fixed a serious bug that could cause client I/O to stop

Jim Fulton jim at zope.com
Tue Sep 25 07:41:30 EDT 2007


Log message for revision 79993:
  Fixed a serious bug that could cause client I/O to stop
  (hang). This was accomonied by a critical log message along the
  lines of: "RuntimeError: dictionary changed size during iteration".
  

Changed:
  U   ZODB/branches/3.7/NEWS.txt
  U   ZODB/branches/3.7/src/ZEO/zrpc/connection.py

-=-
Modified: ZODB/branches/3.7/NEWS.txt
===================================================================
--- ZODB/branches/3.7/NEWS.txt	2007-09-25 08:00:06 UTC (rev 79992)
+++ ZODB/branches/3.7/NEWS.txt	2007-09-25 11:41:29 UTC (rev 79993)
@@ -1,5 +1,5 @@
-What's new on ZODB 3.7.0c1?
-===========================
+What's new on ZODB 3.7.1?
+=========================
 
 Packaging
 ---------
@@ -19,6 +19,10 @@
 ClientStorage
 -------------
 
+- (3.7.1) Fixed a serious bug that could cause client I/O to stop
+  (hang). This was accomonied by a critical log message along the
+  lines of: "RuntimeError: dictionary changed size during iteration".
+
 - (3.7b4) Added logic to avoid spurious errors from the logging system
   on exit.
 

Modified: ZODB/branches/3.7/src/ZEO/zrpc/connection.py
===================================================================
--- ZODB/branches/3.7/src/ZEO/zrpc/connection.py	2007-09-25 08:00:06 UTC (rev 79992)
+++ ZODB/branches/3.7/src/ZEO/zrpc/connection.py	2007-09-25 11:41:29 UTC (rev 79993)
@@ -52,8 +52,12 @@
     
     while map:
         try:
-            r = e = list(client_map)
-            w = [fd for (fd, obj) in map.iteritems() if obj.writable()]
+            
+            # The next two lines intentionally don't use
+            # iterators. Other threads can close dispatchers, causeing
+            # the socket map to shrink.
+            r = e = client_map.keys()
+            w = [fd for (fd, obj) in map.items() if obj.writable()]
 
             try:
                 r, w, e = select.select(r, w, e, client_timeout)



More information about the Zodb-checkins mailing list