[Mono-bugs] [Bug 350188] New: Seg Fault On Domain Unload

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Dec 20 17:41:13 EST 2007


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


           Summary: Seg Fault On Domain Unload
           Product: Mono: Runtime
           Version: 1.2.6
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Blocker
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: jimpurbrick at yahoo.co.uk
         QAContact: mono-bugs at ximian.com
          Found By: Third Party Developer/Partner


We're statically embedding Mono 1.2.6 built from source on Debian sarge in the
Second Life simulator server process. The long running process uses domain
unloading to unloaded assemblies that are no longer in use. After several
domain unloads Mono crashes with a seg fault. After repeatedly producing the
following WARNING:

** (process:23471): WARNING **: Thread (nil) may have been prematurely
finalized

GDB output from our minimal test harness below:

2007-12-20T22:16:08Z INFO: main: Iteration 6
2007-12-20T22:16:08Z INFO: createFromLoadedImage: Image not loaded. Loading
from buffer.
Mono-INFO: Image addref LSL_6fe34fe1_4fcf_7cf7_7486_7e10a3054aa9 0x84f4518 ->
data-0x84bb808 0x8493700: 1

Mono-INFO: Assembly LSL_6fe34fe1_4fcf_7cf7_7486_7e10a3054aa9 0x84f4518 added to
domain Secondary Domain6, ref_count=1

Mono-INFO: AOT failed to load AOT module data-0x84bb808.so: data-0x84bb808.so:
cannot open shared object file: No such file or directory

Mono-INFO: Assembly Loader probing location:
'/opt/linden/indra/lib/mono/1.0/LslUserScript.dll'.
Mono-INFO: Image addref LslUserScript 0x8492c90 ->
/opt/linden/indra/lib/mono/1.0/LslUserScript.dll 0x84f0170: 2

Mono-INFO: Assembly LslUserScript 0x8492c90 added to domain Secondary Domain6,
ref_count=1

Mono-INFO: AOT failed to load AOT module
/opt/linden/indra/lib/mono/1.0/LslUserScript.dll.so:
/opt/linden/indra/lib/mono/1.0/LslUserScript.dll.so: cannot open shared object
file: No such file or directory

Mono-INFO: Assembly Loader loaded assembly from location:
'/opt/linden/indra/lib/mono/1.0/LslUserScript.dll'.
Mono-INFO: Config attempting to parse:
'/opt/linden/indra/lib/mono/1.0/LslUserScript.dll.config'.
Mono-INFO: Config attempting to parse:
'/home/babbage/local/etc/mono/assemblies/LslUserScript/LslUserScript.config'.
Mono-INFO: Config attempting to parse:
'/home/babbage/.mono/assemblies/LslUserScript/LslUserScript.config'.
Mono-INFO: Assembly Ref addref LSL_6fe34fe1_4fcf_7cf7_7486_7e10a3054aa9
0x84f4518 -> LslUserScript 0x8492c90: 2

Mono-INFO: Assembly Ref addref LslUserScript 0x8492c90 -> UserScript 0x83ea3a0:
4

Mono-INFO: Assembly Ref addref LslUserScript 0x8492c90 -> mscorlib 0x83406f0:
10

Mono-INFO: Assembly Ref addref LslUserScript 0x8492c90 -> ScriptTypes
0x83973a0: 3

2007-12-20T22:16:08Z DEBUG: new_gc_handle: Mono: GC Handle Count 1
2007-12-20T22:16:08Z INFO: setAssembly: Added
6fe34fe1-4fcf-7cf7-7486-7e10a3054aa9.lslbyte ref count 1
2007-12-20T22:16:08Z DEBUG:
LLScriptExecuteMono::~LLScriptExecuteMono:LSL_6fe34fe1_4fcf_7cf7_7486_7e10a3054aa9
2007-12-20T22:16:08Z DEBUG: free_gc_handle: Mono: GC Handle Count 0
2007-12-20T22:16:08Z INFO: LLMonoDomain: Mono: Unloading Domain 0x8354ce0
[New Thread -1490076752 (LWP 23327)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1490076752 (LWP 23327)]
0x08147300 in clear_cached_vtable (key=0x8403a5c, value=0x84dd328, 
    user_data=0x8403a5c) at appdomain.c:1606
1606            if (runtime_info && runtime_info->max_domain >=
domain->domain_id)

(gdb) bt
#0  0x08147300 in clear_cached_vtable (key=0x8403a5c, value=0x84dd328, 
    user_data=0x8403a5c) at appdomain.c:1606
#1  0xa7ecc556 in IA__g_hash_table_foreach (hash_table=0x849f6a0, 
    func=0x81472f0 <clear_cached_vtable>, user_data=0x21960) at ghash.c:680
#2  0x081473cd in unload_thread_main (arg=0x21964) at appdomain.c:1642
#3  0x0818d49f in thread_start_routine (args=0xa7886258) at threads.c:264
#4  0x081a6933 in GC_start_routine (arg=0x8403a5c) at pthread_support.c:1369
#5  0xa7ea0ca3 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#6  0xa7d58f5a in clone () from /lib/tls/i686/cmov/libc.so.6

(gdb) p runtime_info
$1 = (MonoClassRuntimeInfo *) 0x1
(gdb) p key
$2 = (gpointer) 0x84d3b4c
(gdb) p user_data
$3 = (gpointer) 0x84d3b4c

(gdb) up
(gdb) up

#2  0x081473cd in unload_thread_main (arg=0x21a54) at appdomain.c:1642
1642            g_hash_table_foreach (domain->class_vtable_hash,
clear_cached_vtable, domain);

(gdb) p *domain
$6 = {lock = {depth = 0, mutex = {__m_reserved = 1, __m_count = 1, 
      __m_owner = 0x5c2c, __m_kind = 1, __m_lock = {__status = 1, 
        __spinlock = 0}}}, mp = 0x838cf90, code_mp = 0x831a608, 
  setup = 0x2ef00, domain = 0x66fc0, default_context = 0x23d50, 
  out_of_memory_ex = 0x66f88, null_reference_ex = 0x0, 
  stack_overflow_ex = 0x0, env = 0x22e20, ldstr_table = 0x22e00, 
  type_hash = 0x22de0, refobject_hash = 0x22ca0, static_data_array = 0x63ee0, 
  type_init_exception_hash = 0x0, delegate_hash_table = 0x0, state = 1, 
  domain_id = 1, shadow_serial = 1, domain_assemblies = 0x8304098, 
  entry_assembly = 0x845f510, friendly_name = 0x835b8e8 "Secondary Domain0", 
  class_vtable_hash = 0x836da20, proxy_vtable_hash = 0x83430a0, 
  jit_code_hash = {hash_func = 0x8165aa0 <mono_aligned_addr_hash>, 
    key_extract = 0x81591f0 <jit_info_key_extract>, 
    next_value = 0x8159200 <jit_info_next_value>, size = 557, 
    num_entries = 1048, table = 0x84013c8}, dynamic_code_hash = 0x0, 
  jit_info_table = 0x846e910, search_path = 0x83fc8f0, private_bin_path = 0x0, 
  create_proxy_for_type_method = 0x0, private_invoke_method = 0x0, 
  special_static_fields = 0x836de60, jump_target_hash = 0x0, 
  class_init_trampoline_hash = 0x83431a0, jump_trampoline_hash = 0x836da40, 
  jit_trampoline_hash = 0x836daa0, delegate_trampoline_hash = 0x836de20, 
  finalizable_objects_hash = 0x836da00, assemblies_lock = {depth = 0, mutex = {
      __m_reserved = 0, __m_count = 0, __m_owner = 0x0, __m_kind = 1, 
      __m_lock = {__status = 0, __spinlock = 0}}}, shared_generics_hash = 0x0}


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