From owner-freebsd-stable@freebsd.org Fri Jan 29 07:47:56 2021 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6642D4E09C9; Fri, 29 Jan 2021 07:47:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DRqFS2N09z4TsX; Fri, 29 Jan 2021 07:47:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 285E19A52; Fri, 29 Jan 2021 07:47:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::a911:60a6:1ec1:f9c] (unknown [IPv6:2001:470:7a58:0:a911:60a6:1ec1:f9c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id EF24358E9F; Fri, 29 Jan 2021 08:47:54 +0100 (CET) From: Dimitry Andric Message-Id: <4A2DB8CA-F152-47F4-A546-50162D206DC0@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_E0B32DCF-D040-4AF1-B968-0C2F20B75892"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: `clang -pg` generates binary which coredumps on start Date: Fri, 29 Jan 2021 08:47:44 +0100 In-Reply-To: <61cebbd1-4e8d-d9d7-dda2-388e81e61599@FreeBSD.org> Cc: FreeBSD-STABLE Mailing List , FreeBSD Hackers To: "lev@freebsd.org" References: <61cebbd1-4e8d-d9d7-dda2-388e81e61599@FreeBSD.org> X-Mailer: Apple Mail (2.3445.104.17) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2021 07:47:56 -0000 --Apple-Mail=_E0B32DCF-D040-4AF1-B968-0C2F20B75892 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 29 Jan 2021, at 00:57, Lev Serebryakov wrote: >=20 > 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? >=20 > (lldb) bt > * thread #1, name =3D 'mergenets', stop reason =3D signal SIGSEGV > * frame #0: 0x0000000000000000 > frame #1: 0x000000000028ebbf = mergenets`__vdso_gettc(th=3D0x00007ffffffff270, tc=3D0x00007fffffffddbc) = at __vdso_gettc.c:0 > frame #2: 0x000000000028e8c3 mergenets`binuptime [inlined] = tc_delta(th=3D) at __vdso_gettimeofday.c:46:10 > frame #3: 0x000000000028e8ba = mergenets`binuptime(bt=3D0x00007fffffffde08, tk=3D0x00007ffffffff1b0, = abs=3D0) at __vdso_gettimeofday.c:78 > frame #4: 0x000000000028ea73 = mergenets`__vdso_clock_gettime(clock_id=3D4, ts=3D0x00007fffffffde68) at = __vdso_gettimeofday.c:165:10 > frame #5: 0x0000000000281efb mergenets`__clock_gettime(clock_id=3D4, = ts=3D0x00007fffffffde68) at clock_gettime.c:48:11 > frame #6: 0x000000000024339f mergenets`nstime_update_impl [inlined] = nstime_get(time=3D0x0000000800403a88) at jemalloc_nstime.c:128:2 > frame #7: 0x0000000000243395 = mergenets`nstime_update_impl(time=3D0x0000000800403a88) at = jemalloc_nstime.c:160 > frame #8: 0x0000000000234b6d mergenets`__je_arena_new [inlined] = arena_decay_reinit(decay=3D0x0000000800403a20, decay_ms=3D) = at jemalloc_arena.c:572:2 > frame #9: 0x0000000000234b21 mergenets`__je_arena_new [inlined] = arena_decay_init(decay=3D0x0000000800403a20, decay_ms=3D, = stats=3D0x00000008004009a0) at jemalloc_arena.c:593 > frame #10: 0x0000000000234b1a = mergenets`__je_arena_new(tsdn=3D0x0000000000000000, ind=3D0, = extent_hooks=3D) at jemalloc_arena.c:1858 > frame #11: 0x00000000002239c0 mergenets`__je_arena_init [inlined] = arena_init_locked(tsdn=3D0x0000000000000000, ind=3D0, = extent_hooks=3D0x0000000000205778) at jemalloc_jemalloc.c:338:10 > frame #12: 0x00000000002239b2 = mergenets`__je_arena_init(tsdn=3D0x0000000000000000, ind=3D0, = extent_hooks=3D0x0000000000205778) 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=3D6223, = zero=3Dfalse, is_internal=3Dfalse) at jemalloc_jemalloc.c:234 > frame #17: 0x00000000002225fc mergenets`__libc_allocate_tls = [inlined] malloc_aligned(size=3D6200, align=3D16) at tls.c:135:8 > frame #18: 0x00000000002225e2 = mergenets`__libc_allocate_tls(oldtls=3D0x0000000000000000, = tcbsize=3D, tcbalign=3D) at tls.c:359 > frame #19: 0x00000000002227d0 mergenets`_init_tls at tls.c:469:8 > frame #20: 0x000000000021f234 mergenets`_start(ap=3D, = cleanup=3D) at crt1.c:66:3 Likely https://bugs.freebsd.org/249121 (and maybe = https://bugs.llvm.org/show_bug.cgi?id=3D48165). -Dimitry --Apple-Mail=_E0B32DCF-D040-4AF1-B968-0C2F20B75892 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYBO9oAAKCRCwXqMKLiCW o6TKAJ9SqcJppfE1Qrz0gLc1DtZWB8bDVgCcDcRyV8JDDjYsgak751Vd8u4kBR4= =uWXR -----END PGP SIGNATURE----- --Apple-Mail=_E0B32DCF-D040-4AF1-B968-0C2F20B75892--