[Mono-dev] Process freezes on Windows

Yosi Levy yosilevy at gmail.com
Wed Oct 5 18:31:56 EDT 2011


About the freeze - we have figured out the problem but not the solution.

The problem is a deadlock within mono_loader_lock. It seems multiple threads
are trying to lock the semaphore and we're not sure who actually got it and
is not releasing it.
We're debugging it now.

Anyone knows anything about this?

Is it just a problem in EXEs after MKBUNDLE?

Thanks,
Jo.

-----Original Message-----
From: mono-devel-list-bounces at lists.ximian.com
[mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of
mono-devel-list-request at lists.ximian.com
Sent: Wednesday, October 05, 2011 8:37 PM
To: mono-devel-list at lists.ximian.com
Subject: Mono-devel-list Digest, Vol 78, Issue 3

Send Mono-devel-list mailing list submissions to
	mono-devel-list at lists.ximian.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.ximian.com/mailman/listinfo/mono-devel-list
or, via email, send a message with subject or body 'help' to
	mono-devel-list-request at lists.ximian.com

You can reach the person managing the list at
	mono-devel-list-owner at lists.ximian.com

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Mono-devel-list digest..."


Today's Topics:

   1. Re:  Mono Hard Debugger (MDB) for ARM (Martin D?umler)
   2. Re:  Mono Hard Debugger (MDB) for ARM (Alex)
   3.  Process freezes on Windows (Yosi Levy)


----------------------------------------------------------------------

Message: 1
Date: Wed, 05 Oct 2011 10:04:19 +0200
From: Martin D?umler <mdae at cs.tu-chemnitz.de>
Subject: Re: [Mono-dev] Mono Hard Debugger (MDB) for ARM
To: mono-devel-list at lists.ximian.com
Message-ID: <4E8C0F83.3000304 at cs.tu-chemnitz.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 05.10.2011 05:28, Rodrigo Kumpera wrote:
> The hard debugger is no longer supported. It has only made to work on 
> linux x86/amd64.
>

Hello,

does the Soft-Debugger in Mono-2.8 or Mono-2.10 support breakpoints and
single stepping on ARM and x86?


With kind regards,
Martin D?umler


------------------------------

Message: 2
Date: Wed, 5 Oct 2011 14:20:52 +0200
From: Alex <xtzgzorex at gmail.com>
Subject: Re: [Mono-dev] Mono Hard Debugger (MDB) for ARM
To: Martin D?umler <mdae at cs.tu-chemnitz.de>
Cc: mono-devel-list at lists.ximian.com
Message-ID:
	<CAEnAdhb+xnuVUX8xT5-Y4NdEKQSv72A9A-wHYOwQa4=U19n-bg at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

Yes, 2.10's soft debugger works on both x86(-64) and ARM.

Regards,
Alex

On Wed, Oct 5, 2011 at 10:04 AM, Martin D?umler <mdae at cs.tu-chemnitz.de>
wrote:
> On 05.10.2011 05:28, Rodrigo Kumpera wrote:
>> The hard debugger is no longer supported. It has only made to work on 
>> linux x86/amd64.
>>
>
> Hello,
>
> does the Soft-Debugger in Mono-2.8 or Mono-2.10 support breakpoints 
> and single stepping on ARM and x86?
>
>
> With kind regards,
> Martin D?umler
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>


------------------------------

Message: 3
Date: Wed, 5 Oct 2011 20:36:30 +0200
From: "Yosi Levy" <yosilevy at gmail.com>
Subject: [Mono-dev] Process freezes on Windows
To: <mono-devel-list at lists.ximian.com>
Message-ID: <009301cc838d$b5103f30$1f30bd90$@gmail.com>
Content-Type: text/plain; charset="us-ascii"

Hi all,

 

We have a weird problem where it seems that threading use and locking is
caused our process to freeze. The weird thing is that it freezes sometimes
after 10 consecutive runs, sometimes after 200.

 

We're running an EXE bundled with MKBUNDLE on windows. It otherwise works
great.

 

We've compiled MONO-2.0.dll with debug info to know more.

 

The info is below. As you'll see there's an int 3 which was probably done by
debugger. Exception analysis just says BREAKPOINT so should we understand
that the process is just dead-locked?

How can we debug this (again - this is a bundled EXE) ?

 

It seems to be related to threading and locking since if we reduce usage of
C# lock statements, it freezes less. 

 

Please help! Many thanks.

 

The info:

 

Thread that raised breakpoint:

Unflagged           >             8172       0              Worker Thread
_threadstartex _callthreadstartex           Normal 0000000000001111
0

 

It's disassembly:

 

__RtlUserThreadStart at 8:

77399E8A  mov         edi,edi  

77399E8C  push        ebp  

77399E8D  mov         ebp,esp  

77399E8F  push        ecx  

77399E90  push        ecx  

77399E91  lea         eax,[ebp-8]  

77399E94  push        eax  

77399E95  call        _RtlInitializeExceptionChain at 4 (77399E6Fh)  

77399E9A  push        dword ptr [ebp+0Ch]  

77399E9D  push        dword ptr [ebp+8]  

77399EA0  call        ___RtlUserThreadStart at 8 (77399EABh)  

77399EA5  int         3  

77399EA6  nop  

77399EA7  nop  

77399EA8  nop  

77399EA9  nop  

77399EAA  nop  

 

Its Call-stack:

 

               ntdll.dll!_ZwWaitForSingleObject at 12()  + 0x15 bytes     

               ntdll.dll!_ZwWaitForSingleObject at 12()  + 0x15 bytes     

               kernel32.dll!_WaitForSingleObjectExImplementation at 12()  +
0x43 bytes             

               kernel32.dll!_WaitForSingleObject at 8()  + 0x12 bytes     

               libdispatch.dll!0bec3ecb()            

                [Frames below may be incorrect and/or missing, no symbols
loaded for libdispatch.dll]  

               libdispatch.dll!0bec38c3()             

                libdispatch.dll!0bec3238()            

                libdispatch.dll!0bec2e6c()            

                libdispatch.dll!0bec3430()            

                libdispatch.dll!0bec325f()             

                pthreadVC2.dll!73714212()          

                msvcr80.dll!_callthreadstartex()  Line 348 + 0x6 bytes     C

               msvcr80.dll!_threadstartex(void * ptd=0x028a9678)  Line 326 +
0x5 bytes             C

               kernel32.dll!@BaseThreadInitThunk at 12()  + 0x12 bytes


               ntdll.dll!___RtlUserThreadStart at 8()  + 0x27 bytes           

>             ntdll.dll!__RtlUserThreadStart at 8()  + 0x1b bytes             

 

 

All threads:

 

Unflagged                           888         0              Worker Thread
__endthreadex                _NtWaitForMultipleObjects at 20
Highest 0000000000001111           0

Unflagged                           1208       0              Worker Thread
thread_start      mono_jit_runtime_invoke          Normal
0000000000001111           0

Unflagged                           1384       0              Worker Thread
_TppWorkerThread at 4 _ZwWaitForWorkViaWorkerFactory at 8                Normal
0000000000001111           0

Unflagged                           1440       0              Worker Thread
_TppWorkerThread at 4 _ZwWaitForWorkViaWorkerFactory at 8                Normal
0000000000001111           0

Unflagged                           2840       0              Worker Thread
thread_start
ves_icall_System_Threading_WaitHandle_WaitOne_internal     Normal
0000000000001111           0

Unflagged                           3176       0              Worker Thread
__endthreadex                _ZwWaitForSingleObject at 12     Time Critical
0000000000001111           0

Unflagged                           3492       0              Worker Thread
_TppWorkerThread at 4 _ZwWaitForWorkViaWorkerFactory at 8                Normal
0000000000001111           0

Unflagged                           3648       0              Worker Thread
CDeviceEnumerator::PnpNotificationThreadWrapper
_NtWaitForMultipleObjects at 20               Normal 0000000000001111
0

Unflagged                           3772       0              Worker Thread
thread_start      mono_sem_timedwait Normal 0000000000001111
0

Unflagged                           4188       0              Worker Thread
Win32 Thread    _ZwWaitForSingleObject at 12     Normal
0000000000001111           0

Unflagged                           4948       0              Worker Thread
thread_start      mono_jit_runtime_invoke          Normal
0000000000001111           0

Unflagged                           5708       0              Worker Thread
thread_start
ves_icall_System_Threading_WaitHandle_WaitOne_internal     Normal
0000000000001111           0

Unflagged                           5936       0              Worker Thread
Win32 Thread    _ZwWaitForSingleObject at 12     Normal
0000000000001111           0

Unflagged                           6092       0              Worker Thread
_TppWaiterpThread at 4                _NtWaitForMultipleObjects at 20
Normal 0000000000001111           0

Unflagged                           6132       0              Worker Thread
thread_start      monitor_thread               Normal 0000000000001111
0

Unflagged                           6276       0              Main Thread
Main Thread      mono_get_lmf_addr     Normal 0000000000001111
0

Unflagged                           6364       0              Worker Thread
_threadstartex _callthreadstartex           Normal 0000000000001111
0

Unflagged                           6980       0              Worker Thread
_TppWorkerThread at 4 _ZwWaitForWorkViaWorkerFactory at 8                Normal
0000000000001111           0

Unflagged                           7012       0              Worker Thread
__endthread     _ZwWaitForSingleObject at 12     Time Critical
0000000000001111           0

Unflagged                           7032       0              Worker Thread
thread_start
ves_icall_System_Threading_WaitHandle_WaitOne_internal     Normal
0000000000001111           0

Unflagged                           7220       0              Worker Thread
thread_start
ves_icall_System_Threading_WaitHandle_WaitOne_internal     Normal
0000000000001111           0

Unflagged                           7384       0              Worker Thread
CThread::ThreadStartRoutine    _NtWaitForMultipleObjects at 20
Time Critical        0000000000001111           0

Unflagged                           7520       0              Worker Thread
_TppWorkerThread at 4 _ZwWaitForWorkViaWorkerFactory at 8                Normal
0000000000001111           0

Unflagged                           7564       0              Worker Thread
CThread::ThreadStartRoutine    _NtWaitForMultipleObjects at 20
Time Critical        0000000000001111           0

Unflagged                           7644       0              Worker Thread
thread_start      mono_sem_timedwait Normal 0000000000001111
0

Unflagged                           7744       0              Worker Thread
_TppWorkerThread at 4 _ZwWaitForWorkViaWorkerFactory at 8                Normal
0000000000001111           0

Unflagged                           7896       0              Worker Thread
thread_start
ves_icall_System_Threading_WaitHandle_WaitOne_internal     Normal
0000000000001111           0

Unflagged                           7904       0              Worker Thread
thread_start
ves_icall_System_Threading_WaitHandle_WaitOne_internal     Normal
0000000000001111           0

Unflagged                           8040       0              Worker Thread
CThread::ThreadStartRoutine    _NtWaitForMultipleObjects at 20
Time Critical        0000000000001111           0

Unflagged                           8112       0              Worker Thread
DllRefCountSafeThreadThunk    _NtWaitForMultipleObjects at 20
Normal 0000000000001111           0

Unflagged           >             8172       0              Worker Thread
_threadstartex _callthreadstartex           Normal 0000000000001111
0

 

 

Any ideas? I can provide a dump if anyone wants to help. We are releasing
tomorrow L. No choice here.

 

How can we know reason for this int 3

 

Thanks,

Jo.

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.ximian.com/pipermail/mono-devel-list/attachments/20111005/2e6ff
5a8/attachment.html 

------------------------------

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


End of Mono-devel-list Digest, Vol 78, Issue 3
**********************************************



More information about the Mono-devel-list mailing list