mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Michal Nowak <mnowak@isc.org>
To: musl@lists.openwall.com
Subject: Re: [musl] Better backtrace from core dump
Date: Tue, 23 Jun 2020 15:03:10 +0200	[thread overview]
Message-ID: <ca5d2f37-c73b-abfa-354e-45f3a871021d@isc.org> (raw)
In-Reply-To: <CABTJ_OeeNzBE32knsSDFRagyiP7APp0AeHdUMO6GcxG0Lo_gRA@mail.gmail.com>

Thanks Timo, this worked for me.

Michal

On 23/06/2020 14:12, Timo Teräs wrote:
> Hi
> 
> Install musl-dbg package to get the debug symbols.
> 
> Timo
> 
> On Tue, 23 Jun 2020, 14.43 Michal Nowak, <mnowak@isc.org 
> <mailto:mnowak@isc.org>> wrote:
> 
>     Hi,
> 
>     in GitLab we have jobs which run BIND system tests on different
>     operating system, mostly in Docker on Debian 10 but too in KVM virtual
>     machines for non-Linux operating systems. If the test produces core
>     dump, we generate backtrace out of it while still in the CI.
> 
>     For all C libraries but for musl we get reasonable backtraces, e.g.
>     https://gitlab.isc.org/isc-projects/bind9/-/jobs/970585, but for Alpine
>     Linux 3.11 (musl 1.1.24-r2 & GCC 9.2.0-r4) we get something like this
>     (https://gitlab.isc.org/isc-projects/bind9/-/jobs/970568):
> 
>     warning: Can't read pathname for load map: No error information.
>     Core was generated by
>     `/builds/isc-projects/bind9/bin/named/.libs/lt-named -D statistics-ns3
>     -X named.'.
>     Program terminated with signal SIGABRT, Aborted.
>     #0  0x00007fb708ec39ee in setjmp () from /lib/ld-musl-x86_64.so.1
>     [Current thread is 1 (LWP 1274)]
>     #0  0x00007fb708ec39ee in setjmp () from /lib/ld-musl-x86_64.so.1
>     #1  0x00007fb708ec3b49 in raise () from /lib/ld-musl-x86_64.so.1
>     #2  0x804ad6685d596f46 in ?? ()
>     #3  0x00007fb708bd1030 in ns_modules () from
>     /builds/isc-projects/bind9/lib/ns/.libs/libns.so.1702
>     #4  0x00007fb708e59edf in ?? () from
>     /builds/isc-projects/bind9/lib/isc/.libs/libisc.so.1702
>     #5  0x0000000042756621 in ?? ()
>     #6  0x00007fb7069c9db0 in ?? ()
>     #7  0x0000001800000018 in ?? ()
>     #8  0x00007fb708f0e873 in ?? () from /lib/ld-musl-x86_64.so.1
>     #9  0x0000000000000008 in ?? ()
>     #10 0x00007fb7069ca0e8 in ?? ()
>     #11 0x00007fb7069ca0d0 in ?? ()
>     #12 0x00007fb708e32d12 in isc_hash_function (data=0x459, length=0,
>     case_sensitive=<optimized out>) at hash.c:117
> 
>     This is how we generate the backtrace:
> 
>         "${top_builddir}/libtool" --mode=execute gdb --batch
>     --command=run.gdb --core="$coredump" -- "$binary"
> 
>     The GDB command can be either 'bt' or 'thread apply all bt full' (for
>     more on the GDB invocation, see
>     https://gitlab.isc.org/isc-projects/bind9/-/blob/main/bin/tests/system/run.sh.in#L268).
> 
>     CFLAGS used:
> 
>         -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall
>     -Wextra
> 
>     This is what we install on top of the stock Alpine Linux 3.11 Docker
>     image:
>     https://gitlab.isc.org/isc-projects/images/-/blob/main/docker/bind9/alpine-template/Dockerfile.
> 
>     Are there other packages, we should get into the image to get better
>     backtraces?
> 
>     Should we use something else than GDB?
> 
>     Should we add some compiler flags?
> 
>     Thanks,
>     Michal
> 


      reply	other threads:[~2020-06-23 13:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23 11:43 Michal Nowak
2020-06-23 12:12 ` Timo Teräs
2020-06-23 13:03   ` Michal Nowak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca5d2f37-c73b-abfa-354e-45f3a871021d@isc.org \
    --to=mnowak@isc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).