Bug 45728 - NRE in System.Runtime.Remoting.ObjRef.get_ServerType on getting app domain
Summary: NRE in System.Runtime.Remoting.ObjRef.get_ServerType on getting app domain
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-20 10:43 UTC by Leonid Shalupov
Modified: 2016-12-05 08:18 UTC (History)
3 users (show)

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


Attachments
repro.cs (796 bytes, text/plain)
2016-10-20 10:43 UTC, Leonid Shalupov
Details

Description Leonid Shalupov 2016-10-20 10:43:37 UTC
Created attachment 18132 [details]
repro.cs

Looks like some threading issue.
Attached program fails with the following stack trace every couple of runs (not always):

Server stack trace:
  at System.Runtime.Remoting.ObjRef.get_ServerType () [0x00011] in <f7aaa673a4cb46db963d3c7434716125>:0
  at System.Runtime.Remoting.RemotingServices.Unmarshal (System.Runtime.Remoting.ObjRef objectRef, System.Boolean fRefine) [0x00006] in <f7aaa673a4cb46db963d3c7434716125>:0
  at System.Runtime.Remoting.RemotingServices.Unmarshal (System.Runtime.Remoting.ObjRef objectRef) [0x00000] in <f7aaa673a4cb46db963d3c7434716125>:0
  at System.Runtime.Remoting.RemotingServices.GetDomainProxy (System.AppDomain domain) [0x0005e] in <f7aaa673a4cb46db963d3c7434716125>:0
  at System.AppDomain.get_DefaultDomain () [0x00026] in <f7aaa673a4cb46db963d3c7434716125>:0
  at System.AppDomain.IsDefaultAppDomain () [0x00000] in <f7aaa673a4cb46db963d3c7434716125>:0
  at (wrapper remoting-invoke-with-check) System.AppDomain:IsDefaultAppDomain ()
  at ConsoleApplication.Program.Main (System.String[] args) [0x00012] in <20993866b7d647f489f94537728c8091>:0
  at (wrapper managed-to-native) System.AppDomain:ExecuteAssembly (System.AppDomain,System.Reflection.Assembly,string[])
  at System.AppDomain.ExecuteAssemblyInternal (System.Reflection.Assembly a, System.String[] args) [0x0002c] in <f7aaa673a4cb46db963d3c7434716125>:0
  at System.AppDomain.ExecuteAssemblyByName (System.String assemblyName, System.String[] args) [0x00008] in <f7aaa673a4cb46db963d3c7434716125>:0
  at (wrapper remoting-invoke-with-check) System.AppDomain:ExecuteAssemblyByName (string,string[])
  at (wrapper xdomain-dispatch) System.AppDomain:ExecuteAssemblyByName (object,byte[]&,byte[]&,string,string[])

Exception rethrown at [0]:
  at (wrapper xdomain-invoke) System.AppDomain:ExecuteAssemblyByName (string,string[])
  at (wrapper remoting-invoke-with-check) System.AppDomain:ExecuteAssemblyByName (string,string[])
  at ConsoleApplication.Program+<Main>c__AnonStorey0.<>m__0 () [0x00028] in <20993866b7d647f489f94537728c8091>:0
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <f7aaa673a4cb46db963d3c7434716125>:0
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <f7aaa673a4cb46db963d3c7434716125>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <f7aaa673a4cb46db963d3c7434716125>:0
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <f7aaa673a4cb46db963d3c7434716125>:0
  at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <f7aaa673a4cb46db963d3c7434716125>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object

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