[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30107: How I got the core dump

From: Björn Höfling
Subject: bug#30107: How I got the core dump
Date: Sat, 3 Feb 2018 09:36:26 +0100

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
 echo ... Building Ant Distribution
-"${JAVACMD}" -classpath "${CLASSPATH}" -Dant.home=. $ANT_OPTS
org.apache.tools.ant.Main -emacs "$@" bootstrap -ret=$?
-if [ $ret != 0 ]; then
-  echo ... Failed Building Ant Distribution !
-  exit $ret
-echo ... Cleaning Up Build Directories
-rm -rf ${CLASSDIR}
-rm -rf bin
+echo I would do:
+echo "${JAVACMD}" -classpath "${CLASSPATH}" -Dant.home=. $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=modified-ant.tar.gz ...

Anyway, I found out it calls:

-classpath build/classes:src/main:lib/xercesImpl.jar:lib/xml-apis.jar:
-Dant.home=. -Dbuild.compiler=jikes org.apache.tools.ant.Main -emacs

Next, I realized that my Ubuntu+Guix-on-top is eating up my core dumps:

$> cat /proc/sys/kernel/core_pattern 
|/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

Then I looped through with this little bash script:



for i in `seq -w 0 $ROUNDS`; do
#    DATE=${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


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

That's it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]