[Mono-bugs] [Bug 82833][Maj] New - assertion failed in mono_internal_hash_table_insert

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Sep 13 04:02:37 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by george.barbarosie at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=82833

--- shadow/82833	2007-09-13 04:02:37.000000000 -0400
+++ shadow/82833.tmp.10721	2007-09-13 04:02:37.000000000 -0400
@@ -0,0 +1,181 @@
+Bug#: 82833
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: Gentoo Linux 2007.0 / AMD64
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Major
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: george.barbarosie at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: assertion failed in mono_internal_hash_table_insert
+
+This only seems to happen on AMD64.
+
+Mono 1.2.5 as well as mono compiled from svn trunk sometimes abort with **
+ERROR **: file mono-internal-hash.c: line 98
+(mono_internal_hash_table_insert): assertion failed:
+(mono_internal_hash_table_lookup (table, key) == NULL)
+
+For example when running xsp or xsp2 version 1.2.5 or SVN trunk with no
+arguments in an empty directory, the first page access (which should result
+in a 404) makes mono abort with this message:
+
+** ERROR **: file mono-internal-hash.c: line 98
+(mono_internal_hash_table_insert): assertion failed:
+(mono_internal_hash_table_lookup (table, key) == NULL)
+aborting...
+Stacktrace:
+
+  at (wrapper xdomain-dispatch) System.AppDomain.SetData
+(object,byte[]&,byte[]&,string) <0x0012d>
+  at (wrapper xdomain-dispatch) System.AppDomain.SetData
+(object,byte[]&,byte[]&,string) <0xffffffff>
+  at (wrapper xdomain-invoke) System.AppDomain.SetData (string,object)
+<0xffffffff>
+  at (wrapper remoting-invoke-with-check) System.AppDomain.SetData
+(string,object) <0xffffffff>
+  at System.Web.Hosting.ApplicationHost.CreateApplicationHost
+(System.Type,string,string) <0x00539>
+  at Mono.WebServer.VPathToHost.CreateHost
+(Mono.WebServer.ApplicationServer,Mono.WebServer.WebSource) <0x000d3>
+  at Mono.WebServer.ApplicationServer.GetApplicationForPath
+(string,int,string,bool) <0x00118>
+  at (wrapper remoting-invoke-with-check)
+Mono.WebServer.ApplicationServer.GetApplicationForPath
+(string,int,string,bool) <0xffffffff>
+  at Mono.WebServer.XSPWorker.RunInternal (object) <0x000b9>
+  at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void_object
+(object) <0xffffffff>
+  at (wrapper runtime-invoke)
+System.Threading.WaitCallback.runtime_invoke_void_object
+(object,intptr,intptr,intptr) <0xffffffff>
+
+Native stacktrace:
+
+        /home/georgeb/devel/mono/mono/mini/mono [0x51bbad]
+        /lib/libpthread.so.0 [0x2af9c0dbfd70]
+        /lib/libc.so.6(gsignal+0x35) [0x2af9c127c665]
+        /lib/libc.so.6(abort+0x10e) [0x2af9c127da0e]
+        /usr/lib/libglib-2.0.so.0 [0x2af9c0a4448c]
+        /usr/lib/libglib-2.0.so.0(g_log+0x83) [0x2af9c0a44513]
+        /usr/lib/libglib-2.0.so.0(g_assert_warning+0x76) [0x2af9c0a44596]
+        /home/georgeb/devel/mono/mono/mini/mono [0x4d239b]
+        /home/georgeb/devel/mono/mono/mini/mono [0x50902d]
+        /home/georgeb/devel/mono/mono/mini/mono [0x43f99e]
+        [0x40000139]
+
+Debug info from gdb:
+
+Using host libthread_db library "/lib/libthread_db.so.1".
+0x00002af9c0dbeb3b in read () from /lib/libpthread.so.0
+
+
+=================================================================
+Got a SIGABRT while executing native code. This usually indicates
+a fatal error in the mono runtime or one of the native libraries 
+used by your application.
+=================================================================
+
+Aborted
+
+
+
+My configuration: 
+ $ uname -a
+Linux laguna 2.6.22-gentoo-r2 #1 PREEMPT Tue Aug 7 15:39:33 EEST 2007
+x86_64 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux
+
+ $ gcc -v
+Using built-in specs.
+Target: x86_64-pc-linux-gnu
+Configured with:
+/var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2.0/configure --prefix=/usr
+--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.2.0
+--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include
+--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.0
+--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.0/man
+--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.2.0/info
+--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.0/include/g++-v4
+--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
+--enable-nls --without-included-gettext --with-system-zlib
+--disable-checking --disable-werror --enable-secureplt
+--disable-libunwind-exceptions --enable-multilib --enable-libmudflap
+--disable-libssp --disable-libgcj --enable-languages=c,c++,fortran
+--enable-shared --enable-threads=posix --enable-__cxa_atexit
+--enable-clocale=gnu
+Thread model: posix
+gcc version 4.2.0 (Gentoo 4.2.0 p1.4)
+
+$ /lib64/libc.so.6 
+GNU C Library stable release version 2.6.1, by Roland McGrath et al.
+Copyright (C) 2007 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.
+There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.
+Compiled by GNU CC version 4.2.0 (Gentoo 4.2.0 p1.4).
+Compiled on a Linux >>2.6.22-gentoo-r2<< system on 2007-08-20.
+Available extensions:
+        C stubs add-on version 2.1.2
+        crypt add-on version 2.1 by Michael Glad and others
+        Gentoo patchset 1.0
+        GNU Libidn by Simon Josefsson
+        Native POSIX Threads Library by Ulrich Drepper et al
+        Support for some architectures added on, not maintained in glibc core.
+        BIND-8.2.3-T5B
+For bug reporting instructions, please see:
+<http://www.gnu.org/software/libc/bugs.html>.
+
+glib version: 2.12.13
+
+mono SVN trunk compiled with these options: 
+./configure --with-preview=yes --with-moonlight=yes --with-sigaltstack=yes
+--with-glib=system --with-gc=included --with-tls=__thread
+
+The point of failure seems to be mono_jit_compile_method_inner(MonoMethod*,
+MonoDomain*, int), in mono/mini/mini.c at line 10984. I have added this
+simple patch, which most likely is not anywhere near correct, but prevents
+the assertion from failing:
+
+$ svn diff mono/mini/mini.c 
+Index: mono/mini/mini.c
+===================================================================
+--- mono/mini/mini.c    (revision 85678)
++++ mono/mini/mini.c    (working copy)
+@@ -10981,6 +10981,10 @@
+        }
+ 
+        if (code == NULL) {
++               if (info) {
++                  
+mono_internal_hash_table_remove(&target_domain->jit_code_hash, method);
++                   printf("BUG: something horrible happened, method %s\n",
+method->name);
++               }
+                mono_internal_hash_table_insert
+(&target_domain->jit_code_hash, method, cfg->jit_info);
+                code = cfg->native_code;
+        }
+
+Rerunning xsp2 (on an empty directory, with no arguments) using the patched
+runtime gives the following output:
+
+(first HTTP access:)
+BUG: something horrible happened, method
+__icall_wrapper_mono_marshal_xdomain_copy_value
+BUG: something horrible happened, method
+__icall_wrapper_mono_marshal_set_domain_by_id
+BUG: something horrible happened, method
+__icall_wrapper_mono_thread_get_pending_exception
+
+(after pressing enter, on exit):
+BUG: something horrible happened, method
+__icall_wrapper_mono_thread_interruption_checkpoint
+BUG: something horrible happened, method
+__icall_wrapper_mono_thread_interruption_checkpoint


More information about the mono-bugs mailing list