[Mono-bugs] [Bug 350530] AppDomain. ExecuteAssemblyByName produces a file not found error

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jan 12 09:25:27 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=350530

User gert.driesen at pandora.be added comment
https://bugzilla.novell.com/show_bug.cgi?id=350530#c3


Gert Driesen <gert.driesen at pandora.be> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |gert.driesen at pandora.be
             Status|RESOLVED                                        |REOPENED
         Resolution|FIXED                                           |




--- Comment #3 from Gert Driesen <gert.driesen at pandora.be>  2008-01-12 07:25:25 MST ---
Zoltan, if the assembly does not have an entrypoint then a SIGABRT is reported:

** ERROR **: file loader.c: line 1337 (mono_get_method_from_token): assertion
failed: (table == MONO_TABLE_MEMBERREF)
aborting...
Stacktrace:

  at (wrapper managed-to-native) System.AppDomain.ExecuteAssembly
(System.Reflection.Assembly,string[]) <0x00004>
  at (wrapper managed-to-native) System.AppDomain.ExecuteAssembly
(System.Reflection.Assembly,string[]) <0xffffffff>
  at System.AppDomain.ExecuteAssembly
(string,System.Security.Policy.Evidence,string[]) <0x00021>
  at (wrapper remoting-invoke-with-check) System.AppDomain.ExecuteAssembly
(string,System.Security.Policy.Evidence,string[]) <0xffffffff>
  at System.AppDomain.ExecuteAssembly (string) <0x00014>
  at (wrapper remoting-invoke-with-check) System.AppDomain.ExecuteAssembly
(string) <0xffffffff>
  at (wrapper xdomain-dispatch) System.AppDomain.ExecuteAssembly
(object,byte[]&,byte[]&,string) <0xffffffff>
  at (wrapper xdomain-invoke) System.AppDomain.ExecuteAssembly (string)
<0xffffffff>
  at (wrapper remoting-invoke-with-check) System.AppDomain.ExecuteAssembly
(string) <0xffffffff>
  at Program.Main () <0x0024f>
  at (wrapper runtime-invoke) Program.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        /home/gert/mono/install/bin/mono [0x8170e9e]
        [0xffffe440]
        /lib/tls/i686/cmov/libc.so.6(abort+0x101) [0xb7d58201]
        /usr/lib/libglib-2.0.so.0(g_logv+0x4ca) [0xb7eeef4a]
        /usr/lib/libglib-2.0.so.0(g_log+0x29) [0xb7eeef89]
        /usr/lib/libglib-2.0.so.0(g_assert_warning+0x76) [0xb7eef006]
        /home/gert/mono/install/bin/mono [0x81011d2]
        /home/gert/mono/install/bin/mono(mono_get_method_full+0x69) [0x81018e9]
        /home/gert/mono/install/bin/mono(mono_get_method+0x27) [0x8101947]
        /home/gert/mono/install/bin/mono [0x80e628d]
        [0xb71b3c2d]
        [0xb71b3b22]
        [0xb71b3ace]
        [0xb71b3a45]
        [0xb71b39fe]
        [0xb71b382a]
        [0xb730a689]
        [0xb72e77ce]
        [0xb79a3490]
        [0xb79a31be]
        /home/gert/mono/install/bin/mono(mono_runtime_exec_main+0xbb)
[0x80f9f3b]
        /home/gert/mono/install/bin/mono(mono_runtime_run_main+0x1ba)
[0x80fb34a]
        /home/gert/mono/install/bin/mono(mono_main+0xfaf) [0x805b69f]
        /home/gert/mono/install/bin/mono [0x805a1e2]
        /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7d42050]
        /home/gert/mono/install/bin/mono [0x805a151]

Debug info from gdb:

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1210931504 (LWP 7086)]
[New Thread -1220199536 (LWP 7090)]
[New Thread -1220052080 (LWP 7087)]
0xffffe410 in __kernel_vsyscall ()
  3 Thread -1220052080 (LWP 7087)  0xffffe410 in __kernel_vsyscall ()
  2 Thread -1220199536 (LWP 7090)  0xffffe410 in __kernel_vsyscall ()
  1 Thread -1210931504 (LWP 7086)  0xffffe410 in __kernel_vsyscall ()

Thread 3 (Thread -1220052080 (LWP 7087)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7ea79f6 in ?? () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x08116511 in collection_thread (unused=0x0) at collection.c:34
#3  0xb7ea046b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb7dff6de in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread -1220199536 (LWP 7090)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7ea4676 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0x0810887f in timedwait_signal_poll_cond (cond=0xb79511dc, 
    mutex=0xb79511c4, timeout=0x0, alertable=0) at handles.c:1443
#3  0x0810b31f in _wapi_handle_timedwait_signal_handle (handle=0x404, 
    timeout=0x0, alertable=0) at handles.c:1523
#4  0x0810b39c in _wapi_handle_wait_signal_handle (handle=0x404, alertable=0)
    at handles.c:1483
#5  0x08107abf in WaitForSingleObjectEx (handle=0x404, timeout=4294967295, 
    alertable=0) at wait.c:200
#6  0x080cff1a in finalizer_thread (unused=0x0) at gc.c:894
#7  0x080f0fbf in start_wrapper (data=0x823e080) at threads.c:586
#8  0x08117ab2 in thread_start_routine (args=0xb77fd8a0) at threads.c:282
#9  0x0812bc65 in GC_start_routine (arg=0x26f40) at pthread_support.c:1369
#10 0xb7ea046b in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#11 0xb7dff6de in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread -1210931504 (LWP 7086)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7dbef69 in fork () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7ea9874 in fork () from /lib/tls/i686/cmov/libpthread.so.0
#3  0xb7f16ab9 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00000010 in ?? ()
#5  0x00000010 in ?? ()
#6  0xb7ebb850 in ?? () from /usr/lib/libglib-2.0.so.0
#7  0xb7ebb0b8 in ?? () from /usr/lib/libglib-2.0.so.0
#8  0x0830ae88 in ?? ()
#9  0xe96258b8 in ?? ()
#10 0xb7d96071 in ?? () from /lib/tls/i686/cmov/libc.so.6
#11 0x00000010 in ?? ()
#12 0x00000010 in ?? ()
#13 0x00000010 in ?? ()
#14 0xbfeab234 in ?? ()
#15 0xb7d97fc0 in malloc () from /lib/tls/i686/cmov/libc.so.6
#16 0xb7f176ab in g_spawn_sync () from /usr/lib/libglib-2.0.so.0
#17 0xb7f17b4c in g_spawn_command_line_sync () from /usr/lib/libglib-2.0.so.0
#18 0x08170f39 in mono_handle_native_sigsegv (signal=6, ctx=0xbfeabd7c)
    at mini-exceptions.c:1061
#19 <signal handler called>
#20 0xffffe410 in __kernel_vsyscall ()
#21 0xb7d56875 in raise () from /lib/tls/i686/cmov/libc.so.6
#22 0xb7d58201 in abort () from /lib/tls/i686/cmov/libc.so.6
#23 0xb7eeef4a in g_logv () from /usr/lib/libglib-2.0.so.0
#24 0xb7eeef89 in g_log () from /usr/lib/libglib-2.0.so.0
#25 0xb7eef006 in g_assert_warning () from /usr/lib/libglib-2.0.so.0
#26 0x081011d2 in mono_get_method_from_token (image=0x82dd400, 
    token=3086430748, klass=0x81afea7, context=0x0, used_context=0xbfeac714)
    at loader.c:1337
#27 0x081018e9 in mono_get_method_full (image=0x82dd400, token=0, klass=0x0, 
    context=0x0) at loader.c:1437
#28 0x08101947 in mono_get_method (image=0x82dd400, token=0, klass=0x0)
    at loader.c:1418
#29 0x080e628d in ves_icall_System_AppDomain_ExecuteAssembly (ad=0x5b9d8, 
    refass=0x27ae0, args=0x0) at appdomain.c:1470
#30 0xb71b3c2d in ?? ()
#31 0x0005b9d8 in ?? ()
#32 0x00027ae0 in ?? ()
#33 0x00000000 in ?? ()
#0  0xffffe410 in __kernel_vsyscall ()


=================================================================
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.
=================================================================

Also, on the 2.0 we apparently throw a FileNotFoundException if the only file
matching the assembly name is not a valid assembly. MS throws a
BadImageFormatException in that case.

I've committed a standalone testcase to SVN:
gert/standalone/bug350530


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list