From owner-freebsd-mono@freebsd.org Wed Jan 25 06:27:46 2017 Return-Path: Delivered-To: freebsd-mono@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0615ECBE6F6 for ; Wed, 25 Jan 2017 06:27:46 +0000 (UTC) (envelope-from pmichel@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id DA1C7689 for ; Wed, 25 Jan 2017 06:27:45 +0000 (UTC) (envelope-from pmichel@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id D972CCBE6F5; Wed, 25 Jan 2017 06:27:45 +0000 (UTC) Delivered-To: mono@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D90DFCBE6F4 for ; Wed, 25 Jan 2017 06:27:45 +0000 (UTC) (envelope-from pmichel@gmail.com) Received: from mail-yw0-x231.google.com (mail-yw0-x231.google.com [IPv6:2607:f8b0:4002:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 989A0688; Wed, 25 Jan 2017 06:27:45 +0000 (UTC) (envelope-from pmichel@gmail.com) Received: by mail-yw0-x231.google.com with SMTP id l19so179771635ywc.2; Tue, 24 Jan 2017 22:27:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NE4kPRx1RboOFQtkDBO7mNzTAX+iU2MFIzEV0ejjYKM=; b=hgBp1OEAzBU0NqPvwhVfD1gnIcULtEZoJ5cQfgAhmNctKO5IkzSm+ekS96ieC5lVDL nQrbMVN2HwRYDxxOKFAT2EIiLxgL33zhzCsxxbn24v27iREGae6K+P05S/+REEsI19wh KGBqrzZxQbNYoezHEaLXgoLVgZZ91KJPdOYMCZdVvg1PsHLrkpgPAY8Vq/9qyiZQYISN LevyV4iHmp/VKacBL37qeEc9kIA+7BsVo6eqX+doDuppqTMbG9XoklL88QjT+1Ts/0bg H8K/26QnH+G6KVPF46RxhdYpbtQ/aByGOHbBOJkJdbiNw3/CRed/TqRoo2RKUbLcrptA n4fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NE4kPRx1RboOFQtkDBO7mNzTAX+iU2MFIzEV0ejjYKM=; b=JkFxBkE6PqMW/CnWS2QbgQox/xqMj8IgPZqLXyKncnW4qBK1SguAkXh5vtWe5+sTw0 m4A4sdWFjs5WvgXAOceuwcRtFZJmnvb1muQbOjR/e1FCN9+gUOADMVxsocULH0KquGg5 e2dci1D+1eIQZB2Y4fDVgxoWIeDqITWaUfT1v1zP0ulLCLkPqtrd/g1q8XDajQERGQ65 namUi1s2wvWPP0P5K+l3nbfjh61z81LeQbrjRJtqzk194QUGOYB4Lnk0LOhSVeDXBZ+u OWBKMdjF1X+j4kfsP6BeEJqlYhGTYB4X2HAzyHuA1GGMvc8Unf0+ilBwHFF3gfNzLcTq iGUQ== X-Gm-Message-State: AIkVDXL7X9aJFv51f56pon+QKzXN2xxvTX7LmAn2FChNQY6/PWBgZHQx4Y702PrGGikdINXDilpLqE8CFaYY8A== X-Received: by 10.129.122.200 with SMTP id v191mr30503340ywc.114.1485325664487; Tue, 24 Jan 2017 22:27:44 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Philipp Michel Date: Wed, 25 Jan 2017 06:27:34 +0000 Message-ID: Subject: Re: SIGSEGV crash on SMP Xeon E5, can't build from ports To: mono@freebsd.org Cc: romain@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-mono@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mono and C# applications on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2017 06:27:46 -0000 After some more playing around trying to run mono both on bare metal and a VM, I've narrowed it down to what seems to be a memory issue. I have 256G of ram in the server. If I restrict hw.physmem=140G, mono works fine. Anything above hw.physmem=150G or so seems to cause it to crash! Changing the cpu count or cpu type (in the VM) has no impact. Seems like something's off when there's too much memory available... Any thoughts? On Mon, Jan 23, 2017 at 8:50 PM Philipp Michel wrote: > Hi there, > > > I've been a longtime user of mono on FreeBSD without issues. I usually > just install the pkg. > > I recently upgraded my machine from a Haswell E3 to a dual-socket Sandy > Bridge E5 and now mono instantly crashes with the SIGSEGV error: > > ================================================================= > 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. > ================================================================= > > I've tried to build mono from ports using the debug symbols but even the > build process fails when it tries to call mcs resulting in the same SIGSEGV > crash. I'm attaching the output below. > > I think it is related to this bug: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211367 > > There are reports of several people still having this issue, seemingly all > on multiprocessor machines. > > Any idea what this could be? I'm at my wits end, all I can think of now is > to run mono in a bhyve VM to get around this, which makes me a bit sad... > > Thanks so much in advance for your help! > > -Phil > > > -------------------------------------- > echo '#! /bin/sh' > _tmpinst/bin/ilasm ; \ > r=`pwd`; m=`cd /var/ports/basejail/usr/ports/lang/mono/work/mono-4.6.2/mcs > && pwd`; \ > echo 'exec "'"$r/_tmpinst/bin/mono"'" "'"$m/ilasm/ilasm.exe"'" "$@"' >> > _tmpinst/bin/ilasm ; \ > chmod +x _tmpinst/bin/ilasm > echo '#! /bin/sh' > _tmpinst/bin/mcs ; \ > r=`pwd`; m=`cd /var/ports/basejail/usr/ports/lang/mono/work/mono-4.6.2/mcs > && pwd`; \ > echo 'exec "'"$r/_tmpinst/bin/mono"'" "'"$m/class/lib/build/mcs.exe"'" > "$@"' >> _tmpinst/bin/mcs ; \ > chmod +x _tmpinst/bin/mcs > echo '#! /bin/sh' > _tmpinst/bin/al ; \ > r=`pwd`; m=`cd /var/ports/basejail/usr/ports/lang/mono/work/mono-4.6.2/mcs > && pwd`; \ > echo 'exec "'"$r/_tmpinst/bin/mono"'" "'"$m/class/lib/net_4_x/al.exe"'" > "$@"' >> _tmpinst/bin/al ; \ > chmod +x _tmpinst/bin/al > if test -w /var/ports/basejail/usr/ports/lang/mono/work/mono-4.6.2/mcs; > then :; else chmod -R +w > /var/ports/basejail/usr/ports/lang/mono/work/mono-4.6.2/mcs; fi > cd /var/ports/basejail/usr/ports/lang/mono/work/mono-4.6.2/mcs && gmake > --no-print-directory -s NO_DIR_CHECK=1 > PROFILES='binary_reference_assemblies net_4_x xbuild_12 xbuild_14 ' > CC='cc' all-profiles > mkdir -p -- build/deps > gmake[7]: mcs: Command not found > gmake[7]: *** [build/profiles/basic.make:93: > build/deps/basic-profile-check.exe] Error 127 > *** The compiler 'mcs' doesn't appear to be usable. > *** Trying the 'monolite' directory. > > ================================================================= > 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. > ================================================================= > > gmake[9]: *** [build/profiles/basic.make:93: > 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' > gmake[9]: *** [build/profiles/basic.make:80: do-profile-check-monolite] > Error 1 > gmake[8]: *** [build/profiles/basic.make:60: do-profile-check] Error 2 > gmake[7]: *** [build/profiles/basic.make:88: do-profile-check-monolite] > Error 2 > gmake[6]: *** [build/profiles/basic.make:60: do-profile-check] Error 2 > gmake[5]: *** [Makefile:49: profile-do--basic--all] Error 2 > gmake[4]: *** [Makefile:45: profiles-do--all] Error 2 > gmake[3]: *** [Makefile:543: all-local] Error 2 > gmake[3]: Leaving directory > '/var/ports/basejail/usr/ports/lang/mono/work/mono-4.6.2/runtime' > gmake[2]: *** [Makefile:512: all-recursive] Error 1 > gmake[2]: Leaving directory > '/var/ports/basejail/usr/ports/lang/mono/work/mono-4.6.2' > gmake[1]: *** [Makefile:441: all] Error 2 > gmake[1]: Leaving directory > '/var/ports/basejail/usr/ports/lang/mono/work/mono-4.6.2' > ===> Compilation failed unexpectedly. > Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to > the maintainer. > *** Error code 1 > > Stop. > > ----------------------------------------------------------------- >