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
URL:
Depends on:
Blocks:
 
Reported: 2012-04-24 17:27 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2015-01-07 11:13 UTC (History)
4 users (show)

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


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


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 23242

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

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 ***