* bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch
@ 2020-04-20 19:34 dsmich
2020-04-20 19:41 ` bug#40737: Forgot command output dsmich
` (9 more replies)
0 siblings, 10 replies; 14+ messages in thread
From: dsmich @ 2020-04-20 19:34 UTC (permalink / raw)
To: 40737
[-- Attachment #1: Type: text/plain, Size: 9588 bytes --]
Here is a backtrace of running guile on a builtroot constructed system
for rpi3.
Thumb2 instructions: BR2_ARM_INSTRUCTIONS_THUMB2=y
Gcc 7.5: BR2_GCC_VERSION="7.5.0"
Glibc.
Uses the patch from
https://gitlab.com/wingo/lightening/-/merge_requests/3
I hope this makes it through the mail client ok.
-Dale
Core was generated by `guile'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x76ee6f12 in ?? ()
[Current thread is 1 (LWP 507)]
(gdb) thread apply all backtrace
Thread 5 (LWP 508):
#0 0x76e59674 in __libc_do_syscall () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#1 0x76e5499e in pthread_cond_wait@@GLIBC_2.4 () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#2 0x76e7d7aa in GC_wait_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#3 0x76e7dab0 in GC_help_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#4 0x76e7db26 in GC_mark_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#5 0x76e4fbb0 in start_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#6 0x76b450ec in ?? () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
Thread 4 (LWP 510):
#0 0x76e59674 in __libc_do_syscall () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#1 0x76e5499e in pthread_cond_wait@@GLIBC_2.4 () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#2 0x76e7d7aa in GC_wait_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#3 0x76e7dab0 in GC_help_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#4 0x76e7db26 in GC_mark_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#5 0x76e4fbb0 in start_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#6 0x76b450ec in ?? () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
Thread 3 (LWP 511):
#0 0x76e59674 in __libc_do_syscall () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#1 0x76e57720 in read () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#2 0x76ef8aee in read_finalization_pipe_data (data=0x74c1f95c) at
finalizers.c:205
#3 0x76e7cea8 in GC_do_blocking_inner () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#4 0x76e7b068 in GC_with_callee_saves_pushed () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#5 0x76e7b094 in GC_do_blocking () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#6 0x76f3f10c in scm_without_guile (func=0x76ef8add , data=0x74c1f95c)
at threads.c:706
#7 0x76ef8d7a in finalization_thread_proc (unused=) at
finalizers.c:218
#8 0x76eef876 in c_body (d=0x74c1fe1c) at continuations.c:430
#9 0x76f4298e in vm_debug_engine (thread=0x76a46c00) at
vm-engine.c:972
#10 0x76f47b9c in scm_call_n (proc=0x7521dc70,
argv=argv@entry=0x74c1fbc0, nargs=nargs@entry=2) at vm.c:1608
#11 0x76ef22c4 in scm_call_2 (proc=, arg1=, arg2=) at eval.c:503
#12 0x76ef31a2 in scm_c_with_exception_handler (type=type@entry=0x404,
handler=0x76f3f9b9 , handler_data=handler_data@entry=0x74c1fda8,
thunk=0x76f3fa7d , thunk_data=thunk_data@entry=0x74c1fda8) at
exceptions.c:170
#13 0x76f3fbd4 in scm_c_catch (tag=tag@entry=0x404,
body=body@entry=0x76eef86d , body_data=body_data@entry=0x74c1fe1c,
handler=handler@entry=0x76eefa1d ,
handler_data=handler_data@entry=0x74c1fe1c,
pre_unwind_handler=pre_unwind_handler@entry=0x76eef8fb ,
pre_unwind_handler_data=pre_unwind_handler_data@entry=0x751fc300) at
throw.c:168
--Type for more, q to quit, c to continue without paging--c
#14 0x76eefba2 in scm_i_with_continuation_barrier (body=0x76eef86d ,
body_data=body_data@entry=0x74c1fe1c, handler=0x76eefa1d ,
handler_data=handler_data@entry=0x74c1fe1c,
pre_unwind_handler=0x76eef8fb , pre_unwind_handler_data=0x751fc300) at
continuations.c:368
#15 0x76eefc06 in scm_c_with_continuation_barrier (func=, data=) at
continuations.c:464
#16 0x76f3edd4 in with_guile (base=0x74c1fe4c, data=0x74c1fe64) at
threads.c:645
#17 0x76e78e98 in GC_call_with_stack_base () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#18 0x76f3f0cc in scm_i_with_guile (dynamic_state=, data=, func=) at
threads.c:688
#19 scm_with_guile (func=, data=) at threads.c:694
#20 0x76e4fbb0 in start_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#21 0x76b450ec in ?? () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
Thread 2 (LWP 509):
#0 0x76e59674 in __libc_do_syscall () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#1 0x76e5499e in pthread_cond_wait@@GLIBC_2.4 () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#2 0x76e7d7aa in GC_wait_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#3 0x76e7dab0 in GC_help_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#4 0x76e7db26 in GC_mark_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#5 0x76e4fbb0 in start_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#6 0x76b450ec in ?? () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
Thread 1 (LWP 507):
#0 0x76ee6f12 in scm_is_pair (x=0x0) at pairs.h:182
#1 scm_sloppy_assq (key=0x752076f0, alist=0x0) at alist.c:59
#2 0x76effef8 in scm_hash_fn_ref (table=table@entry=0x751da8b0,
obj=obj@entry=0x752076f0, dflt=dflt@entry=0x4,
hash_fn=hash_fn@entry=0x76eff79d , assoc_fn=0x76ee6f0d ,
closure=closure@entry=0x0) at hashtab.c:300
#3 0x76efff5c in scm_hashq_ref (table=0x751da8b0,
key=key@entry=0x752076f0, dflt=0x4, dflt@entry=0x904) at hashtab.c:426
#4 0x76f11f74 in scm_module_variable (module=0x74f281e0,
sym=0x752076f0) at modules.c:500
#5 0x76f430c4 in vm_debug_engine (thread=0x76a46e00) at
vm-engine.c:1560
#6 0x76f47b9c in scm_call_n (proc=0x74107800,
argv=argv@entry=0x7eb8fb64, nargs=nargs@entry=1) at vm.c:1608
#7 0x76ef22b0 in scm_call_1 (proc=, arg1=) at eval.c:496
#8 0x76f4298e in vm_debug_engine (thread=0x76a46e00) at
vm-engine.c:972
#9 0x76f47b9c in scm_call_n (proc=0x7521dc30,
argv=argv@entry=0x7eb8fdb0, nargs=nargs@entry=4) at vm.c:1608
#10 0x76ef22f4 in scm_call_4 (proc=, arg1=arg1@entry=0x751fc300,
arg2=arg2@entry=0x74d09810, arg3=arg3@entry=0x76a4ab60,
arg4=arg4@entry=0x7416c0b8) at eval.c:517
#11 0x76eea9a0 in scm_print_exception (port=port@entry=0x751fc300,
frame=frame@entry=0x74d09810, key=key@entry=0x76a4ab60,
args=args@entry=0x7416c0b8) at backtrace.c:121
#12 0x76eef994 in print_exception_and_backtrace (args=0x7416c0b8,
tag=0x76a4ab60, port=0x751fc300) at continuations.c:415
#13 pre_unwind_handler (error_port=0x751fc300, tag=0x76a4ab60,
args=0x7416c0b8) at continuations.c:453
#14 0x76f3fa2e in catch_pre_unwind_handler (data=0x7eb91c18,
exn=0x74159fa0) at throw.c:135
#15 0x76f4298e in vm_debug_engine (thread=0x76a46e00) at
vm-engine.c:972
#16 0x76f47b9c in scm_call_n (proc=proc@entry=0x7521dc50,
argv=0x7eb90068, nargs=5) at vm.c:1608
#17 0x76ef245a in scm_apply_0 (proc=0x7521dc50, args=0x304) at
eval.c:603
#18 0x76ef2afa in scm_apply_1 (proc=, arg1=arg1@entry=0x76a4ab60,
args=args@entry=0x74d098c8) at eval.c:609
#19 0x76f3fd1c in scm_throw (key=0x76a4ab60, key@entry=0x76f8bd90 ,
args=0x74d098c8) at throw.c:262
#20 0x76f3fe22 in scm_ithrow (key=key@entry=0x76f8bd90 , args=,
no_return=no_return@entry=1) at throw.c:457
#21 0x76ef0e66 in scm_error_scm (key=key@entry=0x76f8bd90 ,
subr=subr@entry=0x4, message=message@entry=0x76a4ab60,
args=args@entry=0x304, data=0x74d09948) at error.c:90
#22 0x76f41c4a in bind_kwargs (thread=, npositional=, nlocals=14,
kwargs=0x75145ce0, strict=1 '01', allow_other_keys=0 '00') at
vm.c:1015
#23 0x7500c6e4 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
(gdb) info reg
r0 0x752076f0 1965061872
r1 0x0 0
r2 0x0 0
r3 0x76ee6f0d 1995337485
r4 0x4 4
r5 0x76f7c000 1995948032
r6 0x751da8b0 1964878000
r7 0x752076f0 1965061872
r8 0x3 3
r9 0x74c6d160 1959186784
r10 0x76f8c7e4 1996015588
r11 0x76f7c000 1995948032
r12 0x76f7c288 1995948680
sp 0x7eb8f8d8 0x7eb8f8d8
lr 0x76effef9 1995439865
pc 0x76ee6f12 0x76ee6f12
cpsr 0x40000030 1073741872
fpscr 0x0 0
(gdb) disassem /r 0x76ee6f12,+8
Dump of assembler code from 0x76ee6f12 to 0x76ee6f1a:
=> 0x76ee6f12 : 0b 68 ldr r3, [r1, #0]
0x76ee6f14 : da 07 lsls r2, r3, #31
0x76ee6f16 : 0a d4 bmi.n 0x76ee6f2e
0x76ee6f18 : 13 f0 06 0f tst.w r3, #6
End of assembler dump.
[-- Attachment #2: Type: text/html, Size: 13649 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: Forgot command output
2020-04-20 19:34 bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch dsmich
@ 2020-04-20 19:41 ` dsmich
2020-04-20 19:48 ` bug#40737: Even more info dsmich
` (8 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: dsmich @ 2020-04-20 19:41 UTC (permalink / raw)
To: '40737@debbugs.gnu.org'
[-- Attachment #1: Type: text/plain, Size: 170 bytes --]
# ulimit -c unlimited
# guile
Backtrace:
Exception thrown while printing backtrace:
Unrecognized keyword: #:exports
Segmentation fault (core dumped)
-Dale
[-- Attachment #2: Type: text/html, Size: 220 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: Even more info
2020-04-20 19:34 bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch dsmich
2020-04-20 19:41 ` bug#40737: Forgot command output dsmich
@ 2020-04-20 19:48 ` dsmich
2020-04-21 12:36 ` dsmich
` (7 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: dsmich @ 2020-04-20 19:48 UTC (permalink / raw)
To: '40737@debbugs.gnu.org'
[-- Attachment #1: Type: text/plain, Size: 254 bytes --]
Also forgot to mention this is guile 3.0.2.
It doesn't fail all the time.
When run with GUILE_JIT_THRESHOLD=-1 , there are never any problems.
With GUILE_JIT_THRESHOLD=0 , it always fails, but I'm not sure it's in
the same place.
-Dale
[-- Attachment #2: Type: text/html, Size: 299 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: Even more info
2020-04-20 19:34 bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch dsmich
2020-04-20 19:41 ` bug#40737: Forgot command output dsmich
2020-04-20 19:48 ` bug#40737: Even more info dsmich
@ 2020-04-21 12:36 ` dsmich
2020-06-17 22:36 ` bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch Ludovic Courtès
` (6 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: dsmich @ 2020-04-21 12:36 UTC (permalink / raw)
To: '40737@debbugs.gnu.org'
[-- Attachment #1: Type: text/plain, Size: 4582 bytes --]
And with threshold set to 0:
# GUILE_JIT_THRESHOLD=0 guile
Pre-boot error; key: misc-error, args: (#f "parent is not a exception
type ~S" (#) #f)Aborted (core dumped)
Program terminated with signal SIGABRT, Aborted.
#0 0x76acd6b6 in ?? ()
[Current thread is 1 (LWP 515)]
(gdb) thread apply all backtrace
Thread 4 (LWP 518):
#0 0x76e5f674 in __libc_do_syscall () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#1 0x76e5a99e in pthread_cond_wait@@GLIBC_2.4 () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#2 0x76e837aa in GC_wait_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#3 0x76e83ab0 in GC_help_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#4 0x76e83b26 in GC_mark_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#5 0x76e55bb0 in start_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#6 0x76b4b0ec in ?? () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
Thread 3 (LWP 516):
#0 0x76e5f674 in __libc_do_syscall () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#1 0x76e5a99e in pthread_cond_wait@@GLIBC_2.4 () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#2 0x76e837aa in GC_wait_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#3 0x76e83ab0 in GC_help_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#4 0x76e83b26 in GC_mark_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#5 0x76e55bb0 in start_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#6 0x76b4b0ec in ?? () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
Thread 2 (LWP 517):
#0 0x76e5f674 in __libc_do_syscall () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#1 0x76e5a99e in pthread_cond_wait@@GLIBC_2.4 () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#2 0x76e837aa in GC_wait_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#3 0x76e83ab0 in GC_help_marker () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#4 0x76e83b26 in GC_mark_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libgc.so.1
#5 0x76e55bb0 in start_thread () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libpthread.so.0
#6 0x76b4b0ec in ?? () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
Thread 1 (LWP 515):
#0 0x76acd6b6 in __libc_do_syscall () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libc.so.6
#1 0x76adbc70 in raise () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libc.so.6
#2 0x76adc73e in abort () from
/home/dales/br/rpi/host/arm-buildroot-linux-gnueabihf/sysroot/lib/libc.so.6
#3 0x76f45ce8 in scm_throw (key=0x76fb92b0, key@entry=0x0,
args=0x76a57360) at throw.c:264
#4 0x76f0b97e in throw_ (args=, key=0x0) at intrinsics.c:352
#5 throw_with_value (val=, key_subr_and_message=) at intrinsics.c:367
#6 0x74f473da in ?? ()
--Type for more, q to quit, c to continue without paging--c
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
(gdb) info reg
r0 0x0 0
r1 0x7ef92688 2130257544
r2 0x0 0
r3 0x8 8
r4 0x0 0
r5 0x7ef92688 2130257544
r6 0x76a57360 1990554464
r7 0xaf 175
r8 0x75207308 1965060872
r9 0x75207208 1965060616
r10 0x4 4
r11 0x76f82000 1995972608
r12 0xaf 175
sp 0x7ef92680 0x7ef92680
lr 0x76adbc71 1991097457
pc 0x76acd6b6 0x76acd6b6
cpsr 0x30 48
fpscr 0x0 0
(gdb) disassem /r 0x76acd6b6,+8
Dump of assembler code from 0x76acd6b6 to 0x76acd6be:
=> 0x76acd6b6 : 80 bd pop {r7, pc}
0x76acd6b8 : 03 4b ldr r3, [pc, #12] ; (0x76acd6c8 )
0x76acd6ba : 1d ee 70 0f mrc 15, 0, r0, cr13, cr0, {3}
End of assembler dump.
(gdb)
[-- Attachment #2: Type: text/html, Size: 7968 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch
2020-04-20 19:34 bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch dsmich
` (2 preceding siblings ...)
2020-04-21 12:36 ` dsmich
@ 2020-06-17 22:36 ` Ludovic Courtès
2020-06-18 13:49 ` dsmich
` (5 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2020-06-17 22:36 UTC (permalink / raw)
To: dsmich; +Cc: 40737
Hi Dale,
dsmich@roadrunner.com skribis:
> Here is a backtrace of running guile on a builtroot constructed system
> for rpi3.
> Thumb2 instructions: BR2_ARM_INSTRUCTIONS_THUMB2=y
> Gcc 7.5: BR2_GCC_VERSION="7.5.0"
> Glibc.
>
> Uses the patch from
> https://gitlab.com/wingo/lightening/-/merge_requests/3
>
> I hope this makes it through the mail client ok.
>
> -Dale
>
> Core was generated by `guile'.
> Program terminated with signal SIGSEGV, Segmentation fault.
[...]
> #0 0x76ee6f12 in scm_is_pair (x=0x0) at pairs.h:182
> #1 scm_sloppy_assq (key=0x752076f0, alist=0x0) at alist.c:59
> #2 0x76effef8 in scm_hash_fn_ref (table=table@entry=0x751da8b0,
> obj=obj@entry=0x752076f0, dflt=dflt@entry=0x4,
> hash_fn=hash_fn@entry=0x76eff79d , assoc_fn=0x76ee6f0d ,
> closure=closure@entry=0x0) at hashtab.c:300
> #3 0x76efff5c in scm_hashq_ref (table=0x751da8b0,
> key=key@entry=0x752076f0, dflt=0x4, dflt@entry=0x904) at hashtab.c:426
> #4 0x76f11f74 in scm_module_variable (module=0x74f281e0,
> sym=0x752076f0) at modules.c:500
> #5 0x76f430c4 in vm_debug_engine (thread=0x76a46e00) at
> vm-engine.c:1560
Is this bug still present after the recent lightening merge in
3c3270491e78891e988af1b8007c6d8de9071a3c?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch
2020-04-20 19:34 bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch dsmich
` (3 preceding siblings ...)
2020-06-17 22:36 ` bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch Ludovic Courtès
@ 2020-06-18 13:49 ` dsmich
2020-06-18 14:54 ` Ludovic Courtès
2020-06-18 15:17 ` dsmich
` (4 subsequent siblings)
9 siblings, 1 reply; 14+ messages in thread
From: dsmich @ 2020-06-18 13:49 UTC (permalink / raw)
To: 'Ludovic Courtès'; +Cc: '40737@debbugs.gnu.org'
[-- Attachment #1: Type: text/plain, Size: 1426 bytes --]
I'm still seeing segfaults on rasbian on an rpi3. Have not tried
buildroot yet.
That patch *did* fix a boatload of errors on arm, but this segfault is
an unrelated problem I think. Only happens on arm though.
Here is a way to reproduce:
In the test-suite/standalone dir:
while GUILE_JIT_THRESHOLD=0 make TESTS=test-language check-TESTS; do
:;done
And then:
../../meta/uninstalled-env ../../libtool --mode=execute gdb
../../libguile/guile core
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x76f505cc in scm_is_string (x=0x0) at strings.h:293
293 return SCM_HAS_TYP7 (x, scm_tc7_string);
[Current thread is 1 (Thread 0x76fe6010 (LWP 21616))]
(gdb) bt
#0 0x76f505cc in scm_is_string (x=0x0) at strings.h:293
#1 scm_string_to_symbol (string=0x0) at symbols.c:361
#2 0x722df4cc in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt
stack?)
-----------------------------------------From: "Ludovic Courtès"
To: dsmich@roadrunner.com
Cc: 40737@debbugs.gnu.org
Sent: Wednesday June 17 2020 6:36:34PM
Subject: Re: bug#40737: Segfault in arm gcc7, thumb2 builroot, with
arm patch
Hi Dale,
dsmich@roadrunner.com skribis:
> Here is a backtrace of running guile on a builtroot constructed
system
> for rpi3.
> Thumb2 instructions: BR2_ARM_INSTRUCTIONS_THUMB2=y
> Gcc 7.5: BR2_GCC_VERSION="7.5.0"
> Glibc.
>
> Uses the patch from
>
[-- Attachment #2: Type: text/html, Size: 1732 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch
2020-06-18 13:49 ` dsmich
@ 2020-06-18 14:54 ` Ludovic Courtès
0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2020-06-18 14:54 UTC (permalink / raw)
To: dsmich; +Cc: '40737@debbugs.gnu.org'
Hi,
dsmich@roadrunner.com skribis:
> I'm still seeing segfaults on rasbian on an rpi3. Have not tried
> buildroot yet.
>
> That patch *did* fix a boatload of errors on arm, but this segfault is
> an unrelated problem I think. Only happens on arm though.
>
> Here is a way to reproduce:
>
> In the test-suite/standalone dir:
> while GUILE_JIT_THRESHOLD=0 make TESTS=test-language check-TESTS; do
> :;done
>
> And then:
> ../../meta/uninstalled-env ../../libtool --mode=execute gdb
> ../../libguile/guile core
>
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0 0x76f505cc in scm_is_string (x=0x0) at strings.h:293
> 293 return SCM_HAS_TYP7 (x, scm_tc7_string);
> [Current thread is 1 (Thread 0x76fe6010 (LWP 21616))]
> (gdb) bt
> #0 0x76f505cc in scm_is_string (x=0x0) at strings.h:293
> #1 scm_string_to_symbol (string=0x0) at symbols.c:361
> #2 0x722df4cc in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt
> stack?)
OK.
On IRC you mentioned that this does not happen with
GUILE_JIT_THRESHOLD=-1, right?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch
2020-04-20 19:34 bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch dsmich
` (4 preceding siblings ...)
2020-06-18 13:49 ` dsmich
@ 2020-06-18 15:17 ` dsmich
2020-06-19 16:07 ` Andrew Gierth
` (3 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: dsmich @ 2020-06-18 15:17 UTC (permalink / raw)
To: 'Ludovic Courtès'; +Cc: '40737@debbugs.gnu.org'
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
From: "Ludovic Courtès"
> dsmich@roadrunner.com skribis:
> > In the test-suite/standalone dir:
> > while GUILE_JIT_THRESHOLD=0 make TESTS=test-language check-TESTS;
>
> OK.
>
> On IRC you mentioned that this does not happen with
GUILE_JIT_THRESHOLD=-1, right?
>
That is correct.
-Dale
[-- Attachment #2: Type: text/html, Size: 435 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch
2020-04-20 19:34 bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch dsmich
` (5 preceding siblings ...)
2020-06-18 15:17 ` dsmich
@ 2020-06-19 16:07 ` Andrew Gierth
2020-06-20 14:04 ` Ludovic Courtès
2020-06-19 19:10 ` dsmich
` (2 subsequent siblings)
9 siblings, 1 reply; 14+ messages in thread
From: Andrew Gierth @ 2020-06-19 16:07 UTC (permalink / raw)
To: 40737
[-- Attachment #1: Type: text/plain, Size: 30 bytes --]
Patch attached.
--
Andrew.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: arm constant fix --]
[-- Type: text/x-patch, Size: 696 bytes --]
diff --git a/libguile/lightening/lightening/arm-cpu.c b/libguile/lightening/lightening/arm-cpu.c
index 4445266af..2b4eecc29 100644
--- a/libguile/lightening/lightening/arm-cpu.c
+++ b/libguile/lightening/lightening/arm-cpu.c
@@ -230,7 +230,7 @@ encode_thumb_immediate(unsigned int v)
return ((v & 0xff) | (1 << 12));
/* abcdefgh 00000000 abcdefgh 00000000 */
if (((v & 0xffff0000) >> 16) == (v & 0xffff) && (v & 0xff) == 0)
- return ((v & 0x000000ff) | (2 << 12));
+ return (((v & 0x0000ff00) >> 8) | (2 << 12));
/* abcdefgh abcdefgh abcdefgh abcdefgh */
if ( (v & 0xff) == ((v & 0xff00) >> 8) &&
((v & 0xff00) >> 8) == ((v & 0xff0000) >> 16) &&
^ permalink raw reply related [flat|nested] 14+ messages in thread
* bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch
2020-06-19 16:07 ` Andrew Gierth
@ 2020-06-20 14:04 ` Ludovic Courtès
2020-06-20 14:37 ` Ludovic Courtès
0 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2020-06-20 14:04 UTC (permalink / raw)
To: Andrew Gierth; +Cc: Andy Wingo, 40737
Hi Andrew,
Andrew Gierth <andrew@tao11.riddles.org.uk> skribis:
> diff --git a/libguile/lightening/lightening/arm-cpu.c b/libguile/lightening/lightening/arm-cpu.c
> index 4445266af..2b4eecc29 100644
> --- a/libguile/lightening/lightening/arm-cpu.c
> +++ b/libguile/lightening/lightening/arm-cpu.c
> @@ -230,7 +230,7 @@ encode_thumb_immediate(unsigned int v)
> return ((v & 0xff) | (1 << 12));
> /* abcdefgh 00000000 abcdefgh 00000000 */
> if (((v & 0xffff0000) >> 16) == (v & 0xffff) && (v & 0xff) == 0)
> - return ((v & 0x000000ff) | (2 << 12));
> + return (((v & 0x0000ff00) >> 8) | (2 << 12));
> /* abcdefgh abcdefgh abcdefgh abcdefgh */
> if ( (v & 0xff) == ((v & 0xff00) >> 8) &&
> ((v & 0xff00) >> 8) == ((v & 0xff0000) >> 16) &&
I pushed this fix to the lightening repo on your behalf:
https://gitlab.com/wingo/lightening/-/commit/1bb909a44d2303f88bb05125fc6742e97f80cd1d
The CI jobs pass:
https://gitlab.com/wingo/lightening/-/pipelines/158337465
I’ll try merging it into Guile, but do you have a test that reproduces
the original bug, either at the Guile level or in C using the lightening
API? Perhaps the test that Dale posted yesterday at
<https://paste.debian.net/1152897/>?
--8<---------------cut here---------------start------------->8---
#include "test.h"
static void
run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size)
{
jit_begin(j, arena_base, arena_size);
jit_movi(j, JIT_R0, 0xa500a500);
jit_retr(j, JIT_R0);
jit_uword_t (*f)(void) = jit_end(j, NULL);
ASSERT(f() == 0xa500a500);
}
int
main (int argc, char *argv[])
{
return main_helper(argc, argv, run_test);
}
--8<---------------cut here---------------end--------------->8---
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch
2020-06-20 14:04 ` Ludovic Courtès
@ 2020-06-20 14:37 ` Ludovic Courtès
0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2020-06-20 14:37 UTC (permalink / raw)
To: Andrew Gierth; +Cc: Andy Wingo, 40737
Hi,
Ludovic Courtès <ludo@gnu.org> skribis:
> Andrew Gierth <andrew@tao11.riddles.org.uk> skribis:
>
>> diff --git a/libguile/lightening/lightening/arm-cpu.c b/libguile/lightening/lightening/arm-cpu.c
>> index 4445266af..2b4eecc29 100644
>> --- a/libguile/lightening/lightening/arm-cpu.c
>> +++ b/libguile/lightening/lightening/arm-cpu.c
>> @@ -230,7 +230,7 @@ encode_thumb_immediate(unsigned int v)
>> return ((v & 0xff) | (1 << 12));
>> /* abcdefgh 00000000 abcdefgh 00000000 */
>> if (((v & 0xffff0000) >> 16) == (v & 0xffff) && (v & 0xff) == 0)
>> - return ((v & 0x000000ff) | (2 << 12));
>> + return (((v & 0x0000ff00) >> 8) | (2 << 12));
>> /* abcdefgh abcdefgh abcdefgh abcdefgh */
>> if ( (v & 0xff) == ((v & 0xff00) >> 8) &&
>> ((v & 0xff00) >> 8) == ((v & 0xff0000) >> 16) &&
>
> I pushed this fix to the lightening repo on your behalf:
>
> https://gitlab.com/wingo/lightening/-/commit/1bb909a44d2303f88bb05125fc6742e97f80cd1d
>
> The CI jobs pass:
>
> https://gitlab.com/wingo/lightening/-/pipelines/158337465
>
> I’ll try merging it into Guile, but do you have a test that reproduces
> the original bug, either at the Guile level or in C using the lightening
> API? Perhaps the test that Dale posted yesterday at
> <https://paste.debian.net/1152897/>?
Replying to myself after our discussion on IRC: I’ve merged the test you
provided, Dale (with the addition of enter/leave_jit_abi), and pushed.
https://gitlab.com/wingo/lightening/-/commit/24ef197b1269f8371b1f4a412caa6d2b99d66839
I’ll look into merging into Guile later today, and then I guess we can
close this bug.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch
2020-04-20 19:34 bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch dsmich
` (6 preceding siblings ...)
2020-06-19 16:07 ` Andrew Gierth
@ 2020-06-19 19:10 ` dsmich
2020-06-22 14:34 ` dsmich
2020-06-22 15:18 ` bug#40737: 40737-done@debbugs.gnu.org Dale Smith
9 siblings, 0 replies; 14+ messages in thread
From: dsmich @ 2020-06-19 19:10 UTC (permalink / raw)
To: 'Andrew Gierth'; +Cc: '40737@debbugs.gnu.org'
[-- Attachment #1: Type: text/plain, Size: 350 bytes --]
Here is the start of a case to go in tests/movi.c:
#include "test.h"
// Should really test all of the cases seen in
// arm-cpu.c: encode_thumb_immediate()
/* 00000000 00000000 00000000 abcdefgh */
/* 00000000 abcdefgh 00000000 abcdefgh */
/* abcdefgh 00000000 abcdefgh 00000000 */
/* abcdefgh abcdefgh abcdefgh abcdefgh */
/* 1bcdefgh
[-- Attachment #2: Type: text/html, Size: 992 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch
2020-04-20 19:34 bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch dsmich
` (7 preceding siblings ...)
2020-06-19 19:10 ` dsmich
@ 2020-06-22 14:34 ` dsmich
2020-06-22 15:18 ` bug#40737: 40737-done@debbugs.gnu.org Dale Smith
9 siblings, 0 replies; 14+ messages in thread
From: dsmich @ 2020-06-22 14:34 UTC (permalink / raw)
To: 'Ludovic Courtès'
Cc: 'Andy Wingo', 'Andrew Gierth',
'40737@debbugs.gnu.org'
[-- Attachment #1: Type: text/plain, Size: 24 bytes --]
close 40737 v3.0.3
[-- Attachment #2: Type: text/html, Size: 85 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#40737: 40737-done@debbugs.gnu.org
2020-04-20 19:34 bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch dsmich
` (8 preceding siblings ...)
2020-06-22 14:34 ` dsmich
@ 2020-06-22 15:18 ` Dale Smith
9 siblings, 0 replies; 14+ messages in thread
From: Dale Smith @ 2020-06-22 15:18 UTC (permalink / raw)
To: 40737-done
Fixed in the 3.0.3 release by commit 7e814190e
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-06-22 15:18 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-20 19:34 bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch dsmich
2020-04-20 19:41 ` bug#40737: Forgot command output dsmich
2020-04-20 19:48 ` bug#40737: Even more info dsmich
2020-04-21 12:36 ` dsmich
2020-06-17 22:36 ` bug#40737: Segfault in arm gcc7, thumb2 builroot, with arm patch Ludovic Courtès
2020-06-18 13:49 ` dsmich
2020-06-18 14:54 ` Ludovic Courtès
2020-06-18 15:17 ` dsmich
2020-06-19 16:07 ` Andrew Gierth
2020-06-20 14:04 ` Ludovic Courtès
2020-06-20 14:37 ` Ludovic Courtès
2020-06-19 19:10 ` dsmich
2020-06-22 14:34 ` dsmich
2020-06-22 15:18 ` bug#40737: 40737-done@debbugs.gnu.org Dale Smith
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 read-only IMAP folder(s) and NNTP newsgroup(s).