[Mono-bugs] [Bug 695426] New: Program is waiting for Scheduled task that isn't running anywhere

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 23 07:49:07 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=695426

https://bugzilla.novell.com/show_bug.cgi?id=695426#c0


           Summary: Program is waiting for Scheduled task that isn't
                    running anywhere
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 1.2.0
          Platform: x86-64
        OS/Version: RHEL 5
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: ck at carlo-kok.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML,
like Gecko) Chrome/12.0.742.60 Safari/534.30

As requested by Garuma, posted in bugzilla.

Real os: Centos. Using the mono 2.10.2 packages. 

The issue is that a task (See callstack below) is waiting for 1 or more tasks
to finish through System.Threading.Tasks.Task.WaitAll, yet none of the other
threads is running this task, so it will never finish.

the project used here uses "quartz" but that's unrelated to this. The library
used that uses all the Task calls is SSHNET which can be found at:

http://sshnet.codeplex.com/

(and is open source)

Reproducible: Sometimes

Steps to Reproduce:
Using the ssh lib I connect, execute and disconnect every 5 minutes. After a
day or so it stops, maybe when the target server isn't available at that
precise moment, but I cannot be sure.



    =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2011.05.23 13:31:04
=~=~=~=~=~=~=~=~=~=~=~=
    Full thread dump:

    "DefaultQuartzScheduler_Worker-4" tid=0x0x402f6940 this=0x0x2aaaab39e9c0
thread handle 0x41b state : interrupted state owns ()
      at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait
(object,int) <0xffffffff>
      at System.Threading.Monitor.Wait (object,int) <0x00043>
      at Quartz.Simpl.SimpleThreadPool/WorkerThread.Run () <0x000db>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>

    "DefaultQuartzScheduler_Worker-9" tid=0x0x447c7940 this=0x0x2aaaab39e270
thread handle 0x42a state : interrupted state owns ()
      at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait
(object,int) <0xffffffff>
      at System.Threading.Monitor.Wait (object,int) <0x00043>
      at Quartz.Simpl.SimpleThreadPool/WorkerThread.Run () <0x000db>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>

    "IO Threadpool worker" tid=0x0x419dd940 this=0x0x2aaaab2c6270 thread handle
0x410 state : interrupted state owns ()

    "DefaultQuartzScheduler_Worker-5" tid=0x0x40ff6940 this=0x0x2aaaab39e888
thread handle 0x41e state : interrupted state owns ()
      at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait
(object,int) <0xffffffff>
      at System.Threading.Monitor.Wait (object,int) <0x00043>
      at Quartz.Simpl.SimpleThreadPool/WorkerThread.Run () <0x000db>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>
    2011/05/23 13:31:06:190 [ERROR] Quartz.Simpl.SimpleThreadPool - Error while
executing the Runnable:
    System.Threading.SynchronizationLockException: Object is not synchronized
      at System.Threading.Monitor.Wait (System.Object obj, Int32
millisecondsTimeout) [0x00000] in <filename unknown>:0
      at Quartz.Simpl.SimpleThreadPool+WorkerThread.Run () [0x00000] in
<filename unknown>:0
    2011/05/23 13:31:06:190 [ERROR] Quartz.Simpl.SimpleThreadPool - Error while
executing the Runnable:
    System.Threading.SynchronizationLockException: Object is not synchronized
      at System.Threading.Monitor.Wait (System.Object obj, Int32
millisecondsTimeout) [0x00000] in <filename unknown>:0
      at Quartz.Simpl.SimpleThreadPool+WorkerThread.Run () [0x00000] in
<filename unknown>:0
    "DefaultQuartzScheduler_Worker-7" tid=0x0x443c5940 this=0x0x2aaaab39e618
thread handle 0x424 state : interrupted state owns ()
      at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait
(object,int) <0xffffffff>
      at System.Threading.Monitor.Wait (object,int) <0x00043>
      at Quartz.Simpl.SimpleThreadPool/WorkerThread.Run () <0x000db>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>

    "Threadpool worker" tid=0x0x44dca940 this=0x0x2aaaabe02af8 thread handle
0x464 state : interrupted state owns ()

    "DefaultQuartzScheduler_Worker-1" tid=0x0x40ade940 this=0x0x2aaaab39eea0
thread handle 0x413 state : interrupted state owns ()
      at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait
(object,int) <0xffffffff>
      at System.Threading.Monitor.Wait (object,int) <0x00043>
      at Quartz.Simpl.SimpleThreadPool/WorkerThread.Run () <0x000db>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>

    "DefaultQuartzScheduler_QuartzSchedulerThread" tid=0x0x44bc9940
this=0x0x2aaaab39e000 thread handle 0x431 state : interrupted state owns ()
      at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait
(object,int) <0xffffffff>
      at System.Threading.Monitor.Wait (object,int) <0x00043>
      at System.Threading.Monitor.Wait (object,System.TimeSpan) <0x00053>
      at Quartz.Core.QuartzSchedulerThread.Run () <0x013fb>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>


    "Threapool monitor" tid=0x0x40cf9940 this=0x0x2aaaabe02ea0 thread handle
0x457 state : interrupted state owns ()

    "<threadpool thread>" tid=0x0x404e6940 this=0x0x2aaaab2c63a8 thread handle
0x40f state : interrupted state owns ()

    "DefaultQuartzScheduler_Worker-2" tid=0x0x441c4940 this=0x0x2aaaab39ec30
thread handle 0x415 state : interrupted state owns ()
      at (wrapper managed-to-native)
System.Threading.WaitHandle.WaitAny_internal
(System.Threading.WaitHandle[],int,bool) <0xffffffff>
      at System.Threading.WaitHandle.WaitAny
(System.Threading.WaitHandle[],int,bool) <0x00047>
      at System.Threading.ManualResetEventSlim.Wait
(int,System.Threading.CancellationToken) <0x001bf>
      at System.Threading.ManualResetEventSlim.Wait (int) <0x0002b>
      at System.Threading.Tasks.SchedulerProxy.ParticipateUntil
(System.Threading.ManualResetEventSlim,int) <0x00023>
      at System.Threading.Tasks.SchedulerProxy.ParticipateUntil
(System.Threading.Tasks.Task) <0x00117>
      at System.Threading.Tasks.TaskScheduler.ParticipateUntil
(System.Threading.Tasks.Task) <0x00023>
      at System.Threading.Tasks.Task.Wait () <0x00042>
      at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[])
<0x0005f>
      at System.Threading.Tasks.Parallel.ForEach<TSource, TLocal>
(System.Func`2<int,
System.Collections.Generic.IList`1<System.Collections.Generic.IEnumerator`1<TSource>>>,System.Threading.Tasks.ParallelOptions,System.Func`1<TLocal>,System.Func`4<TSource,
System.Threading.Tasks.ParallelLoopState, TLocal,
TLocal>,System.Action`1<TLocal>) <0x0033b>
      at System.Threading.Tasks.Parallel.ForEach<TSource, TLocal>
(System.Collections.Concurrent.Partitioner`1<TSource>,System.Threading.Tasks.ParallelOptions,System.Func`1<TLocal>,System.Func`4<TSource,
System.Threading.Tasks.ParallelLoopState, TLocal,
TLocal>,System.Action`1<TLocal>) <0x000c3>
      at System.Threading.Tasks.Parallel.ForEach<TSource>
(System.Collections.Generic.IEnumerable`1<TSource>,System.Action`1<TSource>)
<0x001bb>
      at Renci.SshClient.Session.RegisterMessage (string) <0x00153>
      at Renci.SshClient.Session.Connect () <0x00cd7>
      at Renci.SshClient.BaseClient.Connect () <0x00093>
      at VeritasAdminServer.Feeder.GitFeeder.Execute () <0x0017f>
      at VeritasAdminServer.Feeder.FeederBase.Run (Quartz.JobExecutionContext)
<0x000e5>
      at VeritasAdminServer.SchedulerJobWrapper.Execute
(Quartz.JobExecutionContext) <0x0002d>
      at Quartz.Core.JobRunShell.Run () <0x00585>
      at Quartz.Simpl.SimpleThreadPool/WorkerThread.Run () <0x0018e>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>

    "<unnamed thread>" tid=0x0x2ad1b03ecb50 this=0x0x2aaaaafceea0 thread handle
0x403 state : not waiting owns ()
      at (wrapper managed-to-native) Mono.Unix.UnixSignal.WaitAny
(intptr[],int,int,Mono.Unix.UnixSignal/Mono_Posix_RuntimeIsShuttingDown)
<0xffffffff>
      at Mono.Unix.UnixSignal.WaitAny (Mono.Unix.UnixSignal[],int) <0x0016f>
      at Mono.Unix.UnixSignal.WaitAny (Mono.Unix.UnixSignal[]) <0x00017>
      at MonoServiceRunner.MainLoop (System.ServiceProcess.ServiceBase[])
<0x00363>
      at System.ServiceProcess.ServiceBase.Run
(System.ServiceProcess.ServiceBase[]) <0x00035>
      at System.ServiceProcess.ServiceBase.Run
(System.ServiceProcess.ServiceBase) <0x0003f>
      at VeritasAdminServer.Program.Main (string[]) <0x00113>
      at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object
(object,intptr,intptr,intptr) <0xffffffff>
      at (wrapper managed-to-native) System.AppDomain.ExecuteAssembly
(System.AppDomain,System.Reflection.Assembly,string[]) <0xffffffff>
      at System.AppDomain.ExecuteAssemblyInternal
(System.Reflection.Assembly,string[]) <0x00047>
      at System.AppDomain.ExecuteAssembly
(string,System.Security.Policy.Evidence,string[]) <0x00037>
      at (wrapper remoting-invoke-with-check) System.AppDomain.ExecuteAssembly
(string,System.Security.Policy.Evidence,string[]) <0xffffffff>
      at MonoServiceRunner.StartService () <0x004d3>
      at (wrapper runtime-invoke) <Module>.runtime_invoke_int__this__
(object,intptr,intptr,intptr) <0xffffffff>
      at (wrapper managed-to-native)
System.Runtime.Remoting.RemotingServices.InternalExecute
(System.Reflection.MethodBase,object,object[],object[]&) <0xffffffff>
      at System.Runtime.Remoting.RemotingServices.InternalExecuteMessage
(System.MarshalByRefObject,System.Runtime.Remoting.Messaging.IMethodCallMessage)
<0x0023f>
      at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage
(System.Runtime.Remoting.Messaging.IMessage) <0x000d7>
      at
System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage
(System.Runtime.Remoting.Messaging.IMessage) <0x0007a>
      at System.Runtime.Remoting.Lifetime.LeaseSink.SyncProcessMessage
(System.Runtime.Remoting.Messaging.IMessage) <0x0002d>
      at
System.Runtime.Remoting.ClientActivatedIdentity.SyncObjectProcessMessage
(System.Runtime.Remoting.Messaging.IMessage) <0x00097>
      at
System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage
(System.Runtime.Remoting.Messaging.IMessage) <0x0019a>
      at
System.Runtime.Remoting.Contexts.CrossContextChannel.SyncProcessMessage
(System.Runtime.Remoting.Messaging.IMessage) <0x000f9>
      at System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage
(System.Runtime.Remoting.Messaging.IMessage) <0x0004b>
      at System.AppDomain.ProcessMessageInDomain
(byte[],System.Runtime.Remoting.Messaging.CADMethodCallMessage,byte[]&,System.Runtime.Remoting.Messaging.CADMethodReturnMessage&)
<0x00097>
      at (wrapper remoting-invoke-with-check)
System.AppDomain.ProcessMessageInDomain
(byte[],System.Runtime.Remoting.Messaging.CADMethodCallMessage,byte[]&,System.Runtime.Remoting.Messaging.CADMethodReturnMessage&)
<0xffffffff>
      at
System.Runtime.Remoting.Channels.CrossAppDomainSink.ProcessMessageInDomain
(byte[],System.Runtime.Remoting.Messaging.CADMethodCallMessage) <0x0005f>
      at (wrapper runtime-invoke)
<Module>.runtime_invoke_CrossAppDomainSink/ProcessMessageRes_object_object
(object,intptr,intptr,intptr) <0xffffffff>
      at (wrapper managed-to-native)
System.Reflection.MonoMethod.InternalInvoke
(System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
      at System.AppDomain.InvokeInDomainByID
(int,System.Reflection.MethodInfo,object,object[]) <0x00093>
      at System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage
(System.Runtime.Remoting.Messaging.IMessage) <0x00147>
      at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke
(System.Runtime.Remoting.Messaging.IMessage) <0x0040e>
      at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
(System.Runtime.Remoting.Proxies.RealProxy,System.Runtime.Remoting.Messaging.IMessage,System.Exception&,object[]&)
<0x00436>
      at (wrapper runtime-invoke)
<Module>.runtime_invoke_object_object_object_Exception&_object[]&
(object,intptr,intptr,intptr) <0xffffffff>
      at (wrapper managed-to-native)
object.__icall_wrapper_mono_remoting_wrapper (intptr,intptr) <0xffffffff>
      at (wrapper remoting-invoke) MonoServiceRunner.StartService ()
<0xffffffff>
      at (wrapper xdomain-invoke) MonoServiceRunner.StartService ()
<0xffffffff>
      at (wrapper remoting-invoke-with-check) MonoServiceRunner.StartService ()
<0xffffffff>
      at MonoServiceRunner.Main (string[]) <0x00793>
      at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object
(object,intptr,intptr,intptr) <0xffffffff>

    "Threadpool worker" tid=0x0x44fcb940 this=0x0x2aaab0b56d68 thread handle
0x46c state : interrupted state owns ()

    "Threadpool worker" tid=0x0x453cd940 this=0x0x2aaab113b000 thread handle
0x871 state : interrupted state owns ()
    2011/05/23 13:31:06:190 [ERROR] Quartz.Simpl.SimpleThreadPool - Error while
executing the Runnable:
    System.Threading.SynchronizationLockException: Object is not synchronized
      at System.Threading.Monitor.Wait (System.Object obj, Int32
millisecondsTimeout) [0x00000] in <filename unknown>:0
      at Quartz.Simpl.SimpleThreadPool+WorkerThread.Run () [0x00000] in
<filename unknown>:0

    "Threadpool worker" tid=0x0x451cc940 this=0x0x2aaab0b56ea0 thread handle
0x47e state : interrupted state owns ()

    "IO Threadpool worker" tid=0x0x40d67940 this=0x0x2aaab113b138 thread handle
0x6b2 state : interrupted state owns ()
    2011/05/23 13:31:06:190 [ERROR] Quartz.Simpl.SimpleThreadPool - Error while
executing the Runnable:
    System.Threading.SynchronizationLockException: Object is not synchronized
      at System.Threading.Monitor.Wait (System.Object obj, Int32
millisecondsTimeout) [0x00000] in <filename unknown>:0
      at Quartz.Simpl.SimpleThreadPool+WorkerThread.Run () [0x00000] in
<filename unknown>:0
    "Timer-Scheduler" tid=0x0x41852940 this=0x0x2aaaab2c69c0 thread handle
0x40a state : interrupted state owns ()
      at (wrapper managed-to-native)
System.Threading.WaitHandle.WaitOne_internal
(System.Threading.WaitHandle,intptr,int,bool) <0xffffffff>
      at System.Threading.WaitHandle.WaitOne (int,bool) <0x00087>
      at System.Threading.WaitHandle.WaitOne (int) <0x0001a>
      at System.Threading.Timer/Scheduler.SchedulerThread () <0x00b3e>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>

    2011/05/23 13:31:06:190 [ERROR] Quartz.Simpl.SimpleThreadPool - Error while
executing the Runnable:
    System.Threading.SynchronizationLockException: Object is not synchronized
      at System.Threading.Monitor.Wait (System.Object obj, Int32
millisecondsTimeout) [0x00000] in <filename unknown>:0
      at Quartz.Simpl.SimpleThreadPool+WorkerThread.Run () [0x00000] in
<filename unknown>:0

    "DefaultQuartzScheduler_Worker-3" tid=0x0x40712940 this=0x0x2aaaab39eaf8
thread handle 0x418 state : interrupted state owns ()
      at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait
(object,int) <0xffffffff>
      at System.Threading.Monitor.Wait (object,int) <0x00043>
      at Quartz.Simpl.SimpleThreadPool/WorkerThread.Run () <0x000db>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>

    "DefaultQuartzScheduler_Worker-6" tid=0x0x411f7940 this=0x0x2aaaab39e750
thread handle 0x421 state : interrupted state owns ()
      at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait
(object,int) <0xffffffff>
      at System.Threading.Monitor.Wait (object,int) <0x00043>
      at Quartz.Simpl.SimpleThreadPool/WorkerThread.Run () <0x000db>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>
    2011/05/23 13:31:06:193 [ERROR] Quartz.Simpl.SimpleThreadPool - Error while
executing the Runnable:
    System.Threading.SynchronizationLockException: Object is not synchronized
      at System.Threading.Monitor.Wait (System.Object obj, Int32
millisecondsTimeout) [0x00000] in <filename unknown>:0
      at Quartz.Simpl.SimpleThreadPool+WorkerThread.Run () [0x00000] in
<filename unknown>:0
    2011/05/23 13:31:06:194 [ERROR] Quartz.Simpl.SimpleThreadPool - Error while
executing the Runnable:
    System.Threading.SynchronizationLockException: Object is not synchronized
      at System.Threading.Monitor.Wait (System.Object obj, Int32
millisecondsTimeout) [0x00000] in <filename unknown>:0
      at Quartz.Simpl.SimpleThreadPool+WorkerThread.Run () [0x00000] in
<filename unknown>:0

    "DefaultQuartzScheduler_Worker-8" tid=0x0x445c6940 this=0x0x2aaaab39e4e0
thread handle 0x427 state : interrupted state owns ()
      at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait
(object,int) <0xffffffff>
      at System.Threading.Monitor.Wait (object,int) <0x00043>
      at Quartz.Simpl.SimpleThreadPool/WorkerThread.Run () <0x000db>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>
    2011/05/23 13:31:06:194 [ERROR] Quartz.Simpl.SimpleThreadPool - Error while
executing the Runnable:
    System.Threading.SynchronizationLockException: Object is not synchronized
      at System.Threading.Monitor.Wait (System.Object obj, Int32
millisecondsTimeout) [0x00000] in <filename unknown>:0
      at Quartz.Simpl.SimpleThreadPool+WorkerThread.Run () [0x00000] in
<filename unknown>:0

    "DefaultQuartzScheduler_Worker-10" tid=0x0x449c8940 this=0x0x2aaaab39e138
thread handle 0x42d state : interrupted state owns ()
      at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait
(object,int) <0xffffffff>
      at System.Threading.Monitor.Wait (object,int) <0x00043>
      at Quartz.Simpl.SimpleThreadPool/WorkerThread.Run () <0x000db>
      at System.Threading.Thread.StartUnsafe () <0x00073>
      at (wrapper runtime-invoke) object.runtime_invoke_void__this__
(object,intptr,intptr,intptr) <0xffffffff>
    2011/05/23 13:31:06:194 [ERROR] Quartz.Simpl.SimpleThreadPool - Error while
executing the Runnable:
    System.Threading.SynchronizationLockException: Object is not synchronized
      at System.Threading.Monitor.Wait (System.Object obj, Int32
millisecondsTimeout) [0x00000] in <filename unknown>:0
      at Quartz.Simpl.SimpleThreadPool+WorkerThread.Run () [0x00000] in
<filename unknown>:0

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list