[Mono-dev] Is this deadlock a bug or my error ?

Debajyoti Bera dbera.web at gmail.com
Thu Jan 24 01:28:21 EST 2008


Hi,
  I noticed a deadlock when I was about to quit beagle. I obtained the SIGQUIT 
trace and gdb-mono-locks-details. I am pasting them below. What surprised me 
is that the deadlock happened when two threads tried to do a lock(...){...} 
and there are no other locks or threads involved at that point. Am I missing 
something or this is really a bug which I should report ? Using mono-1.2.6.

This never happened before so I doubt I can reproduce this on demand. But one 
thing I remember that, due to certain other activities, there was significant 
disk access going on at that time and the machine was not very responsive. 
Did I fall into any kind of small race window ?

======= Sigquit Trace ============
Full thread dump:

"" tid=0x0xb7c80960 this=0x0x21e10:
  at (wrapper managed-to-native) System.Threading.Monitor.Monitor_try_enter 
(object,int) <0x00004>
  at (wrapper managed-to-native) System.Threading.Monitor.Monitor_try_enter 
(object,int) <0xffffffff>
  at System.Threading.Monitor.Enter (object) <0x00013>
  at Beagle.Daemon.Shutdown.BeginShutdown () <0x00519>
  at Beagle.Daemon.BeagleDaemon.HandleSignal (int) <0x00181>
  at <>c__CompilerGenerated0.<OurSignalHandler>c__2 () <0x00010>
  at IdleProxy.Handler () <0x0002e>
  at (wrapper native-to-managed) IdleProxy.Handler () <0xffffffff>
  at (wrapper managed-to-native) GLib.MainLoop.g_main_loop_run (intptr) 
<0x00004>
  at (wrapper managed-to-native) GLib.MainLoop.g_main_loop_run (intptr) 
<0xffffffff>
  at GLib.MainLoop.Run () <0x0000d>
  at Beagle.Daemon.BeagleDaemon.DoMain (string[]) <0x00b0e>
  at Beagle.Daemon.BeagleDaemon.Main (string[]) <0x00014>
  at (wrapper runtime-invoke) 
Beagle.Daemon.BeagleDaemon.runtime_invoke_void_string[] 
(object,intptr,intptr,intptr) <0xffffffff>

"EHT 14044 [14040 BeagleDaemon] Beagle.Daemon.Server:HttpRun" tid=0x0xb6823b90 
this=0x0x64bb0:
  at (wrapper managed-to-native) System.Threading.Monitor.Monitor_try_enter 
(object,int) <0x00004>
  at (wrapper managed-to-native) System.Threading.Monitor.Monitor_try_enter 
(object,int) <0xffffffff>
  at System.Threading.Monitor.Enter (object) <0x00013>
  at Beagle.Daemon.Shutdown.WorkerFinished (object) <0x00022>
  at Beagle.Daemon.Server.HttpRun () <0x00bcb>
  at Beagle.Util.ExceptionHandlingThread.ThreadStarted () <0x002c5>
  at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void () 
<0xffffffff>
  at (wrapper runtime-invoke) System.IO.FileStream.runtime_invoke_void 
(object,intptr,intptr,intptr) <0xffffffff>

"" tid=0x0xb63ffb90 this=0x0x64840:

========= gdb call mono_locks_dump (0) ===========

Lock 0x8488a38 in object 0x57e58 held by thread 0xb671eb90, nest level: 1
        Waiting on semaphore 0x45d: 2
Total locks (in 6 array(s)): 1008, used: 137, on freelist: 20, to recycle: 849


I couldn't find anything relevant in the web but I would appreciate pointers 
to existing bugs or discussions.

Thanks,
- dBera

-- 
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user



More information about the Mono-devel-list mailing list