"LoaderLock was detected" in SessionFactoryHolder


For a while (I'd say about three weeks with the latest source) I occasionally get Managed Debugging Assistant message (almost like an exception) with the content "Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang." from SessionFactoryHolder ln 87 (var result = config.BuildSessionFactory();). Can't produce a reliable repro yet.
Closed Nov 6, 2012 at 8:00 PM by sebastienros


sebastienros wrote Nov 2, 2012 at 4:24 PM

Not sure this is something we have into our hands right now:

sebastienros wrote Nov 2, 2012 at 4:27 PM

You can safely ignore the exception and uncheck it in Debug manage exceptions window

Piedone wrote Nov 2, 2012 at 7:39 PM

Yeah, that's it. I also get this with SQL CE (can't say anything about SQL Server though). But what causes this?