[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] add GC debugging hack



Update of /home/minion/cvsroot/src/minion/lib/mixminion/server
In directory moria.mit.edu:/tmp/cvs-serv8827/lib/mixminion/server

Modified Files:
	ServerConfig.py ServerMain.py 
Log Message:
add GC debugging hack

Index: ServerConfig.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerConfig.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- ServerConfig.py	30 May 2003 13:54:45 -0000	1.30
+++ ServerConfig.py	5 Jun 2003 02:18:11 -0000	1.31
@@ -258,6 +258,7 @@
                      'MixPoolRate' : ('ALLOW', _parseFraction, "60%"),
                      'MixPoolMinSize' : ('ALLOW', C._parseInt, "5"),
 		     'Timeout' : ('ALLOW', C._parseInterval, "5 min"),
+                     '__DEBUG_GC' : ('ALLOW', C._parseBoolean, "no"),
                      },
         'DirectoryServers' : { # '__SECTION__' : ('REQUIRE', None, None),
                                'ServerURL' : ('ALLOW*', None, None),

Index: ServerMain.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerMain.py,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- ServerMain.py	2 Jun 2003 17:56:34 -0000	1.67
+++ ServerMain.py	5 Jun 2003 02:18:11 -0000	1.68
@@ -1023,6 +1023,12 @@
         LOG.fatal("Shutting down because of exception: %s", info[0])
         sys.exit(1)
 
+    # Undocumented feature to cajole python into dumping gc info.
+    if config['Server']['__DEBUG_GC']:
+        import gc
+        gc.set_debug(gc.DEBUG_STATS|gc.DEBUG_COLLECTABLE|gc.DEBUG_UNCOLLECTABLE
+                     |DEBUG_INSTANCES|DEBUG_OBJECTS)
+
     daemonMode = config['Server'].get("Daemon",1)
     if daemonMode:
         LOG.info("Starting server in the background")