[Mono-bugs] [Bug 434457] New: mono 2.0 crashes during compile on NetBSD/amd64

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Oct 10 14:48:43 EDT 2008


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


           Summary: mono 2.0 crashes during compile on NetBSD/amd64
           Product: Mono: Compilers
           Version: 2.0
          Platform: x86-64
        OS/Version: NetBSD
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: kefren at ngnetworks.ro
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User


Description of Problem: Trying to compile mono 2.0 in NetBSD/amd64 fails around
finalizer_thread() and WaitForSingleObjectEx(). These are the last functions in
stack that are kept constant during builds (I added some debug code in between
them). Below I'll paste one of the usual crashes (in thread 2).

Also a common one is crashing in pthread_cond_wait(). In this case, adding some
tests around line 1570 in handles.c reveils that WAPI....(idx).signal_mutex is
not owned by current pthread.

All crashes happen in the same moment of compilation and are 100%
reproductible. Please note that I couldn't reproduce this on NetBSD/i386.

I'm willing to debug more / submit asked results. Thanks.

.....
gmake[7]: Leaving directory
`/disk2/work/pkgsrc/lang/mono/work/mono-2.0/mcs/class/corlib'
gmake[7]: Entering directory
`/disk2/work/pkgsrc/lang/mono/work/mono-2.0/mcs/class/System'
/usr/pkg/bin/gmake all-local
gmake[8]: Entering directory
`/disk2/work/pkgsrc/lang/mono/work/mono-2.0/mcs/class/System'
** Warning: System.dll built without parts that depend on: System.Xml.dll
Mono.Security.dll System.Configuration.dll
MONO_PATH="../../class/lib/net_2_0:../../class/lib/net_2_0_bootstrap:$MONO_PATH"
/disk2/work/pkgsrc/lang/mono/work/mono-2.0/runtime/mono-wrapper 
./../mcs/gmcs.exe /codepage:65001  -optimize -d:NET_1_1 -d:NET_2_0 -debug
/noconfig -nowarn:618 -d:CONFIGURATION_2_0 -unsafe
-resource:resources/Asterisk.wav -resource:resources/Beep.wav
-resource:resources/Exclamation.wav -resource:resources/Hand.wav
-resource:resources/Question.wav -target:library -out:System.dll 
@System.dll.sources
** Message: _wapi_handle_new: Creating new handle of type Sem
** Message: _wapi_handle_new: Allocated new handle 0x100
** Message: _wapi_handle_lock_handle: locking handle 0x100
** Message: _wapi_handle_ref: Sem handle 0x100 ref now 2
** Message: _wapi_handle_unlock_handle: unlocking handle 0x100
** Message: _wapi_handle_unref: Sem handle 0x100 ref now 1 (destroy FALSE)
** Message: _wapi_handle_new: Creating new handle of type Event
** Message: _wapi_handle_new: Allocated new handle 0x101
** Message: _wapi_handle_lock_handle: locking handle 0x101
** Message: _wapi_handle_ref: Event handle 0x101 ref now 2
** Message: _wapi_handle_unlock_handle: unlocking handle 0x101
** Message: _wapi_handle_unref: Event handle 0x101 ref now 1 (destroy FALSE)
** Message: _wapi_handle_new: Creating new handle of type Process
** Message: _wapi_handle_new: Allocated new handle 0x102
** Message: _wapi_handle_new: New shared handle at offset 0x1
** Message: _wapi_thread_handle_from_id: Returning NULL for unknown or non-self
thread 140187698987008
** Message: _wapi_handle_new: Creating new handle of type Thread
** Message: _wapi_handle_new: Allocated new handle 0x103
** Message: _wapi_handle_lock_handle: locking handle 0x103
** Message: _wapi_handle_ref: Thread handle 0x103 ref now 2
** Message: _wapi_handle_ref: Thread handle 0x103 ref now 3
** Message: thread_attach: Attached thread handle 0x103 ID 140187698987008
** Message: _wapi_handle_unlock_handle: unlocking handle 0x103
** Message: _wapi_handle_unref: Thread handle 0x103 ref now 2 (destroy FALSE)
** Message: _wapi_handle_new: Creating new handle of type Event
** Message: _wapi_handle_new: Allocated new handle 0x104
** Message: _wapi_handle_lock_handle: locking handle 0x104
** Message: _wapi_handle_ref: Event handle 0x104 ref now 2
** Message: _wapi_handle_unlock_handle: unlocking handle 0x104
** Message: _wapi_handle_unref: Event handle 0x104 ref now 1 (destroy FALSE)
** Message: _wapi_handle_new: Creating new handle of type Event
** Message: _wapi_handle_new: Allocated new handle 0x105
** Message: _wapi_handle_lock_handle: locking handle 0x105
** Message: _wapi_handle_ref: Event handle 0x105 ref now 2
** Message: _wapi_handle_unlock_handle: unlocking handle 0x105
** Message: _wapi_handle_unref: Event handle 0x105 ref now 1 (destroy FALSE)
** Message: _wapi_handle_new: Creating new handle of type Event
** Message: _wapi_handle_new: Allocated new handle 0x106
** Message: _wapi_handle_lock_handle: locking handle 0x106
** Message: _wapi_handle_ref: Event handle 0x106 ref now 2
** Message: _wapi_handle_unlock_handle: unlocking handle 0x106
** Message: _wapi_handle_unref: Event handle 0x106 ref now 1 (destroy FALSE)
** Message: _wapi_handle_new: Creating new handle of type Event
** Message: _wapi_handle_new: Allocated new handle 0x107
** Message: _wapi_handle_lock_handle: locking handle 0x107
** Message: _wapi_handle_ref: Event handle 0x107 ref now 2
** Message: _wapi_handle_unlock_handle: unlocking handle 0x107
** Message: _wapi_handle_unref: Event handle 0x107 ref now 1 (destroy FALSE)
** Message: _wapi_handle_new: Creating new handle of type Thread
** Message: _wapi_handle_new: Allocated new handle 0x108
** Message: _wapi_handle_lock_handle: locking handle 0x108
** Message: _wapi_handle_ref: Thread handle 0x108 ref now 2
** Message: _wapi_handle_ref: Thread handle 0x108 ref now 3
** Message: thread_start_routine: started thread id 140187598323712
** Message: CreateThread: Started thread handle 0x108 ID 140187598323712
** Message: _wapi_handle_unlock_handle: unlocking handle 0x108
** Message: _wapi_handle_unref: Thread handle 0x108 ref now 2 (destroy FALSE)
** Message: _wapi_thread_handle_from_id: Returning 0x103 for self thread
140187698987008 from TLS
** Message: _wapi_handle_test_capabilities: testing 0x3 against 0x1 (1)
** Message: _wapi_handle_test_capabilities: testing 0x3 against 0x8 (0)
** Message: WaitForSingleObjectEx: locking handle 0x107
** Message: _wapi_handle_lock_handle: locking handle 0x107
** Message: _wapi_handle_ref: Event handle 0x107 ref now 2
** Message: _wapi_handle_test_capabilities: testing 0x3 against 0x4 (0)
** Message: _wapi_handle_wait_signal_handle: waiting for 0x107
** Message: _wapi_handle_timedwait_signal_handle: waiting for 0x107 (type
Event)
** Message: _wapi_handle_lock_handle: locking handle 0x107
** Message: _wapi_handle_ref: Event handle 0x107 ref now 3
** Message: _wapi_handle_set_signal_state: setting state of 0x107 to TRUE
(broadcast TRUE)
** Message: _wapi_handle_unlock_handle: unlocking handle 0x107
** Message: _wapi_handle_unref: Event handle 0x107 ref now 2 (destroy FALSE)
** Message: _wapi_thread_handle_from_id: Returning 0x108 for self thread
140187598323712 from TLS
** Message: _wapi_handle_test_capabilities: testing 0x3 against 0x1 (1)
** Message: _wapi_handle_test_capabilities: testing 0x3 against 0x8 (0)
** Message: WaitForSingleObjectEx: locking handle 0x104
** Message: _wapi_handle_lock_handle: locking handle 0x104
** Message: _wapi_handle_ref: Event handle 0x104 ref now 2
** Message: _wapi_handle_test_capabilities: testing 0x3 against 0x4 (0)
** Message: _wapi_handle_wait_signal_handle: waiting for 0x104
** Message: _wapi_handle_timedwait_signal_handle: waiting for 0x104 (type
Event)
** Message: WaitForSingleObjectEx: handle 0x107 signalled
** Message: WaitForSingleObjectEx: unlocking handle 0x107
** Message: _wapi_handle_unlock_handle: unlocking handle 0x107
** Message: _wapi_handle_unref: Event handle 0x107 ref now 1 (destroy FALSE)
** Message: _wapi_handle_new_fd: Creating new handle of type Console
** Message: _wapi_handle_new_fd: Assigning new fd handle 2
** Message: _wapi_handle_new_fd: Creating new handle of type Console
** Message: _wapi_handle_new_fd: Assigning new fd handle 1
** Message: _wapi_handle_new_fd: Creating new handle of type Console
** Message: _wapi_handle_new_fd: Assigning new fd handle 0
** Message: _wapi_handle_ref: Console handle 0x1 ref now 2
** Message: _wapi_handle_ref: Console handle 0x1 ref now 3
** Message: _wapi_handle_ref: Console handle 0x0 ref now 2
Stacktrace:

  at System.Collections.Generic.EqualityComparer`1..cctor () <0xffffffff>
  at System.Collections.Generic.EqualityComparer`1..cctor () <0x001b3>
  at (wrapper static-rgctx-invoke)
System.Collections.Generic.EqualityComparer`1.static_rgctx_invoke_void ()
<0xffffffff>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>
  at System.Array.IndexOf (object[],object,int,int) <0xffffffff>
  at System.Array.IndexOf (object[],object,int,int) <0x000c4>
  at System.Collections.ArrayList.IndexOf (object,int,int) <0x00068>
  at System.Collections.ArrayList.Contains (object) <0x00021>
  at Mono.CSharp.Driver.ParseArguments (string[]) <0x00265>
  at Mono.CSharp.Driver.Create (string[]) <0x0005b>
  at Mono.CSharp.Driver.Main (string[]) <0x00085>
  at (wrapper runtime-invoke) Mono.CSharp.Driver.runtime_invoke_int_string[]
(object,intptr,intptr,intptr) <0xffffffff>
[1]   Abort trap              MONO_PATH="../.....
gmake[8]: *** [../../class/lib/net_2_0/System.dll] Error 134
gmake[8]: Leaving directory
`/disk2/work/pkgsrc/lang/mono/work/mono-2.0/mcs/class/System'
gmake[7]: *** [do-all] Error 2
gmake[7]: Leaving directory
`/disk2/work/pkgsrc/lang/mono/work/mono-2.0/mcs/class/System'
gmake[6]: *** [all-recursive] Error 1
gmake[6]: Leaving directory
`/disk2/work/pkgsrc/lang/mono/work/mono-2.0/mcs/class'
gmake[5]: *** [all-recursive] Error 1
gmake[5]: Leaving directory `/disk2/work/pkgsrc/lang/mono/work/mono-2.0/mcs'
gmake[4]: *** [profile-do--net_2_0--all] Error 2
gmake[4]: Leaving directory `/disk2/work/pkgsrc/lang/mono/work/mono-2.0/mcs'
gmake[3]: *** [profiles-do--all] Error 2
gmake[3]: Leaving directory `/disk2/work/pkgsrc/lang/mono/work/mono-2.0/mcs'
gmake[2]: *** [all-local] Error 2
gmake[2]: Leaving directory
`/disk2/work/pkgsrc/lang/mono/work/mono-2.0/runtime'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/disk2/work/pkgsrc/lang/mono/work/mono-2.0'
gmake: *** [all] Error 2
*** Error code 2

Stop.
make: stopped in /disk2/work/pkgsrc/lang/mono
*** Error code 1

Stop.
make: stopped in /disk2/work/pkgsrc/lang/mono

# gdb -c work/mono-2.0/mcs/class/System/mono.core work/mono-2.0/mono/mini/mono
#0  0x00007f7ffcf6976a in __sigaction_sigtramp () from /usr/lib/libc.so.12
(gdb) bt
#0  0x00007f7ffcf6976a in __sigaction_sigtramp () from /usr/lib/libc.so.12
#1  0x00007f7ffcfd8d88 in signal () from /usr/lib/libc.so.12
#2  0x00007f7ffcfd8705 in abort () from /usr/lib/libc.so.12
#3  0x0000000000426eeb in mono_handle_native_sigsegv (signal=<value optimized
out>, ctx=<value optimized out>)
    at mini-exceptions.c:1365
#4  0x0000000000529087 in sigint_signal_handler (_dummy=<value optimized out>,
info=<value optimized out>,
    context=0x4) at mini.c:13551
#5  0x00007f7ffdfd7640 in ?? ()
#6  0x000000023343f741 in ?? ()
#7  <signal handler called>
#8  mono_runtime_class_init_full (vtable=0x7f7ffdfd7640, raise_exception=1) at
object.c:252
#9  0x00007f7ffdfd7792 in ?? ()
#10 0x00007f7fffffba00 in ?? ()
#11 0x00000000004aa322 in mono_thread_interruption_checkpoint_request
(bypass_abort_protection=-17968)
    at threads.c:3593
#12 0x00007f7ffdfd7170 in ?? ()
#13 0x000000000079bdb0 in ?? ()
#14 0x00007f7ffdf535f0 in ?? ()
#15 0x000000000079bdb0 in ?? ()
#16 0x00007f7ffc0627a0 in ?? ()
#17 0x000000000079bdb8 in ?? ()
#18 0x000000000042867d in mono_create_jit_trampoline_in_domain
(domain=0x7f7fffffba00, method=0x7f7ff7c04980,
    add_sync_wrapper=-138259448) at mini-trampolines.c:717
#19 0x000000000052d387 in mono_resolve_patch_target (method=0x7f7ff7c33218,
domain=0x79bdb0,
    code=0x7f7ffdf535d0 "H\203ì\bIº\bTÂ÷\177\177",
patch_info=0x7f7ff7c27fd0, run_cctors=8253200) at mini.c:10669
#20 0x000000000000002b in ?? ()
#21 0x00007f7ffc0b6c00 in ?? ()
#22 0x00007f7fffffbd19 in ?? ()
#23 0x00007f7ffce2c150 in ?? ()
#24 0x00007f7ffce825f8 in ?? ()
#25 0x00007f7ffdf53a94 in ?? ()
#26 0x00007f7fffffbd19 in ?? ()
#27 0x00007f7ffce2c150 in ?? ()
#28 0x00007f7ffce829e0 in ?? ()
#29 0x00007f7ffdf539ec in ?? ()
#30 0x00007f7fffffbd19 in ?? ()
#31 0x00007f7ffce2c150 in ?? ()
#32 0x00007f7fffffbd19 in ?? ()
#33 0x00007f7ffce2c150 in ?? ()
#34 0x0000000000000000 in ?? ()
(gdb) thread 2
[Switching to thread 2 (process 226395)]#0  0x00007f7ffcfc92ca in gettimeofday
() from /usr/lib/libc.so.12
(gdb) bt
#0  0x00007f7ffcfc92ca in gettimeofday () from /usr/lib/libc.so.12
#1  0x00007f7ffcfc9272 in time () from /usr/lib/libc.so.12
#2  0x00000000004f7a90 in _wapi_handle_ref (handle=0x104) at handles.c:983
#3  0x000000000050f352 in WaitForSingleObjectEx (handle=<value optimized out>,
timeout=4294967295, alertable=0)
    at ../../mono/io-layer/handles-private.h:247
#4  0x000000000048c591 in finalizer_thread (unused=<value optimized out>) at
gc.c:908
#5  0x00000000004a9ef3 in start_wrapper (data=<value optimized out>) at
threads.c:621
#6  0x000000000050c537 in thread_start_routine (args=0x7f7ffce745a8) at
threads.c:245
#7  0x0000000000526482 in GC_start_routine (arg=<value optimized out>) at
pthread_support.c:1408
#8  0x00007f7ffd40b662 in pthread_create () from /usr/lib/libpthread.so.0
#9  0x00007f7ffcf53800 in swapcontext () from /usr/lib/libc.so.12
#10 0x00007f7ffa000000 in ?? ()
#11 0x0000000111110001 in ?? ()
#12 0x0000000033330003 in ?? ()
#13 0x0000000000000000 in ?? ()
(gdb) thread 3
[Switching to thread 3 (process 160859)]#0  0x00007f7ffcf32d9a in nanosleep ()
from /usr/lib/libc.so.12
(gdb) bt
#0  0x00007f7ffcf32d9a in nanosleep () from /usr/lib/libc.so.12
#1  0x00000000004f3a8e in collection_thread (unused=<value optimized out>) at
collection.c:34
#2  0x00007f7ffd40b662 in pthread_create () from /usr/lib/libpthread.so.0
#3  0x00007f7ffcf53800 in swapcontext () from /usr/lib/libc.so.12
#4  0x00007f7ffdfe7040 in ?? ()
#5  0x00007f7ff7c00000 in ?? ()
#6  0x00007f7ffce00000 in ?? ()
#7  0x0000000000000000 in ?? ()


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