From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= Subject: bug#30107: How I got the core dump Date: Sat, 3 Feb 2018 09:36:26 +0100 Message-ID: <20180203093626.6c927477@alma-ubu> References: <87o9lxapul.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehtJp-0007A8-N5 for bug-guix@gnu.org; Sat, 03 Feb 2018 03:37:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehtJm-00056H-I6 for bug-guix@gnu.org; Sat, 03 Feb 2018 03:37:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:46993) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ehtJm-00056B-E0 for bug-guix@gnu.org; Sat, 03 Feb 2018 03:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ehtJm-0001ZQ-6g for bug-guix@gnu.org; Sat, 03 Feb 2018 03:37:02 -0500 In-Reply-To: <87o9lxapul.fsf@gmail.com> Sender: "Debbugs-submit" Resent-Message-ID: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 30107@debbugs.gnu.org On request, I'm writing here how I got to that coredump: My first step was to investigate the build.sh, and I just patched it to output the full command, stripping of the rest: diff --git a/bootstrap.sh b/bootstrap.x.sh index bc54db4..f8c0720 100755 --- a/bootstrap.sh +++ b/bootstrap.x.sh @@ -151,18 +151,7 @@ cp src/script/antRun bin chmod +x bin/antRun =20 echo ... Building Ant Distribution - -"${JAVACMD}" -classpath "${CLASSPATH}" -Dant.home=3D. $ANT_OPTS org.apache.tools.ant.Main -emacs "$@" bootstrap -ret=3D$? -if [ $ret !=3D 0 ]; then - echo ... Failed Building Ant Distribution ! - exit $ret -fi - - -echo ... Cleaning Up Build Directories - -rm -rf ${CLASSDIR} -rm -rf bin +echo I would do: +echo "${JAVACMD}" -classpath "${CLASSPATH}" -Dant.home=3D. $ANT_OPTS org.apache.tools.ant.Main -emacs "$@" bootstrap echo ... Done Bootstrapping Ant Distribution I added the patch into the package definition. As I have learned yesterday, I could just repack the sources and use guix --with-source=3Dmodified-ant.tar.gz ... Anyway, I found out it calls: /gnu/store/088bg6n5llvqn9j7d2740hhhilbqai4a-sablevm-1.13/bin/java-sablevm -classpath build/classes:src/main:lib/xercesImpl.jar:lib/xml-apis.jar: -Dant.home=3D. -Dbuild.compiler=3Djikes org.apache.tools.ant.Main -emacs -Ddist.dir=3D/gnu/store/dxdsdsj4nz7fig92b2xjb7jf7swm5rni-ant-bootstrap-1.7.1 bootstrap Next, I realized that my Ubuntu+Guix-on-top is eating up my core dumps: $> cat /proc/sys/kernel/core_pattern=20 |/usr/share/apport/apport %p %s %c %d %P So instead I went into my QEMU machine and continued there. Set ulimit to unlimited: ulimit -c unlimited In sablevm, we need to get debugging infos into it: Add to it's package definition's #arguments this one: #:strip-binaries? #f Rebuild it: ./pre-inst-env guix build -e '(@@ (gnu packages java) sablevm)' --no-grafts --no-substitutes -K > sablevm.log 2>&1 Remove your failed builds /tmp/guix-build-* directories, if you have any. Then I looped through with this little bash script: #!/bin/sh ROUNDS=3D100 for i in `seq -w 0 $ROUNDS`; do # DATE=3D${date} # echo $DATE echo -n $i.. ./pre-inst-env guix build -e '(@@ (gnu packages java) ant-bootstrap)' --no-grafts --no-substitutes --check -k -K >log-$i.log 2>&1 done; echo Then search in the logs: grep Segementation log-*.log Hopefully it finds one. Otherwise, repeat step above. Check that it not onle Segfaults,but also has a "(core dumped)" behind it. Otherwise, check your ulimit and corefile settings. The coredump is in the /tmp/guix-build-ant..-n, where n coresponds to your log-file number. Finally, exporting the stack trace: set logging on set logging file backtrace.log show logging bt info reg quit That's it. Bj=C3=B6rn