Strange "Could not configure datastore from input stream" and System.OutOfMemoryException exceptions

478 views
Skip to first unread message

Florian DREVET

unread,
Dec 8, 2011, 2:08:58 PM12/8/11
to nhu...@googlegroups.com
Hi,

We are facing a strange problem in one of our customers.

It "randomly" (few times per day) suffers from :
  • "Could not configure datastore from input stream" errors (anonymized detail below, this can occurs on any embedded hbm.xml file)
  • followed by System.OutOfMemoryException exceptions

As far as I know, our others customers (with the SAME version) are working fine.

I suspect :
  • a corrupted assembly (very few probabilities, isn't it ?)
  • low memory side effect
Any idea about this ?

Best regards,


Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 08/12/2011 12:26:08
Event time (UTC): 08/12/2011 11:26:08
Event ID: 0820d36abb164954bfc1aa6b8dd90432
Event sequence: 204
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: XXXXXXXXXX
    Trust level: Full
    Application Virtual Path: XXXXXXXXXX
    Application Path: XXXXXXXXXX
    Machine name: XXXXXXXXXX
 
Process information:
    Process ID: 4488
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
 
Exception information:
    Exception type: MappingException
    Exception message: Could not configure datastore from input stream XXXXXXXXXX.hbm.xml
 
Request information:
    Request URL: XXXXXXXXXX
    Request path: XXXXXXXXXX
    User host address: XXXXXXXXXX
    User: 
    Is authenticated: False
    Authentication Type: 
    Thread account name: NT AUTHORITY\NETWORK SERVICE
 
Thread information:
    Thread ID: 1
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at NHibernate.Cfg.Configuration.LogAndThrow(Exception exception)
   at NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream, String name)
   at NHibernate.Cfg.Configuration.AddResource(String path, Assembly assembly)
   at NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly)
   at NHibernate.Cfg.Configuration.AddAssembly(String assemblyName)
   at NHibernate.Cfg.Configuration.DoConfigure(IHibernateConfiguration hc)
   at NHibernate.Cfg.Configuration.Configure(XmlReader textReader)
   at NHibernate.Cfg.Configuration.Configure(String fileName, Boolean ignoreSessionFactoryConfig)
   at NHibernate.Cfg.Configuration.Configure(String fileName)
   at ICS_Net.Data.NHibernateSessionManager.GetSessionFactoryFor(String sessionFactoryConfigPath)
   at ICS_Net.Data.NHibernateSessionManager.GetSessionFrom(String sessionFactoryConfigPath, IInterceptor interceptor)
   at ICS_Net.Data.NHibernateConfig.get_Session()
   at ICS_Net.Web.UI.IcsPage.AppliquerFiltresNHibernate(Int32 idLangue)
   at ICS_Net.Web.UI.IcsPage.OnPreInit(EventArgs e)
   at System.Web.UI.Page.PerformPreInit()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



John Davidson

unread,
Dec 8, 2011, 4:48:34 PM12/8/11
to nhu...@googlegroups.com
You may be getting a race condition where 2 separate threads are trying to initialize the configuration at the same time. You may need a lock to have the second thread wait until the configuration on the first thread is completed.

John Davidson





--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/p5x6elfGDfoJ.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.

Florian DREVET

unread,
Dec 9, 2011, 2:42:15 AM12/9/11
to nhu...@googlegroups.com
Hi jwdavidson,

Thank you for your advice, yes we didn't locked the configuration (ASP.NET application) and we should.
Reply all
Reply to author
Forward
0 new messages