unofficial mirror of 
 help / color / mirror / Atom feed
* scm_shell() SEGV on scm_init_readline()
@ 2020-12-31  1:50 Olivier Dion via General Guile related discussions
  0 siblings, 0 replies; only message in thread
From: Olivier Dion via General Guile related discussions @ 2020-12-31  1:50 UTC (permalink / raw)
  To: guile-user


When calling scm_shell() in a Guile's context, this sometime results in
a segmentation fault when initializing readline.  This fault is
intermittent and I suspect a race condition since I have a second thread
doing things in Guile's context.  Searching on the web have not gave

I managed to catch the fault with ASAN.  Here's the traceback:
==10316==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fc9e58fcc9e bp 0x7fc9e58fc570 sp 0x7fc9f4eae000 T2)
==10316==The signal is caused by a READ memory access.
==10316==Hint: address points to the zero page.
    #0 0x7fc9e58fcc9e in scm_init_readline (/usr/lib/guile/2.2/extensions/
    #1 0x7fc9fa2f2d84 in scm_dynamic_call (/usr/lib/
    #2 0x7fc9fa271148 in scm_load_extension (/usr/lib/
    #3 0x7fc9fa2e5841  (/usr/lib/
    #4 0x7fc9fa2ef710 in scm_call_n (/usr/lib/
    #5 0x7fc9fa28ab68 in scm_primitive_load_path (/usr/lib/
    #6 0x7fc9fa2e5841  (/usr/lib/
    #7 0x7fc9fa2ef710 in scm_call_n (/usr/lib/
    #8 0x7fc9fa26c118 in scm_primitive_eval (/usr/lib/
    #9 0x7fc9fa28a38a in scm_primitive_load (/usr/lib/
    #10 0x7fc9fa2e5841  (/usr/lib/
    #11 0x7fc9fa2ef710 in scm_call_n (/usr/lib/
    #12 0x7fc9fa26c118 in scm_primitive_eval (/usr/lib/
    #13 0x7fc9fa26c179 in scm_eval (/usr/lib/
    #14 0x7fc9fa2bbeea in scm_shell (/usr/lib/
    #15 0x55c0f3a5236d in do_make_shell_inner core/scm.c:32
    #16 0x7fc9fa264b19  (/usr/lib/
    #17 0x7fc9fa2e9c7f  (/usr/lib/
    #18 0x7fc9fa2ef710 in scm_call_n (/usr/lib/
    #19 0x7fc9fa2dda23  (/usr/lib/
    #20 0x7fc9fa265146  (/usr/lib/
    #21 0x7fc9fa265225 in scm_c_with_continuation_barrier (/usr/lib/
    #22 0x7fc9fa2dc42e  (/usr/lib/
    #23 0x7fc9fa1c3da6 in GC_call_with_stack_base (/usr/lib/
    #24 0x7fc9fa2dc828 in scm_with_guile (/usr/lib/
    #25 0x55c0f3a52396 in do_make_shell core/scm.c:41
    #26 0x7fc9fa3653e8 in start_thread (/usr/lib/
    #27 0x7fc9f95c1292 in __GI___clone (/usr/lib/

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/usr/lib/guile/2.2/extensions/ in scm_init_readline
Thread T2 created by T0 here:
    #0 0x7fc9fa3d61c7 in __interceptor_pthread_create /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:214
    #1 0x55c0f3a523b9 in make_shell core/scm.c:48
    #2 0x55c0f3a52b54 in scm_start_inner core/scm.c:85
    #3 0x7fc9fa275ca1 in scm_c_with_fluid (/usr/lib/


Note that the readline module is loaded by my home configuration.

Anyone has encountered this fault before?

Olivier Dion

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-31  1:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-31  1:50 scm_shell() SEGV on scm_init_readline() Olivier Dion via General Guile related discussions

unofficial mirror of 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror guile-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-user guile-user/ \
	public-inbox-index guile-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:

AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git