From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17485 invoked from network); 24 Sep 2021 13:02:43 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 24 Sep 2021 13:02:43 -0000 Received: (qmail 8068 invoked by uid 550); 24 Sep 2021 13:02:40 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 8037 invoked from network); 24 Sep 2021 13:02:39 -0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aT11pTdv45H7pD1MetJJjNJUsZebJgjBw89VY934OwByalX49BdqppojVBmxdlrVpZpB82FETFzbUjiWIsQi+ZZlLEgAgkelgXkNxFczHJwJ0vNWjxhJj/zBuB2QqfiQiHaWHLsuXAfj7Z29wqM1ijMsxNFwhHjIAySxRa4Z8lIp+gWAz+GiSMvBdOAuOmlMbXzmhgm9VJ5KpDVMcyWwT/htIeYepL2BaUy9sMaj7WIXMBdQpYddxD6s1uPRHUPBADCY+8h3vURLzG5IZPc8EN/zNhFHCVA6Bu5slZg9tKCqSdk61Q8EUnTuyDBY0B9LApDP2TURgLynYMMk50MXXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7FT+L75rGxSq61I3giRtbvCHGqmfTvtx1th8Gyoq7WY=; b=oe3hzi8bbgjjP//M6Z1siigMH30L+/Pi7w0b91FJov/th5g+rm1W2Oqk/glrQKI9dsRCtOTLJcxV26Oz5Z/ER+IDCzF7WG+oHV0kdEq5EQU1izB9QYFy9ZVT9tDSwBgNzZTtNL6M7LImunyPzGFvcj6NynKGbokCT5qY5cIgmscNCLEATHzZNHmVB8mmptVD8kFemcls4Cp6iGmHGxiB5nG7xwMcd7+bCxc5kf9+igoTdL//g1ljlpafmJps0Yg9TO2QqT8UvUmEN1qnRbB6tInJ0va5FNPOJ2l/CAlybGZjy5Av/f6Z4E7wGDVMTtND3fQKMSMNPLDZGQRunQ4Pcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bytesnet.nl; dmarc=pass action=none header.from=bytesnet.nl; dkim=pass header.d=bytesnet.nl; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytesnet.onmicrosoft.com; s=selector1-bytesnet-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7FT+L75rGxSq61I3giRtbvCHGqmfTvtx1th8Gyoq7WY=; b=Y3SrhLqS8NqiaHKKxf7ZLYcNY6zwRukZf/sb3AOo7UqS/AFeUZ8tw8ekS1hUDV+CkPBSGaYpndqWZ6xZxaB83grprGvgYej6ZnkVimyrA4+PojIc5QBFJKPFbp9AmvNKJNqcpGqS8NxPsfoUKAzQsKSGTH6Iw4vcLxwNZ7CTDzMguOIP7Ze4Vo9uJvELRHUbAQBUq44VwHtCC8kUs30sWUGoJ3SplpUYNPURq5TXv5sca3XfDGpsNJix2UpPPLv4Wj/zD/GEjPsh7QFAb+NKE56Lzqm4g58OgPxywpDuzVRNRhu84JwUBMDPzVcZrBQnUcidfmiYRFfyxTqDc6nYNg== From: Ivo Palli To: Rich Felker CC: "musl@lists.openwall.com" Thread-Topic: [musl] Musl compiled gawk coredumps. How to find out where? Thread-Index: AQHXsS7qy5YNxcQHpEaIKWTbR97wbquzH3OAgAAGglo= Date: Fri, 24 Sep 2021 13:02:27 +0000 Message-ID: References: <20210924123717.GE13220@brightrain.aerifal.cx> In-Reply-To: <20210924123717.GE13220@brightrain.aerifal.cx> Accept-Language: en-US, nl-NL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: ea67d086-12c5-9160-e8e6-50d2637729d7 authentication-results: libc.org; dkim=none (message not signed) header.d=none;libc.org; dmarc=none action=none header.from=bytesnet.nl; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6dc95463-a932-4d33-1466-08d97f5b8f70 x-ms-traffictypediagnostic: PA4PR07MB7390: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fC5FLH69NUjKYxvP1FIo0fGUQNuB4Jion6dc1eMTRt3D3IE3qEDCUswpwEVLe+tiWIKBcE3VmsDM9nTt/PRMeLZiPwiJjKjXgkG+BUKFyhiu3HS1cpP3Ffy1c/Kja4sSDxYmcKnC78gp8z/yQ1xMwmeQ2v2lZov2nPHASJm/xeHiBJ6zQg5yN8X0CFQMyIQSyTTVNp5BTfWHWhvv02stMrhWw8JmSx33UchhWXhJkAdPCKpI/h9sPfbFdLid6sHPpz5ek+2Xv11Gt8Jxc8D7XszkWXbKn/mZnYjXi/Neio41v/0XycvWEiLTFzj7GwvGp4JJG7mukUj17Ye4k8vIQSD8TlOvO1Y/pDaiO9YyYAR/rgwa6fUnhmeltngTk4PX5ms2CIq6vAMBtspPeKgoV/uOLMNGWeJ6owHrZVMrdGC8Qz0BGxmhD1c3hGTKW4c/cEkWW+bGDT1mYrBR4M0NyhlMFTXcZnu0TqYOmMbDr9R57ijly+IJ1xkfj2O+JJ9hm7FydD5EEMUjNHwxzwVFHFFkFOdIhghaMJ46EZLY3oYj9xp8UqZs/k7oCKkkvAsjEB0O+KOONsOun2hD+pJyHit3D8W9+XRKapUfsCPgX71+hN/hcAQll/pnws5OVRiJGnknbBz85xkhVErj0U6iHpOSsQUc76fibPlWXP1c53ibEHnNc+jHrF9odrcoiVnAB7uqX8N6CSn+f5l9uIqW857TMm5L/KK0vUTKgFyikIc= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PR1PR07MB4908.eurprd07.prod.outlook.com;PTR:;CAT:NONE;SFS:(39830400003)(396003)(346002)(136003)(376002)(366004)(6916009)(2906002)(5660300002)(71200400001)(52536014)(38070700005)(7696005)(64756008)(91956017)(33656002)(122000001)(26005)(19627405001)(508600001)(66556008)(9686003)(86362001)(6506007)(66476007)(186003)(66446008)(38100700002)(53546011)(76116006)(66946007)(8936002)(316002)(4326008)(55016002)(83380400001)(8676002)(37363002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?iZn9IE7gaPeXGSABEt6185P4dgEcHyVZUfsYCeVWYujH1J3pMwI2twEh0RTx?= =?us-ascii?Q?YK9aC0hGBCqUail5pu+KIyuGzEBJkJluL1mTRRa/5fWJ5A0AB281z0h0uAvH?= =?us-ascii?Q?IUD3Bw+3PkHq7iVHUGLSCRpuy4H6/1pJlsZSCA+go2UxPdrH8t67TjcF88eH?= =?us-ascii?Q?VRiWmut+WtuIZHApZobngXgqcXlfr78VG9T+Xk8nY8Wa/95m6zbcGXM/uz7B?= =?us-ascii?Q?KbQvuVG4pHinUtHwTxy6gbW2WtLHob80VnPmxrmoXWJhRKlrwyiXGlpPF0eb?= =?us-ascii?Q?yl3ypikNtoS8IWYWB8afHgKAdlXyMldiHhDgc6mDqylAV7Hlng0naaJB/of1?= =?us-ascii?Q?kbt/aNacNjVGHt3bmB1GTTic77LTtGDm+TGtIg+NGnHYbmZ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lETXQe425Mqm4U0cXoULCNYTkvDNr+k1BcFIkgK?= =?us-ascii?Q?Mpudn01FY0Qd2Fr24H2euUnf?= x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_PR1PR07MB49085E8B6F80D1485FA776F0F6A49PR1PR07MB4908eurp_" MIME-Version: 1.0 X-OriginatorOrg: bytesnet.nl X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PR1PR07MB4908.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6dc95463-a932-4d33-1466-08d97f5b8f70 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Sep 2021 13:02:27.3795 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3463b705-348b-45b0-98f4-08381a1bedfe X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vwyJGtRPLiC+lX7NQEYdDFLRnNl0bdjDpV2BGyw5EfaXr9mqIEkLpu1qn1+dmXiwRSJ6jYWYyEtnVGqISWHXIw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR07MB7390 Subject: Re: [musl] Musl compiled gawk coredumps. How to find out where? --_000_PR1PR07MB49085E8B6F80D1485FA776F0F6A49PR1PR07MB4908eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable That helped! (gdb) backtrace #0 __restore_sigs (set=3Dset@entry=3D0x7fff62ee5de0) at ./arch/x86_64/sysc= all_arch.h:40 #1 0x00000000004cf1c4 in raise (sig=3Dsig@entry=3D6) at src/signal/raise.c= :11 #2 0x00000000004c96ea in abort () at src/exit/abort.c:11 #3 0x0000000000452f16 in catchsig (sig=3D) at main.c:1231 #4 catchsig (sig=3D) at main.c:1217 #5 #6 get_meta (p=3Dp@entry=3D0x7f4d35d74f50 "\260\232\243\001") at src/mallo= c/mallocng/meta.h:141 #7 0x00000000004ca62c in __libc_free (p=3D0x7f4d35d74f50) at src/malloc/ma= llocng/free.c:105 #8 0x0000000000459d57 in r_unref (tmp=3Dtmp@entry=3D0x7f4d35f5c778) at nod= e.c:492 #9 0x00000000004456e5 in unref (r=3D0x7f4d35f5c778) at awk.h:1898 #10 purge_record () at field.c:360 #11 0x0000000000445f36 in set_record ( buf=3D0x7f4d34f34cfe "SIZE\t1KB\t192758\t112698119\nSIZE\t4KB\t462090\t= 1122421206\nSIZE\t16KB\t355596\t3138948391\nSIZE\t64KB\t413028\t13558910172= \nSIZE\t256KB\t1014012\t165385758947\nSIZE\t1MB\t2546508\t1346405498466\nSI= ZE\t10MB\t480844\t1602796961"..., cnt=3D25, fw=3D0x0) at field.c:269 #12 0x000000000044e765 in inrec (iop=3D, errcode=3Derrcode@e= ntry=3D0x7fff62ee6cb0) at io.c:608 #13 0x00000000004414f8 in h_interpret (code=3D) at interpret= .h:1289 #14 0x0000000000402631 in main (argc=3D, argv=3D) at main.c:516 Little unsure where gawk stops and musl begins. I guess #6 is where it goes= wrong. Any musl developer want to work with me to figure this out? Ivo Palli ________________________________ From: Rich Felker Sent: Friday, September 24, 2021 14:37 To: Ivo Palli Cc: musl@lists.openwall.com Subject: Re: [musl] Musl compiled gawk coredumps. How to find out where? On Fri, Sep 24, 2021 at 10:41:24AM +0000, Ivo Palli wrote: > Hi there, > > I compiled gawk-4.2.1 (with gmp-6.2.1 and mpfr-4.1.0) using musl-1.2.2. > > Using it with I script I wrote I get > > gawk: /.../.../build_total.awk:25: (FILENAME=3Dbig.report FNR=3D6) fatal = error: internal error > ../go: line 36: 14488 Aborted (core dumped) > > Loading it into gdb doesn't give much information: > > # gdb -q ./gawk core.gawk.0.51bcaa32ed144d2498e3a70ff28af961.14488.163247= 9605000000 > Reading symbols from ./gawk...done. > [New LWP 14488] > Core was generated by `gawk -i functions.awk -v TEMPLATE=3D... > Program terminated with signal SIGABRT, Aborted. > #0 0x00000000004cf169 in __restore_sigs () > (gdb) backtrace > #0 0x00000000004cf169 in __restore_sigs () > #1 0x00000000004cf1c4 in raise () > #2 0x0000000000000000 in ?? () > (gdb) frame 0 > #0 0x00000000004cf169 in __restore_sigs () > (gdb) print > The history is empty. > (gdb) > > I compiled gawk the same with regular gcc (version 8.3.1 20190507 (Red Ha= t 8.3.1-4)) into a dynamic binary with the same libraries, and that did com= plete my script without crashing. > > Can anybody inform me how to find out exactly where the crash occurs and = how I can help fix this bug? Try with musl and gawk built with debug info. If you're running with musl provided by your distro, it probably has a debug symbols package you can install. If you're building musl yourself, add --enable-debug to configure command line or -g to CFLAGS manually. Rich --_000_PR1PR07MB49085E8B6F80D1485FA776F0F6A49PR1PR07MB4908eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
That helped!

(gdb) backtrace
#0  __restore_sigs (set=3Dset@entry=3D0x7fff62ee5de0) at ./arch/x= 86_64/syscall_arch.h:40
#1  0x00000000004cf1c4 in raise (sig=3Dsig@entry=3D6) at src/sign= al/raise.c:11
#2  0x00000000004c96ea in abort () at src/exit/abort.c:11
#3  0x0000000000452f16 in catchsig (sig=3D<optimized out>) = at main.c:1231
#4  catchsig (sig=3D<optimized out>) at main.c:1217
#5  <signal handler called>
#6  get_meta (p=3Dp@entry=3D0x7f4d35d74f50 "\260\232\243\001= ") at src/malloc/mallocng/meta.h:141
#7  0x00000000004ca62c in __libc_free (p=3D0x7f4d35d74f50) at src= /malloc/mallocng/free.c:105
#8  0x0000000000459d57 in r_unref (tmp=3Dtmp@entry=3D0x7f4d35f5c7= 78) at node.c:492
#9  0x00000000004456e5 in unref (r=3D0x7f4d35f5c778) at awk.h:189= 8
#10 purge_record () at field.c:360
#11 0x0000000000445f36 in set_record (
    buf=3D0x7f4d34f34cfe "SIZE\t1KB\t192758\t112698119\= nSIZE\t4KB\t462090\t1122421206\nSIZE\t16KB\t355596\t3138948391\nSIZE\t64KB\= t413028\t13558910172\nSIZE\t256KB\t1014012\t165385758947\nSIZE\t1MB\t254650= 8\t1346405498466\nSIZE\t10MB\t480844\t1602796961"..., cnt=3D25, fw=3D0x0) at field.c:269
#12 0x000000000044e765 in inrec (iop=3D<optimized out>, errcode= =3Derrcode@entry=3D0x7fff62ee6cb0) at io.c:608
#13 0x00000000004414f8 in h_interpret (code=3D<optimized out>) a= t interpret.h:1289
#14 0x0000000000402631 in main (argc=3D<optimized out>, argv=3D= <optimized out>) at main.c:516

Little unsure where gawk stops and musl begins. I guess #6 is where it goes= wrong. Any musl developer want to work with me to figure this out?

   Ivo Palli


From: Rich Felker <dalia= s@libc.org>
Sent: Friday, September 24, 2021 14:37
To: Ivo Palli <Ivo.Palli@bytesnet.nl>
Cc: musl@lists.openwall.com <musl@lists.openwall.com>
Subject: Re: [musl] Musl compiled gawk coredumps. How to find out wh= ere?
 
On Fri, Sep 24, 2021 at 10:41:24AM +0000, Ivo Pall= i wrote:
> Hi there,
>
> I compiled gawk-4.2.1 (with gmp-6.2.1 and mpfr-4.1.0) using musl-1.2.2= .
>
> Using it with I script I wrote I get
>
> gawk: /.../.../build_total.awk:25: (FILENAME=3Dbig.report FNR=3D6) fat= al error: internal error
> ../go: line 36: 14488 Aborted       = ;          (core dumped)
>
> Loading it into gdb doesn't give much information:
>
> # gdb -q ./gawk core.gawk.0.51bcaa32ed144d2498e3a70ff28af961.14488.163= 2479605000000
> Reading symbols from ./gawk...done.
> [New LWP 14488]
> Core was generated by `gawk -i functions.awk -v TEMPLATE=3D...
> Program terminated with signal SIGABRT, Aborted.
> #0  0x00000000004cf169 in __restore_sigs ()
> (gdb) backtrace
> #0  0x00000000004cf169 in __restore_sigs ()
> #1  0x00000000004cf1c4 in raise ()
> #2  0x0000000000000000 in ?? ()
> (gdb) frame 0
> #0  0x00000000004cf169 in __restore_sigs ()
> (gdb) print
> The history is empty.
> (gdb)
>
> I compiled gawk the same with regular gcc (version 8.3.1 20190507 (Red= Hat 8.3.1-4)) into a dynamic binary with the same libraries, and that did = complete my script without crashing.
>
> Can anybody inform me how to find out exactly where the crash occurs a= nd how I can help fix this bug?

Try with musl and gawk built with debug info. If you're running with
musl provided by your distro, it probably has a debug symbols package
you can install. If you're building musl yourself, add --enable-debug
to configure command line or -g to CFLAGS manually.

Rich
--_000_PR1PR07MB49085E8B6F80D1485FA776F0F6A49PR1PR07MB4908eurp_--