Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jan 2021 02:57:50 +0300
From:      Lev Serebryakov <lev@FreeBSD.org>
To:        freebsd-stable@freebsd.org, FreeBSD Hackers <freebsd-hackers@FreeBSD.org>
Subject:   `clang -pg` generates binary which coredumps on start
Message-ID:  <61cebbd1-4e8d-d9d7-dda2-388e81e61599@FreeBSD.org>

next in thread | raw e-mail | index | archive | help

  I'm trying to profile my user-level program on FreeBSD 12-STABLE (amd64). When I build it with `cc -g -pg -O3` it coredumps on start. What do I do wrong?

(lldb) bt
* thread #1, name = 'mergenets', stop reason = signal SIGSEGV
   * frame #0: 0x0000000000000000
     frame #1: 0x000000000028ebbf mergenets`__vdso_gettc(th=0x00007ffffffff270, tc=0x00007fffffffddbc) at __vdso_gettc.c:0
     frame #2: 0x000000000028e8c3 mergenets`binuptime [inlined] tc_delta(th=<unavailable>) at __vdso_gettimeofday.c:46:10
     frame #3: 0x000000000028e8ba mergenets`binuptime(bt=0x00007fffffffde08, tk=0x00007ffffffff1b0, abs=0) at __vdso_gettimeofday.c:78
     frame #4: 0x000000000028ea73 mergenets`__vdso_clock_gettime(clock_id=4, ts=0x00007fffffffde68) at __vdso_gettimeofday.c:165:10
     frame #5: 0x0000000000281efb mergenets`__clock_gettime(clock_id=4, ts=0x00007fffffffde68) at clock_gettime.c:48:11
     frame #6: 0x000000000024339f mergenets`nstime_update_impl [inlined] nstime_get(time=0x0000000800403a88) at jemalloc_nstime.c:128:2
     frame #7: 0x0000000000243395 mergenets`nstime_update_impl(time=0x0000000800403a88) at jemalloc_nstime.c:160
     frame #8: 0x0000000000234b6d mergenets`__je_arena_new [inlined] arena_decay_reinit(decay=0x0000000800403a20, decay_ms=<unavailable>) at jemalloc_arena.c:572:2
     frame #9: 0x0000000000234b21 mergenets`__je_arena_new [inlined] arena_decay_init(decay=0x0000000800403a20, decay_ms=<unavailable>, stats=0x00000008004009a0) at jemalloc_arena.c:593
     frame #10: 0x0000000000234b1a mergenets`__je_arena_new(tsdn=0x0000000000000000, ind=0, extent_hooks=<unavailable>) at jemalloc_arena.c:1858
     frame #11: 0x00000000002239c0 mergenets`__je_arena_init [inlined] arena_init_locked(tsdn=0x0000000000000000, ind=0, extent_hooks=0x0000000000205778) at jemalloc_jemalloc.c:338:10
     frame #12: 0x00000000002239b2 mergenets`__je_arena_init(tsdn=0x0000000000000000, ind=0, extent_hooks=0x0000000000205778) at jemalloc_jemalloc.c:366
     frame #13: 0x000000000022f946 mergenets`malloc_init_hard_a0_locked at jemalloc_jemalloc.c:1328:6
     frame #14: 0x0000000000222cf5 mergenets`a0ialloc [inlined] malloc_init_hard_a0 at jemalloc_jemalloc.c:1343:8
     frame #15: 0x0000000000222caa mergenets`a0ialloc [inlined] malloc_init_a0 at jemalloc_jemalloc.c:214
     frame #16: 0x0000000000222caa mergenets`a0ialloc(size=6223, zero=false, is_internal=false) at jemalloc_jemalloc.c:234
     frame #17: 0x00000000002225fc mergenets`__libc_allocate_tls [inlined] malloc_aligned(size=6200, align=16) at tls.c:135:8
     frame #18: 0x00000000002225e2 mergenets`__libc_allocate_tls(oldtls=0x0000000000000000, tcbsize=<unavailable>, tcbalign=<unavailable>) at tls.c:359
     frame #19: 0x00000000002227d0 mergenets`_init_tls at tls.c:469:8
     frame #20: 0x000000000021f234 mergenets`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1.c:66:3


-- 
// Lev Serebryakov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61cebbd1-4e8d-d9d7-dda2-388e81e61599>