Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jun 2015 18:19:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        mono@FreeBSD.org
Subject:   maintainer-feedback requested: [Bug 200937] lang/mono: [patch] mono-sgen SIGSEGV during build
Message-ID:  <bug-200937-23699-Igw0DLvWlw@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-200937-23699@https.bugs.freebsd.org/bugzilla/>
References:  <bug-200937-23699@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
Thomas Hurst <tom@hur.st> has reassigned Bugzilla Automation
<bugzilla@FreeBSD.org>'s request for maintainer-feedback to mono@FreeBSD.or=
g:
Bug 200937: lang/mono: [patch] mono-sgen SIGSEGV during build
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D200937



--- Description ---
Created attachment 157839
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D157839&action=
=3Dedit
Patch: increase _WAPI_PRIVATE_MAX_SLOTS

System: FreeBSD 10.1-STABLE #0 r283969: Wed Jun  3 22:59:38 BST 2015

Dual hex-core Westmere Xeon, 155GB RAM.

For a while now lang/mono's been segfaulting during build:

------------------------------------------------------------------------
Making all in runtime
gmake[3]: Entering directory
'/usr/obj/usr/ports/lang/mono/work/mono-4.0.1/runtime'
if test -w /usr/obj/usr/ports/lang/mono/work/mono-4.0.1/mcs; then :; else c=
hmod
-R +w /usr/obj/usr/ports/lang/mono/work/mono-4.0.1/mcs; fi
cd /usr/obj/usr/ports/lang/mono/work/mono-4.0.1/mcs && gmake
--no-print-directory -s NO_DIR_CHECK=3D1 PROFILES=3D'binary_reference_assem=
blies
net_4_5 xbuild_12 xbuild_14   ' CC=3D'cc' all-profiles
gmake[7]: mcs: Command not found
build/profiles/basic.make:93: recipe for target
'build/deps/basic-profile-check.exe' failed
gmake[7]: *** [build/deps/basic-profile-check.exe] Error 127
*** The compiler 'mcs' doesn't appear to be usable.
*** Trying the 'monolite' directory.

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

build/profiles/basic.make:93: recipe for target
'build/deps/basic-profile-check.exe' failed
gmake[9]: *** [build/deps/basic-profile-check.exe] Abort trap (core dumped)
*** The contents of your 'monolite' directory may be out-of-date
*** You may want to try 'make get-monolite-latest'
build/profiles/basic.make:77: recipe for target 'do-profile-check-monolite'
failed
gmake[9]: *** [do-profile-check-monolite] Error 1
build/profiles/basic.make:60: recipe for target 'do-profile-check' failed
gmake[8]: *** [do-profile-check] Error 2
build/profiles/basic.make:85: recipe for target 'do-profile-check-monolite'
failed
gmake[7]: *** [do-profile-check-monolite] Error 2
build/profiles/basic.make:60: recipe for target 'do-profile-check' failed
gmake[6]: *** [do-profile-check] Error 2
Makefile:44: recipe for target 'profile-do--basic--all' failed
gmake[5]: *** [profile-do--basic--all] Error 2
Makefile:40: recipe for target 'profiles-do--all' failed
gmake[4]: *** [profiles-do--all] Error 2
Makefile:555: recipe for target 'all-local' failed
gmake[3]: *** [all-local] Error 2
gmake[3]: Leaving directory
'/usr/obj/usr/ports/lang/mono/work/mono-4.0.1/runtime'
Makefile:522: recipe for target 'all-recursive' failed
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory '/usr/obj/usr/ports/lang/mono/work/mono-4.0.1'
Makefile:449: recipe for target 'all' failed
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory '/usr/obj/usr/ports/lang/mono/work/mono-4.0.1'
*** Error code 1
------------------------------------------------------------------------

I can't reproduce it on a 24GB 10.1-RELEASE system.  I'm guessing it's a
high-memory/tuning issue.

mono-sgen.core reveals the following backtrace:

#0  0x00000008012eacaa in thr_kill () from /lib/libc.so.7
#1  0x00000008012eac16 in raise () from /lib/libc.so.7
#2  0x00000008012e9409 in abort () from /lib/libc.so.7
#3  0x00000000004b1903 in mono_handle_native_sigsegv (signal=3D<value optim=
ized
out>, ctx=3D<value optimized out>,
    info=3D<value optimized out>) at mini-exceptions.c:2386
#4  0x000000000041eeac in mono_sigsegv_signal_handler (_dummy=3D11,
_info=3D0x7fffffffd2b0, context=3D0x7fffffffcf40) at mini.c:6771
#5  0x0000000800f8f997 in pthread_sigmask () from /lib/libthr.so.3
#6  0x0000000800f8f1a8 in pthread_getspecific () from /lib/libthr.so.3
#7  <signal handler called>
#8  0x0000000000607f83 in wapi_init () at handles.c:278
#9  0x00000000005a41d5 in mono_init_internal (filename=3D0x7fffffffdb82
".//class/lib/monolite/basic.exe",
    exe_filename=3D0x7fffffffdb82 ".//class/lib/monolite/basic.exe",
runtime_version=3D0x0) at domain.c:504
#10 0x000000000041f846 in mini_init (filename=3D<value optimized out>,
runtime_version=3D<value optimized out>) at mini.c:7404
#11 0x0000000000484b4c in mono_main (argc=3D8, argv=3D0x7fffffffd628) at
driver.c:1921
#12 0x000000000041600f in _start ()


Turns out this line in mono/io-layer/handles.c immediately before the segfa=
ult
is failing, returning -1:

    _wapi_global_signal_handle =3D _wapi_handle_new (WAPI_HANDLE_EVENT, NUL=
L);

Drilling down, I see the array's running out of slots, as defined in
mono/io-layer/handles-private.h:25

    #define _WAPI_PRIVATE_MAX_SLOTS	    (1024 * 16)

Increasing this to 1024 * 17 fixes the build.  Patch to drop into files/
attached.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-200937-23699-Igw0DLvWlw>