[Mono-bugs] [Bug 77787][Wis] Changed - Mono fails on Itanium-machine

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri May 19 03:20:46 EDT 2006


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 yury at serdyuk.botik.ru.

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

--- shadow/77787	2006-05-18 07:08:56.000000000 -0400
+++ shadow/77787.tmp.22896	2006-05-19 03:20:46.000000000 -0400
@@ -1679,6 +1679,380 @@
 
 ------- Additional Comments From vargaz at gmail.com  2006-05-18 07:08 -------
 Does this mean that it kinda works now, but crashes at shutdown, instead
 of at startup ? What kind of C compiler are you using (I assumed it
 was gcc) ?
 
+
+------- Additional Comments From Yury at serdyuk.botik.ru  2006-05-19 03:20 -------
+>Does this mean that it kinda works now, but crashes at shutdown,
+>instead of at startup ?
+No. At another example the situation is the same:
+
+gramuser2 at n000.c03.icyb:fib# which mono
+~/m-1.1.14_NOOPT/bin/mono
+gramuser2 at n000.c03.icyb:fib# mono fib.exe 3
+
+** ERROR **: file gc.c: line 137 (object_register_finalizer):
+assertion failed: (GC_base (obj) == (char*)obj - offset)
+aborting...
+Aborted
+
+But, again, from the one side:
+
+(gdb) r /home/users/gramuser2/mcsharp/examples/bin/fib.exe 33
+Starting program: /home/users/gramuser2/m-1.1.14_NOOPT/bin/mono
+/home/users/gramuser2/mcsharp/examples/bin/fib.exe 33
+[Thread debugging using libthread_db enabled]
+[New Thread 2305843009219573216 (LWP 10746)]
+
+** ERROR **: file gc.c: line 137 (object_register_finalizer):
+assertion failed: (GC_base (obj) == (char*)obj - offset)
+aborting...
+
+Program received signal SIGABRT, Aborted.
+[Switching to Thread 2305843009219573216 (LWP 10746)]
+<signal handler called>
+(gdb) b mono_context_init
+Breakpoint 1 at 0x40000000001f2872: file appdomain.c, line 179.
+(gdb) r
+The program being debugged has been started already.
+Start it from the beginning? (y or n) y
+
+Starting program: /home/users/gramuser2/m-1.1.14_NOOPT/bin/mono
+/home/users/gramuser2/mcsharp/examples/bin/fib.exe 33
+[Thread debugging using libthread_db enabled]
+[New Thread 2305843009219573216 (LWP 11722)]
+[Switching to Thread 2305843009219573216 (LWP 11722)]
+
+Breakpoint 1, mono_context_init (domain=0x600000000009fe30) at
+appdomain.c:179
+179             class = mono_class_from_name (mono_defaults.corlib,
+"System.Runtime.Remoting.Contexts", "Context");
+(gdb) b object_register_finalizer
+Breakpoint 2 at 0x4000000000186172: file gc.c, line 133.
+(gdb) r
+The program being debugged has been started already.
+Start it from the beginning? (y or n) y
+
+Starting program: /home/users/gramuser2/m-1.1.14_NOOPT/bin/mono
+/home/users/gramuser2/mcsharp/examples/bin/fib.exe 33
+[Thread debugging using libthread_db enabled]
+[New Thread 2305843009219573216 (LWP 12275)]
+[Switching to Thread 2305843009219573216 (LWP 12275)]
+
+Breakpoint 2, object_register_finalizer (obj=0x600000000009fcc0,
+    callback=@0x40000000004e1d60: 0x4000000000185cd0 <run_finalize>)
+at gc.c:133
+133             guint offset = 0;
+(gdb) display GC_is_initialized
+1: GC_is_initialized = 1
+(gdb) b GC_base
+Breakpoint 3 at 0x4000000000308cd0: file misc.c, line 395.
+(gdb) r
+The program being debugged has been started already.
+Start it from the beginning? (y or n) y
+
+Starting program: /home/users/gramuser2/m-1.1.14_NOOPT/bin/mono
+/home/users/gramuser2/mcsharp/examples/bin/fib.exe 33
+[Thread debugging using libthread_db enabled]
+[New Thread 2305843009219573216 (LWP 13596)]
+[Switching to Thread 2305843009219573216 (LWP 13596)]
+
+Breakpoint 3, GC_base (p=<value optimized out>) at misc.c:395
+395         r = (word)p;
+1: GC_is_initialized = 0
+(gdb) n
+398         GET_BI(r, bi);
+1: GC_is_initialized = 0
+(gdb) l
+393         register word limit;
+394
+395         r = (word)p;
+396         if (!GC_is_initialized) return 0;
+397         h = HBLKPTR(r);
+398         GET_BI(r, bi);
+399         candidate_hdr = HDR_FROM_BI(bi, r);
+400         if (candidate_hdr == 0) return(0);
+401         /* If it's a pointer to the middle of a large object, move
+it       */
+402         /* to the beginning.                                     
+          */
+(gdb) n
+396         if (!GC_is_initialized) return 0;
+1: GC_is_initialized = 0
+(gdb) n
+397         h = HBLKPTR(r);
+1: GC_is_initialized = 0
+(gdb) n
+396         if (!GC_is_initialized) return 0;
+1: GC_is_initialized = 0
+(gdb) n
+424                     return(0);
+1: GC_is_initialized = 0
+(gdb) n
+429     }
+1: GC_is_initialized = 0
+(gdb) q
+The program is running.  Exit anyway? (y or n) y
+
+And from the other side:
+
+(gdb) r /home/users/gramuser2/mcsharp/examples/fib/fib.exe 3
+Starting program: /home/users/gramuser2/m-1.1.14_NOOPT/bin/mono
+/home/users/gramuser2/mcsharp/examples/fib/fib.exe 3
+[Thread debugging using libthread_db enabled]
+[New Thread 2305843009219573216 (LWP 31538)]
+
+** ERROR **: file gc.c: line 137 (object_register_finalizer):
+assertion failed: (GC_base (obj) == (char*)obj - offset)
+aborting...
+
+Program received signal SIGABRT, Aborted.
+[Switching to Thread 2305843009219573216 (LWP 31538)]
+<signal handler called>
+(gdb) b mono_context_init
+Breakpoint 1 at 0x40000000001f2872: file appdomain.c, line 179.
+(gdb) r
+The program being debugged has been started already.
+Start it from the beginning? (y or n) y
+
+Starting program: /home/users/gramuser2/m-1.1.14_NOOPT/bin/mono
+/home/users/gramuser2/mcsharp/examples/fib/fib.exe 3
+[Thread debugging using libthread_db enabled]
+[New Thread 2305843009219573216 (LWP 32239)]
+[Switching to Thread 2305843009219573216 (LWP 32239)]
+
+Breakpoint 1, mono_context_init (domain=0x600000000009fe30) at
+appdomain.c:179
+179             class = mono_class_from_name (mono_defaults.corlib,
+"System.Runtime.Remoting.Contexts", "Context");
+(gdb) b object_register_finalizer
+Breakpoint 2 at 0x4000000000186172: file gc.c, line 133.
+(gdb) r
+The program being debugged has been started already.
+Start it from the beginning? (y or n) y
+
+Starting program: /home/users/gramuser2/m-1.1.14_NOOPT/bin/mono
+/home/users/gramuser2/mcsharp/examples/fib/fib.exe 3
+[Thread debugging using libthread_db enabled]
+[New Thread 2305843009219573216 (LWP 826)]
+[Switching to Thread 2305843009219573216 (LWP 826)]
+
+Breakpoint 2, object_register_finalizer (obj=0x600000000009fcc0,
+    callback=@0x40000000004e1d60: 0x4000000000185cd0 <run_finalize>)
+at gc.c:133
+133             guint offset = 0;
+(gdb) dissplay GC_is_initialized
+Undefined command: "dissplay".  Try "help".
+(gdb) display GC_is_initialized
+1: GC_is_initialized = 1
+(gdb) n
+137             g_assert (GC_base (obj) == (char*)obj - offset);
+1: GC_is_initialized = 1
+(gdb) n
+140             if (mono_domain_is_unloading (obj->vtable->domain) &&
+(callback != NULL))
+1: GC_is_initialized = 1
+(gdb) n
+147             mono_domain_lock (obj->vtable->domain);
+1: GC_is_initialized = 1
+(gdb) n
+149             if (callback)
+1: GC_is_initialized = 1
+(gdb) n
+150                     g_hash_table_insert
+(obj->vtable->domain->finalizable_objects_hash, obj,
+1: GC_is_initialized = 1
+(gdb) n
+155             mono_domain_unlock (obj->vtable->domain);
+1: GC_is_initialized = 1
+(gdb) n
+157             GC_REGISTER_FINALIZER_NO_ORDER ((char*)obj - offset,
+callback, GUINT_TO_POINTER (offset), NULL, NULL);
+1: GC_is_initialized = 1
+(gdb) n
+159     }
+1: GC_is_initialized = 1
+(gdb) n
+object_register_finalizer (obj=0x600000000009fcc0,
+    callback=@0x40000000004e1d60: 0x4000000000185cd0 <run_finalize>)
+at gc.c:159
+159     }
+1: GC_is_initialized = 1
+(gdb) n
+mono_object_register_finalizer (obj=0x600000000009fcc0) at gc.c:173
+173             object_register_finalizer (obj, run_finalize);
+1: GC_is_initialized = 1
+(gdb) n
+174     }
+1: GC_is_initialized = 1
+(gdb) n
+mono_object_register_finalizer (obj=0x600000000009fcc0) at gc.c:174
+174     }
+1: GC_is_initialized = 1
+(gdb) n
+mono_object_new_alloc_specific (vtable=0x6000000000038e90) at
+object.c:2400
+2400                    mono_object_register_finalizer (o);
+1: GC_is_initialized = 1
+(gdb) n
+2402            mono_profiler_allocation (o, vtable->klass);
+1: GC_is_initialized = 1
+(gdb) n
+2403            return o;
+1: GC_is_initialized = 1
+(gdb) n
+2404    }
+1: GC_is_initialized = 1
+(gdb) n
+mono_object_new_alloc_specific (vtable=0x6000000000038e90) at
+object.c:2404
+2404    }
+1: GC_is_initialized = 1
+(gdb) n
+mono_object_new_specific (vtable=0x6000000000038e90) at object.c:2383
+2383            return mono_object_new_alloc_specific (vtable);
+1: GC_is_initialized = 1
+(gdb) n
+2384    }
+1: GC_is_initialized = 1
+(gdb) n
+mono_object_new_specific (vtable=0x6000000000038e90) at object.c:2384
+2384    }
+1: GC_is_initialized = 1
+(gdb) n
+mono_object_new (domain=0x600000000009fe30, klass=0x60000000000b95a0)
+at object.c:2344
+2344            return mono_object_new_specific (mono_class_vtable
+(domain, klass));
+1: GC_is_initialized = 1
+(gdb) n
+2345    }
+1: GC_is_initialized = 1
+(gdb) n
+mono_object_new (domain=0x600000000009fe30, klass=0x60000000000b95a0)
+at object.c:2345
+2345    }
+1: GC_is_initialized = 1
+(gdb) n
+mono_thread_attach (domain=0x600000000009fe30) at threads.c:412
+412             thread = (MonoThread *)mono_object_new (domain,
+1: GC_is_initialized = 1
+(gdb) n
+415             thread_handle = GetCurrentThread ();
+1: GC_is_initialized = 1
+(gdb) n
+416             g_assert (thread_handle);
+1: GC_is_initialized = 1
+(gdb) n
+418             tid=GetCurrentThreadId ();
+1: GC_is_initialized = 1
+(gdb) n
+429             thread->handle=thread_handle;
+1: GC_is_initialized = 1
+(gdb) n
+430             thread->tid=tid;
+1: GC_is_initialized = 1
+(gdb) n
+431             MONO_OBJECT_SETREF (thread, synch_lock,
+mono_object_new (domain, mono_defaults.object_class));
+1: GC_is_initialized = 1
+(gdb) n
+435             handle_store(thread);
+1: GC_is_initialized = 1
+(gdb) n
+439             SET_CURRENT_OBJECT (thread);
+1: GC_is_initialized = 1
+(gdb) n
+440             mono_domain_set (domain, TRUE);
+1: GC_is_initialized = 1
+(gdb) n
+442             thread_adjust_static_data (thread);
+1: GC_is_initialized = 1
+(gdb) n
+444             if (mono_thread_attach_cb) {
+1: GC_is_initialized = 1
+(gdb) n
+445                     mono_thread_attach_cb (tid, &tid);
+1: GC_is_initialized = 1
+(gdb) n
+448             return(thread);
+1: GC_is_initialized = 1
+(gdb) n
+449     }
+1: GC_is_initialized = 1
+(gdb) n
+mono_thread_attach (domain=0x600000000009fe30) at threads.c:449
+449     }
+1: GC_is_initialized = 1
+(gdb) n
+mono_runtime_init (domain=0x600000000009fe30,
+    start_cb=@0x40000000004df420: 0x400000000037b4c0
+<mono_thread_start_cb>,
+    attach_cb=@0x40000000004e10b0: 0x400000000037b6c0
+<mono_thread_attach_cb>)
+    at appdomain.c:112
+112             mono_thread_attach (domain);
+1: GC_is_initialized = 1
+(gdb) n
+113             mono_context_init (domain);
+1: GC_is_initialized = 1
+(gdb) n
+
+Breakpoint 1, mono_context_init (domain=0x600000000009fe30) at
+appdomain.c:179
+179             class = mono_class_from_name (mono_defaults.corlib,
+"System.Runtime.Remoting.Contexts", "Context");
+1: GC_is_initialized = 1
+(gdb) n
+180             context = (MonoAppContext *) mono_object_new (domain,
+class);
+1: GC_is_initialized = 1
+(gdb) n
+
+Breakpoint 2, object_register_finalizer (obj=0x600000000011cf80,
+    callback=@0x40000000004e1d60: 0x4000000000185cd0 <run_finalize>)
+at gc.c:133
+133             guint offset = 0;
+1: GC_is_initialized = 1
+(gdb) n
+137             g_assert (GC_base (obj) == (char*)obj - offset);
+1: GC_is_initialized = 1
+(gdb) n
+
+** ERROR **: file gc.c: line 137 (object_register_finalizer):
+assertion failed: (GC_base (obj) == (char*)obj - offset)
+aborting...
+
+Program received signal SIGABRT, Aborted.
+<signal handler called>
+1: GC_is_initialized = 1
+(gdb)
+
+that is very strange, because 
+I definitely have set before configure
+CFLAGS="-O0" and
+CXXFLAGS="-O0"
+and then make and make install.
+
+As before, under Mono without noopt we have
+gramuser2 at n000.c03.icyb:~# mcs --about
+
+** ERROR **: file gc.c: line 137 (object_register_finalizer):
+assertion failed: (GC_base (obj) == (char*)obj - offset)
+aborting...
+Aborted
+gramuser2 at n000.c03.icyb:~# which mono
+~/m-1.1.14/bin/mono
+gramuser2 at n000.c03.icyb:~#
+(confer with my message from 05-18-2006).
+
+> What kind of C compiler are you using (I assumed it
+> was gcc) ?
+Yes, it was gcc:
+[gramuser2 at n022 ~]$ gcc -dumpmachine
+ia64-redhat-linux
+[gramuser2 at n022 ~]$ gcc -dumpversion
+3.4.4
+[gramuser2 at n022 ~]$
+


More information about the mono-bugs mailing list