[Mono-bugs] [Bug 81584][Maj] New - Getting back trace from inside main loop pegs all CPU and slowly consumes all memory

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu May 10 13:09:29 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by joeshaw at novell.com.

http://bugzilla.ximian.com/show_bug.cgi?id=81584

--- shadow/81584	2007-05-10 13:09:29.000000000 -0400
+++ shadow/81584.tmp.29133	2007-05-10 13:09:29.000000000 -0400
@@ -0,0 +1,79 @@
+Bug#: 81584
+Product: Mono: Debugger
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: cli
+AssignedTo: martin at ximian.com                            
+ReportedBy: joeshaw at novell.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Getting back trace from inside main loop pegs all CPU and slowly consumes all memory
+
+In Beagle we start a GLib main loop and defer some startup work to an idle
+method:
+
+GLib.Idle.Add (new GLib.IdleHandler (StartupProcess));
+
+If I set a breakpoint in StartupProcess and then try to get a back trace,
+mdb pegs the CPU and slowly starts consuming all available memory.  It
+doesn't seem to matter where inside StartupProcess I run "bt".
+
+  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND      
+     
+ 2620 joe       15   0  164m 138m 7376 S   99  6.8   0:22.20 mono          
+
+About a minute later:
+
+  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND      
+     
+ 2620 joe       15   0  230m 200m 7376 S  100  9.9   1:43.53 mono       
+
+Here's the output from the run:
+Mono Debugger
+(mdb) break 513
+Breakpoint 1 at 513
+(mdb) r
+Starting program: ./BeagleDaemon.exe --mdb --fg --debug
+Cannot load symbol file
+`/usr/lib/mono/gac/glib-sharp/2.8.0.0__35e10195dab3c99f/glib-sharp.dll.mdb':
+Could not find file
+"/usr/lib/mono/gac/glib-sharp/2.8.0.0__35e10195dab3c99f/glib-sharp.dll.mdb".
+Thread @1 stopped at #0: 0xb773d8b7 in
+Beagle.Daemon.BeagleDaemon.Main(System.String[])+0x17 at
+/home/joe/svn/beagle-0.2.16/beagled/BeagleDaemon.cs:258.
+ 258                            DoMain (args);
+(mdb) c
+Always: Starting Beagle Daemon (version 0.2.16.3)
+Always: Running on Mono 1.2.4
+Always: Using sqlite version 3
+Always: Command Line: /home/joe/svn/beagle-0.2.16/beagled/BeagleDaemon.exe
+--mdb --fg --debug
+Debug: Established a connection to the X server
+Debug: Reniced process to 7
+Thread @1 hit breakpoint 1 at #0: 0xb773fa0b in
+Beagle.Daemon.BeagleDaemon.DoMain(System.String[])+0x1123 at
+/home/joe/svn/beagle-0.2.16/beagled/BeagleDaemon.cs:513.
+ 513                    GLib.Idle.Add (new GLib.IdleHandler (StartupProcess));
+(mdb) break StartupProcess
+Breakpoint 5 at Beagle.Daemon.BeagleDaemon.StartupProcess()
+(mdb) c
+Debug: Starting main loop
+Thread @1 hit breakpoint 5 at #0: 0xb625040d in
+Beagle.Daemon.BeagleDaemon.StartupProcess()+0x15 at
+/home/joe/svn/beagle-0.2.16/beagled/BeagleDaemon.cs:173.
+ 173                    Log.Debug ("Beginning main loop");
+(mdb) n
+Debug: Beginning main loop
+Thread @1 stopped at #0: 0xb6250446 in
+Beagle.Daemon.BeagleDaemon.StartupProcess()+0x4e at
+/home/joe/svn/beagle-0.2.16/beagled/BeagleDaemon.cs:176.
+ 176                    Stopwatch stopwatch = new Stopwatch ();
+(mdb) bt
+[hang]


More information about the mono-bugs mailing list