Bug 4629 - Deadlock while running static cctors
Summary: Deadlock while running static cctors
Status: RESOLVED DUPLICATE of bug 23242
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
Depends on:
Reported: 2012-04-24 17:27 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2015-01-07 11:13 UTC (History)
4 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:

crashreport.txt (12.26 KB, text/plain)
2012-04-24 17:27 UTC, Rolf Bjarne Kvinge [MSFT]

Description Rolf Bjarne Kvinge [MSFT] 2012-04-24 17:27:47 UTC
Created attachment 1741 [details]

See attached crash report.

This bug comes from: https://bugzilla.xamarin.com/show_bug.cgi?id=1458#c48
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-04-24 17:28:22 UTC
Zoltan, this looks AOT-related.
Comment 2 Zoltan Varga 2012-04-24 18:54:01 UTC
Thread 3 seems to be spinning in the while loop at object.c:347, while two other threads are waiting for a lock.
Comment 3 Zoltan Varga 2012-04-24 18:56:02 UTC
So it is probably not AOT related,but something which is triggered by using AOT, i.e. no time is spent JITting.
It seems two or more threads trying to execute the static ctor of DateTime at the same time.
Comment 4 Zoltan Varga 2012-05-06 20:30:57 UTC
How can I reproduce this ?
Comment 5 Rolf Bjarne Kvinge [MSFT] 2012-05-08 16:31:37 UTC
This is not easily reproducible, it happens very rarely.
Comment 6 Rodrigo Kumpera 2014-01-17 18:24:47 UTC
There one weird thing on that backtrace, you have two threads running the same class constructor, which should not be allowed.

See mscorlib_System_Globalization_DateTimeFormatInfo__cctor in thread 0 and 3.
Comment 7 Zoltan Varga 2015-01-07 11:13:29 UTC

*** This bug has been marked as a duplicate of bug 23242 ***

Note You need to log in before you can comment on or make changes to this bug.