From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 20 11:34:04 2020 Received: (at submit) by debbugs.gnu.org; 20 Jan 2020 16:34:04 +0000 Received: from localhost ([127.0.0.1]:45900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ita00-0000oz-HL for submit@debbugs.gnu.org; Mon, 20 Jan 2020 11:34:04 -0500 Received: from lists.gnu.org ([209.51.188.17]:60521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itZzv-0000on-VQ for submit@debbugs.gnu.org; Mon, 20 Jan 2020 11:33:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59592) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itZzt-0007Zx-Ux for bug-Guile@gnu.org; Mon, 20 Jan 2020 11:33:55 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_50, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1itZzt-0007sw-QA for bug-Guile@gnu.org; Mon, 20 Jan 2020 11:33:53 -0500 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=56574 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1itZzr-0005sT-Hz for bug-Guile@gnu.org; Mon, 20 Jan 2020 11:33:53 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: bug-Guile@gnu.org Subject: [3.0.0] Segfault while building on ARMv7 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 =?utf-8?Q?Pluvi=C3=B4se?= an 228 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 20 Jan 2020 17:33:48 +0100 Message-ID: <87a76igk9f.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, Building 3.0.0 with Guix on ARMv7 reproducibly fails: --8<---------------cut here---------------start------------->8--- BOOTSTRAP GUILEC language/cps/loop-instrumentation.go wrote `language/cps/loop-instrumentation.go' BOOTSTRAP GUILEC language/cps/peel-loops.go wrote `language/cps/effects-analysis.go' BOOTSTRAP GUILEC language/cps/prune-top-level-scopes.go wrote `language/cps/licm.go' BOOTSTRAP GUILEC language/cps/reify-primitives.go wrote `language/cps/prune-top-level-scopes.go' BOOTSTRAP GUILEC language/cps/renumber.go wrote `language/cps/peel-loops.go' BOOTSTRAP GUILEC language/cps/rotate-loops.go wrote `language/cps/reify-primitives.go' BOOTSTRAP GUILEC language/cps/optimize.go wrote `language/cps/renumber.go' BOOTSTRAP GUILEC language/cps/simplify.go wrote `language/cps/rotate-loops.go' BOOTSTRAP GUILEC language/cps/self-references.go wrote `language/cps/optimize.go' BOOTSTRAP GUILEC language/cps/slot-allocation.go wrote `language/cps/self-references.go' BOOTSTRAP GUILEC language/cps/spec.go wrote `language/cps/simplify.go' BOOTSTRAP GUILEC language/cps/specialize-primcalls.go wrote `language/cps/spec.go' BOOTSTRAP GUILEC language/cps/specialize-numbers.go /gnu/store/nvkn00kq4x4g5wjjjvjj6rhzs0ihihxl-bash-minimal-5.0.7/bin/bash: li= ne 6: 23019 Segmentation fault (core dumped) GUILE_AUTO_COMPILE=3D0 ..= /meta/build-env guild compile --target=3D"arm-unknown-linux-gnueabihf" -O1 = -Oresolve-primitives -L "/tmp/guix-build-guile-next-3.0.0.drv-0/guile-3.0.0= /module" -L "/tmp/guix-build-guile-next-3.0.0.drv-0/guile-3.0.0/guile-readl= ine" -o "language/cps/specialize-primcalls.go" "../module/language/cps/spec= ialize-primcalls.scm" make[2]: *** [Makefile:1931: language/cps/specialize-primcalls.go] Error 139 make[2]: *** Waiting for unfinished jobs.... wrote `language/cps/slot-allocation.go' wrote `language/cps/specialize-numbers.go' make[2]: Leaving directory '/tmp/guix-build-guile-next-3.0.0.drv-0/guile-3.= 0.0/bootstrap' make[1]: *** [Makefile:1849: all-recursive] Error 1 --8<---------------cut here---------------end--------------->8--- It seems to always happen while building =E2=80=98specialize-primcalls.go= =E2=80=99. (See .) The backtrace is unfortunately not all that readable: --8<---------------cut here---------------start------------->8--- Program terminated with signal SIGSEGV, Segmentation fault. #0 0xf5c67b74 in ?? () [Current thread is 1 (Thread 0xf7fe8010 (LWP 23019))] (gdb) bt #0 0xf5c67b74 in ?? () #1 0xf7f3ffcc in scm_jit_enter_mcode (thread=3D0xdedc20, mcode=3D0xf5c67a00 " 8\r\032(-@\360c\203%i\250B\300\362_\203\240`\245m"= ) at jit.c:5725 #2 0xf7093a40 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) info threads Id Target Id Frame * 1 Thread 0xf7fe8010 (LWP 23019) 0xf5c67b74 in ?? () 2 Thread 0xf7894460 (LWP 23042) 0xf7e8f034 in __libc_do_syscall () from /gnu/store/n7c20pjm6q1xq1gqjqzzys1yk9fy7n1k-glibc-2.29/lib/libpthre= ad.so.0 3 Thread 0xf69a5460 (LWP 23045) 0xf7e8f034 in __libc_do_syscall () from /gnu/store/n7c20pjm6q1xq1gqjqzzys1yk9fy7n1k-glibc-2.29/lib/libpthre= ad.so.0 (gdb) frame 0 #0 0xf5c67b74 in ?? () (gdb) disassemble 0xf5c67a00,+500 Dump of assembler code from 0xf5c67a00 to 0xf5c67bf4: 0xf5c67a00: subs r0, #32 0xf5c67a02: subs r5, r1, r0 0xf5c67a04: cmp r5, #40 ; 0x28 0xf5c67a06: bne.w 0xf5c680d0 0xf5c67a0a: ldr r5, [r4, #16] 0xf5c67a0c: cmp r0, r5 0xf5c67a0e: blt.w 0xf5c680d0 0xf5c67a12: str r0, [r4, #8] 0xf5c67a14: ldr r5, [r4, #88] ; 0x58 0xf5c67a16: cmp r5, #0 0xf5c67a18: beq.w 0xf5c68102 0xf5c67a1c: ldrt r6, [r5] 0xf5c67a20: str r6, [r4, #88] ; 0x58 0xf5c67a22: str r5, [r0, #24] 0xf5c67a24: movw r5, #1293 ; 0x50d 0xf5c67a28: movs r6, #0 0xf5c67a2a: str r5, [r0, #16] 0xf5c67a2c: str r6, [r0, #20] 0xf5c67a2e: ldr r5, [r0, #24] 0xf5c67a30: ldr r6, [r0, #16] 0xf5c67a32: str r6, [r5, #0] 0xf5c67a34: ldr r5, [r0, #32] 0xf5c67a36: ldr r5, [r5, #4] 0xf5c67a38: str r5, [r0, #16] [=E2=80=A6] 0xf5c67b5e: cmp r5, #0 0xf5c67b60: ble.w 0xf5c67fce 0xf5c67b64: ldr r5, [r0, #32] 0xf5c67b66: ldr r5, [r5, #20] 0xf5c67b68: str r5, [r0, #16] 0xf5c67b6a: ldr r5, [r0, #16] 0xf5c67b6c: ldr r5, [r5, #4] 0xf5c67b6e: str r5, [r0, #16] 0xf5c67b70: mov.w r12, #0 =3D> 0xf5c67b74: ldrt r5, [r12] 0xf5c67b78: str r5, [r0, #8] 0xf5c67b7a: ldr r5, [r0, #8] 0xf5c67b7c: ldr r6, [r0, #16] 0xf5c67b7e: cmp r5, r6 0xf5c67b80: bne.w 0xf5c67f80 [=E2=80=A6] (gdb) info registers r0 0xf7093a20 4144577056 r1 0xf7093a48 4144577096 r2 0x0 0 r3 0xf7a24001 4154605569 r4 0x74e00 478720 r5 0xdedc20 14605344 r6 0x0 0 r7 0xf5c67a00 4123425280 r8 0x0 0 r9 0x0 0 r10 0xf7fc4bdc 4160506844 r11 0xf7fb5000 4160442368 r12 0x0 0 sp 0xfffedc50 0xfffedc50 lr 0xf7f3ffcd -135004211 pc 0xf5c67b74 0xf5c67b74 cpsr 0x200f0030 537854000 fpscr 0x60000000 1610612736 (gdb) frame 1 #1 0xf7f3ffcc in scm_jit_enter_mcode (thread=3D0xdedc20,=20 mcode=3D0xf5c67a00 " 8\r\032(-@\360c\203%i\250B\300\362_\203\240`\245m"= ) at jit.c:5725 5725 enter_mcode (thread, mcode); (gdb) info locals No locals. (gdb) p *thread $2 =3D {next_thread =3D 0x5, vm =3D {ip =3D 0xdecd50, sp =3D 0x324602ae, fp= =3D 0xdebc50, stack_limit =3D 0x30d,=20 compare_result =3D 72 'H', apply_hook_enabled =3D 130 '\202', return_ho= ok_enabled =3D 82 'R',=20 next_hook_enabled =3D 1 '\001', abort_hook_enabled =3D 192 '\300', disa= ble_mcode =3D 159 '\237', engine =3D 166 '\246',=20 unused =3D 1 '\001', stack_size =3D 15218, stack_bottom =3D 0x20d, appl= y_hook =3D 0x1528240, return_hook =3D 0x1a69fc0,=20 next_hook =3D 0x0, abort_hook =3D 0x5, stack_top =3D 0xdecd68, overflow= _handler_stack =3D 0x28f45b3e,=20 registers =3D 0xdebc58, mra_after_abort =3D 0x20045 "", trace_level =3D= -140048256}, pending_asyncs =3D 0x116ab78,=20 block_asyncs =3D 22184512, freelists =3D {0x20045, 0xf7a707ec, 0x1162bf8,= 0x1528248, 0x5, 0x248360, 0x30999e00,=20 0xdebc60, 0x20d, 0x1528250, 0x1a69fc0, 0x0, 0x20045, 0xf7a70880, 0x1167= 440, 0x1528250, 0x5, 0xdecd80, 0x181aface,=20 0xdebc68, 0x20d, 0x1528258, 0x1a69fc0, 0x0, 0x20045, 0xf7a70880, 0x1167= 460, 0x1528258, 0x5, 0x248370, 0x91c2f1f,=20 0xdebc70}, pointerless_freelists =3D {0x30d, 0x7f1720, 0x1a69fc0, 0x149= 6, 0x30d, 0xdedd50, 0x96, 0x16, 0x5,=20 0x789740, 0x3275b29e, 0xdebc78, 0x30d, 0xdedd50, 0x16, 0x3fffffe, 0x30d= , 0xdedd50, 0x96, 0x3fe, 0x5, 0xdecd98,=20 0x3afba8fc, 0xdebc80, 0x30d, 0x7f1720, 0x96, 0x16, 0x20d, 0x1528260, 0x= 1a69fc0, 0x0}, handle =3D 0x5,=20 pthread =3D 14601648, result =3D 0x38a97220, exited =3D 14597256, guile_m= ode =3D 131141, needs_unregister =3D -140048256,=20 wake =3D 0x1162128, sleep_cond =3D {__data =3D {{__wseq =3D 9528192531641= 1917, __wseq32 =3D {__low =3D 525,=20 __high =3D 22184552}}, {__g1_start =3D 27697088, __g1_start32 =3D= {__low =3D 27697088, __high =3D 0}}, __g_refs =3D {5,=20 7903072}, __g_size =3D {67881032, 14597264}, __g1_orig_size =3D 131= 141, __wrefs =3D 4154919040, __g_signals =3D { 18228776, 22184552}},=20 __size =3D "\r\002\000\000h\202R\001\300\237\246\001\000\000\000\000\00= 5\000\000\000`\227x\000H\310\v\004\220\274\336\000E\000\002\000\200\b\247\3= 67(&\026\001h\202R\001", __align =3D 95281925316411917}, sleep_pipe =3D {52= 5, 22184560},=20 dynamic_state =3D 0xa, dynstack =3D {base =3D 0x0, top =3D 0x5, limit =3D= 0x789780}, continuation_root =3D 0x2db7da0c,=20 continuation_base =3D 0xdebc98, base =3D 0x20d, jit_state =3D 0xdede20} --8<---------------cut here---------------end--------------->8--- Unfortunately I=E2=80=99m unable to reproduce the bug outside Guix=E2=80=99= s build environment, even with ASLR disabled (what guix-daemon does). I wonder if that could be the same issue as . I=E2=80=99ll happily take suggestions as to what debug info would be useful= and what I could bisect! Ludo=E2=80=99.