Bug 21949 - Mono crashed on System.Reflection.Assembly.InternalGetAssemblyName.
Summary: Mono crashed on System.Reflection.Assembly.InternalGetAssemblyName.
Status: RESOLVED NORESPONSE
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection ()
Version: 2.10.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-08-08 10:34 UTC by Aleksey Sotnikov
Modified: 2017-07-12 22:49 UTC (History)
3 users (show)

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

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 NORESPONSE

Description Aleksey Sotnikov 2014-08-08 10:34:14 UTC
Mono crashed with native stacktrace in System.Reflection.Assembly.InternalGetAssemblyName (in native stack g_hash_table_lookup). It happened  when I unloaded the domain and then try loaded some .dll file again with another domain name. Mono version was 2.6.7 but code in mono_image_open is not much different from 3.4.0. 
I looked at  assembly.c and domain.c but I haven't found any problems. I think, it may be problem in libglib-2.0. 
I couldn't reproduce this problem with call AssemblyName.GetAssemblyName, but I found a similar problem in version 2.2 https://bugzilla.novell.com/show_bug.cgi?id=467151

Log:
09:50:49  mono: Info: Domain CC_CAP_CH unloaded!
...
09:50:52  mono: Debug: Loading /opt/..../cc_cap_ch.dll in domain CC_CAP_CH_0001_35
09:50:52  mono: error: Stacktrace:
Feb 25 09:50:52  mono: error: 
Feb 25 09:50:52  mono: error:   at (wrapper managed-to-native) System.Reflection.Assembly.InternalGetAssemblyName (string,System.Reflection.AssemblyName) <0x00004>
Feb 25 09:50:52  mono: error:   at (wrapper managed-to-native) System.Reflection.Assembly.InternalGetAssemblyName (string,System.Reflection.AssemblyName) <0x00004>
Feb 25 09:50:52  mono: error:   at System.Reflection.AssemblyName.GetAssemblyName (string) [0x00017] in /usr/src/redhat/BUILD/mono-2.6.7/mcs/class/corlib/System.Reflection/AssemblyName.cs:442
...
Feb 25 09:50:52  mono: error:   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0x00040>
Feb 25 09:50:52  mono: error: 
Feb 25 09:50:52  mono: error: Native stacktrace:
Feb 25 09:50:52  mono: error: 
Feb 25 09:50:52  mono: error: 	/opt/novell/mono/bin/mono.bin [0x80d932b]
Feb 25 09:50:52  mono: error: 	/opt/novell/mono/bin/mono.bin [0x81143a0]
Feb 25 09:50:52  mono: error: 	[0xa63440]
Feb 25 09:50:52  mono: error: 	/lib/libglib-2.0.so.0(g_hash_table_lookup+0x46) [0x7c3e56]
Feb 25 09:50:52  mono: error: 	/opt/novell/mono/bin/mono.bin [0x81c4406]
Feb 25 09:50:52  mono: error: 	/opt/novell/mono/bin/mono.bin(mono_image_open+0x20) [0x81c4c00]
Feb 25 09:50:52  mono: error: 	/opt/novell/mono/bin/mono.bin [0x8144801]
Feb 25 09:50:52  mono: error: 	[0x271f58f]
Feb 25 09:50:52  mono: error: 	[0x271f51e]
Feb 25 09:50:52  mono: error: 	[0x271a5ee]
Feb 25 09:50:52  mono: error: 	[0x2719e62]
Feb 25 09:50:52  mono: error: 	[0x27163a6]
Feb 25 09:50:52  mono: error: 	[0xc266f0]
Feb 25 09:50:52  mono: error: 	[0xc2648b]
Feb 25 09:50:52  mono: error: 	[0xc254e7]
Feb 25 09:50:52  mono: error: 	[0xc240db]
Feb 25 09:50:52  mono: error: 	[0xab7466]
Feb 25 09:50:52  mono: error: 	[0xab7431]
Feb 25 09:50:52  mono: error: 	[0xab6f5b]
Feb 25 09:50:52  mono: error: 	[0xab3f99]
Feb 25 09:50:52  mono: error: 	[0x96e439]
Feb 25 09:50:52  mono: error: 	/opt/novell/mono/bin/mono.bin [0x8061f86]
Feb 25 09:50:52  mono: error: 	/opt/novell/mono/bin/mono.bin(mono_runtime_invoke+0x40) [0x81ba6b0]
Feb 25 09:50:52  mono: error: 	/opt/novell/mono/bin/mono.bin(mono_runtime_delegate_invoke+0x36) [0x81ba916]
Feb 25 09:50:52  mono: error: 	/opt/novell/mono/bin/mono.bin [0x8157e34]
Feb 25 09:50:52  mono: error: 	/opt/novell/mono/bin/mono.bin [0x81d60ce]
Feb 25 09:50:52  mono: error: 	/opt/novell/mono/bin/mono.bin [0x82049e5]
Feb 25 09:50:52  mono: error: 	/lib/libpthread.so.0 [0x6e5832]
Feb 25 09:50:52  mono: error: 	/lib/libc.so.6(clone+0x5e) [0x663e0e]
Feb 25 09:50:52  mono: error: 
Feb 25 09:50:52  mono: error: Debug info from gdb:
Feb 25 09:50:52  mono: error: 


Code:
Debug("Loading {0} in domain {1}", fname, mDomain);

// load 
mAssembly = mDomain.Load(AssemblyName.GetAssemblyName(fname));
Comment 1 Rodrigo Kumpera 2014-08-12 20:00:40 UTC
Please provide a test case that shows the bug against mono 3.6.0.

Mono 2.0 is no longer been maintained.
Comment 2 Ludovic Henry 2017-07-12 22:49:41 UTC
Can you still reproduce that with latest version of mono? If you can, please reopen and provide a repro case. Thank you