Subject: Re: regexp_exec thread-unsafe

From: [email-masked] (Ludovic Courtès)
Date: Wed, 12 Mar 2014 00:15:11 +0100

Paul Eggert <[email-masked]> skribis:

> On 05/26/2013 03:11 PM, Paolo Bonzini wrote:
>> Use the lock module instead.
>
> Adding the lock module should work.  But this will require
> some reengineering of Guile, so that Guile uses the lock module
> rather than its own thread packaging.  Another possibility, which
> might be a bit simpler, would be for Guile to pretend to
> have the lock module.  It could do that by creating a file
> glthread/lock.h that looks something like this:
>
>   #include "../libguile/threads.h"
>   #define gl_lock_define(class, name) class scm_i_pthread_mutex_t name;
>   #define glthread_lock_init scm_i_pthread_mutex_init
>   #define glthread_lock_destroy scm_i_pthread_mutex_destroy
>   #define glthread_lock_lock scm_i_pthread_mutex_lock
>   #define glthread_lock_unlock scm_i_pthread_mutex_lock_unlock
>
> and by putting AC_DEFINE([GNULIB_LOCK]) into configure.ac.

(Stripping Cc list.)

It’s been almost a year, but I’ve finally implemented this suggestion:

  http://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=8f7887d61604073528544ccb09849ca0e2f4df78

Now regex_internal.c does use pthread locks:

--8<---------------cut here---------------start------------->8---
$ nm lib/.libs/regex.o |grep pthread
                 U pthread_mutex_destroy
                 U pthread_mutex_init
                 U pthread_mutex_lock
                 U pthread_mutex_unlock
--8<---------------cut here---------------end--------------->8---

However, the example given at
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14404#8> still exposes a
similar bug, but possibly in Guile land this time:

--8<---------------cut here---------------start------------->8---
$ while true ; do timeout 2s ./meta/guile regexec-thread.scm ; done
timeout: the monitored command dumped core
Segmentation fault

$ gdb libguile/.libs/guile core 

[...]

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f275c5cee7b in GC_build_fl4 () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
(gdb) thread apply all bt

Thread 5 (Thread 0x7f2759a49700 (LWP 30825)):
#0  0x00007f275c3a574c in __lll_lock_wait () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libpthread.so.0
#1  0x00007f275c3a1417 in _L_lock_913 () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libpthread.so.0
#2  0x00007f275c3a1240 in pthread_mutex_lock () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libpthread.so.0
#3  0x00007f275c5c7e95 in GC_call_with_alloc_lock () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#4  0x00007f275c89ed69 in scm_hash_fn_get_handle_by_hash (table=<optimized out>, raw_hash=raw_hash@entry=5431120, 
    predicate_fn=predicate_fn@entry=0x7f275c8f5e00 <string_lookup_predicate_fn>, closure=closure@entry=0x7f2759a48860)
    at hashtab.c:659
#5  0x00007f275c8f5a91 in lookup_interned_symbol (raw_hash=5431120, name=0x2c22100) at symbols.c:113
#6  scm_i_str2symbol (str=0x2c22100) at symbols.c:210
#7  0x00007f275c90fa3d in vm_regular_engine (vm=<optimized out>, program=0x7f275cba9768 <scm_string_to_symbol.subr_raw_cell>, 
    argv=<optimized out>, nargs=1) at vm-i-system.c:852
#8  0x00007f275c8f7b80 in really_launch (d=0x7fff4246a800) at threads.c:1005
#9  0x00007f275c87d7aa in c_body (d=0x7f2759a48d70) at continuations.c:517
#10 0x00007f275c90fa28 in vm_regular_engine (vm=<optimized out>, program=0x26d0040, argv=<optimized out>, nargs=2)
    at vm-i-system.c:855
#11 0x00007f275c886fe3 in scm_call_4 (proc=0x27d8c30, arg1=arg1@entry=0x404, arg2=<optimized out>, arg3=<optimized out>, 
    arg4=<optimized out>) at eval.c:507
#12 0x00007f275c8f9999 in scm_catch_with_pre_unwind_handler (key=key@entry=0x404, thunk=<optimized out>, handler=<optimized out>, 
    pre_unwind_handler=<optimized out>) at throw.c:73
#13 0x00007f275c8f9a9f in scm_c_catch (tag=tag@entry=0x404, body=body@entry=0x7f275c87d7a0 <c_body>, 
    body_data=body_data@entry=0x7f2759a48d70, handler=handler@entry=0x7f275c87db80 <c_handler>, 
    handler_data=handler_data@entry=0x7f2759a48d70, 
    pre_unwind_handler=pre_unwind_handler@entry=0x7f275c87d930 <pre_unwind_handler>, 
    pre_unwind_handler_data=pre_unwind_handler_data@entry=0x26d5040) at throw.c:207
#14 0x00007f275c87deef in scm_i_with_continuation_barrier (body=body@entry=0x7f275c87d7a0 <c_body>, 
    body_data=body_data@entry=0x7f2759a48d70, handler=handler@entry=0x7f275c87db80 <c_handler>, 
    handler_data=handler_data@entry=0x7f2759a48d70, 
    pre_unwind_handler=pre_unwind_handler@entry=0x7f275c87d930 <pre_unwind_handler>, pre_unwind_handler_data=0x26d5040)
    at continuations.c:455
#15 0x00007f275c87df85 in scm_c_with_continuation_barrier (func=<optimized out>, data=<optimized out>) at continuations.c:551
#16 0x00007f275c8f738c in with_guile_and_parent (base=0x7f2759a48dd0, data=0x7f2759a48e00) at threads.c:906
#17 0x00007f275c5ce172 in GC_call_with_stack_base () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#18 0x00007f275c8f6d4c in scm_i_with_guile_and_parent (parent=<optimized out>, data=0x7fff4246a800, 
    func=0x7f275c8f7b00 <really_launch>) at threads.c:949
#19 launch_thread (d=0x7fff4246a800) at threads.c:1017
#20 0x00007f275c5d2ec3 in GC_inner_start_routine () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#21 0x00007f275c5ce172 in GC_call_with_stack_base () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#22 0x00007f275c39f052 in start_thread () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libpthread.so.0
#23 0x00007f275add3b7d in clone () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libc.so.6

Thread 4 (Thread 0x7f275cdcf740 (LWP 30798)):
#0  0x00007f275ad6ad0c in malloc () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libc.so.6
#1  0x00007f275c921eb8 in re_node_set_alloc (size=0, set=0x2ce6f80) at regex_internal.c:976
#2  register_state (dfa=0x2cdf8e0, newstate=newstate@entry=0x2ce6f60, hash=hash@entry=23) at regex_internal.c:1575
#3  0x00007f275c9252f3 in create_cd_newstate (hash=<optimized out>, context=1, nodes=0x2ce6f60, dfa=0x2) at regex_internal.c:1734
#4  re_acquire_state_context (err=err@entry=0x7fff4246a730, dfa=dfa@entry=0x2cdf8e0, nodes=nodes@entry=0x7fff4246a740, 
    context=context@entry=1) at regex_internal.c:1554
#5  0x00007f275c92d8a3 in create_initial_state (dfa=0x2cdf8e0) at regcomp.c:1084
#6  re_compile_internal (preg=preg@entry=0x29b0540, pattern=pattern@entry=0x2cddf80 "^http://([^/]+)/(.*)$", 
    length=<optimized out>, syntax=syntax@entry=242428) at regcomp.c:837
#7  0x00007f275c92e350 in rpl_regcomp (preg=preg@entry=0x29b0540, pattern=pattern@entry=0x2cddf80 "^http://([^/]+)/(.*)$", 
    cflags=cflags@entry=1) at regcomp.c:506
#8  0x00007f275c91b2cf in scm_make_regexp (pat=0x28c5120, flags=<optimized out>) at regex-posix.c:166
#9  0x00007f275c90fa28 in vm_regular_engine (vm=<optimized out>, program=0x7f275cbac590 <scm_make_regexp.subr_raw_cell>, 
    argv=<optimized out>, nargs=2) at vm-i-system.c:855
#10 0x00007f275c90fa3d in vm_regular_engine (vm=<optimized out>, program=0x26c64c0, argv=<optimized out>, nargs=1)
    at vm-i-system.c:852
#11 0x00007f275c8874a3 in scm_primitive_eval (exp=exp@entry=0x28bbbb0) at eval.c:692
#12 0x00007f275c887503 in scm_eval (exp=0x28bbbb0, module_or_state=module_or_state@entry=0x2890c60) at eval.c:726
#13 0x00007f275c8d662d in scm_shell (argc=2, argv=0x7fff4246b1c8) at script.c:439
#14 0x00007f275c8a398d in invoke_main_func (body_data=0x7fff4246b090) at init.c:336
#15 0x00007f275c87d7aa in c_body (d=0x7fff4246afd0) at continuations.c:517
#16 0x00007f275c90fa28 in vm_regular_engine (vm=<optimized out>, program=0x26d0040, argv=<optimized out>, nargs=2)
    at vm-i-system.c:855
#17 0x00007f275c886fe3 in scm_call_4 (proc=0x27d8c30, arg1=arg1@entry=0x404, arg2=<optimized out>, arg3=<optimized out>, 
    arg4=<optimized out>) at eval.c:507
#18 0x00007f275c8f9999 in scm_catch_with_pre_unwind_handler (key=key@entry=0x404, thunk=<optimized out>, handler=<optimized out>, 
    pre_unwind_handler=<optimized out>) at throw.c:73
#19 0x00007f275c8f9a9f in scm_c_catch (tag=tag@entry=0x404, body=body@entry=0x7f275c87d7a0 <c_body>, 
    body_data=body_data@entry=0x7fff4246afd0, handler=handler@entry=0x7f275c87db80 <c_handler>, 
    handler_data=handler_data@entry=0x7fff4246afd0, 
    pre_unwind_handler=pre_unwind_handler@entry=0x7f275c87d930 <pre_unwind_handler>, 
    pre_unwind_handler_data=pre_unwind_handler_data@entry=0x26d5040) at throw.c:207
#20 0x00007f275c87deef in scm_i_with_continuation_barrier (body=body@entry=0x7f275c87d7a0 <c_body>, 
    body_data=body_data@entry=0x7fff4246afd0, handler=handler@entry=0x7f275c87db80 <c_handler>, 
    handler_data=handler_data@entry=0x7fff4246afd0, 
    pre_unwind_handler=pre_unwind_handler@entry=0x7f275c87d930 <pre_unwind_handler>, pre_unwind_handler_data=0x26d5040)
    at continuations.c:455
#21 0x00007f275c87df85 in scm_c_with_continuation_barrier (func=<optimized out>, data=<optimized out>) at continuations.c:551
#22 0x00007f275c8f738c in with_guile_and_parent (base=0x7fff4246b030, data=0x7fff4246b060) at threads.c:906
#23 0x00007f275c5ce172 in GC_call_with_stack_base () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#24 0x00007f275c8f7748 in scm_i_with_guile_and_parent (parent=<optimized out>, data=data@entry=0x7fff4246b060, 
    func=func@entry=0x7f275c8a3970 <invoke_main_func>) at threads.c:949
#25 scm_with_guile (func=func@entry=0x7f275c8a3970 <invoke_main_func>, data=data@entry=0x7fff4246b090) at threads.c:955
#26 0x00007f275c8a3b25 in scm_boot_guile (argc=argc@entry=2, argv=argv@entry=0x7fff4246b1c8, 
    main_func=main_func@entry=0x400ff0 <inner_main>, closure=closure@entry=0x0) at init.c:319
#27 0x0000000000400eb4 in main (argc=2, argv=0x7fff4246b1c8) at guile.c:108

Thread 3 (Thread 0x7f275aaeb700 (LWP 30823)):
#0  0x00007f275c3a574c in __lll_lock_wait () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libpthread.so.0
#1  0x00007f275c3a1417 in _L_lock_913 () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libpthread.so.0
#2  0x00007f275c3a1240 in pthread_mutex_lock () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libpthread.so.0
#3  0x00007f275c8f5a78 in lookup_interned_symbol (raw_hash=5431120, name=0x2c34e40) at symbols.c:112
#4  scm_i_str2symbol (str=0x2c34e40) at symbols.c:210
#5  0x00007f275c90fa3d in vm_regular_engine (vm=<optimized out>, program=0x7f275cba9768 <scm_string_to_symbol.subr_raw_cell>, 
    argv=<optimized out>, nargs=1) at vm-i-system.c:852
#6  0x00007f275c8f7b80 in really_launch (d=0x7fff4246a800) at threads.c:1005
#7  0x00007f275c87d7aa in c_body (d=0x7f275aaead70) at continuations.c:517
#8  0x00007f275c90fa28 in vm_regular_engine (vm=<optimized out>, program=0x26d0040, argv=<optimized out>, nargs=2)
    at vm-i-system.c:855
#9  0x00007f275c886fe3 in scm_call_4 (proc=0x27d8c30, arg1=arg1@entry=0x404, arg2=<optimized out>, arg3=<optimized out>, 
    arg4=<optimized out>) at eval.c:507
#10 0x00007f275c8f9999 in scm_catch_with_pre_unwind_handler (key=key@entry=0x404, thunk=<optimized out>, handler=<optimized out>, 
    pre_unwind_handler=<optimized out>) at throw.c:73
#11 0x00007f275c8f9a9f in scm_c_catch (tag=tag@entry=0x404, body=body@entry=0x7f275c87d7a0 <c_body>, 
    body_data=body_data@entry=0x7f275aaead70, handler=handler@entry=0x7f275c87db80 <c_handler>, 
    handler_data=handler_data@entry=0x7f275aaead70, 
    pre_unwind_handler=pre_unwind_handler@entry=0x7f275c87d930 <pre_unwind_handler>, 
    pre_unwind_handler_data=pre_unwind_handler_data@entry=0x26d5040) at throw.c:207
#12 0x00007f275c87deef in scm_i_with_continuation_barrier (body=body@entry=0x7f275c87d7a0 <c_body>, 
    body_data=body_data@entry=0x7f275aaead70, handler=handler@entry=0x7f275c87db80 <c_handler>, 
    handler_data=handler_data@entry=0x7f275aaead70, 
    pre_unwind_handler=pre_unwind_handler@entry=0x7f275c87d930 <pre_unwind_handler>, pre_unwind_handler_data=0x26d5040)
    at continuations.c:455
#13 0x00007f275c87df85 in scm_c_with_continuation_barrier (func=<optimized out>, data=<optimized out>) at continuations.c:551
#14 0x00007f275c8f738c in with_guile_and_parent (base=0x7f275aaeadd0, data=0x7f275aaeae00) at threads.c:906
#15 0x00007f275c5ce172 in GC_call_with_stack_base () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#16 0x00007f275c8f6d4c in scm_i_with_guile_and_parent (parent=<optimized out>, data=0x7fff4246a800, 
    func=0x7f275c8f7b00 <really_launch>) at threads.c:949
#17 launch_thread (d=0x7fff4246a800) at threads.c:1017
#18 0x00007f275c5d2ec3 in GC_inner_start_routine () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#19 0x00007f275c5ce172 in GC_call_with_stack_base () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#20 0x00007f275c39f052 in start_thread () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libpthread.so.0
#21 0x00007f275add3b7d in clone () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libc.so.6

Thread 2 (Thread 0x7f275a29a700 (LWP 30824)):
#0  re_node_set_insert (set=0x7f275a299500, elem=18) at regex_internal.c:1284
#1  0x00007f275c928e53 in build_sifted_states (cur_dest=0x7f275a299500, str_idx=30, sctx=0x7f275a299640, mctx=0x7f275a299680)
    at regexec.c:1733
#2  sift_states_backward (mctx=mctx@entry=0x7f275a299680, sctx=sctx@entry=0x7f275a299640) at regexec.c:1662
#3  0x00007f275c929c6f in prune_impossible_nodes (mctx=0x7f275a299680) at regexec.c:1036
#4  re_search_internal (preg=preg@entry=0x29b0e40, 
    string=0x7f274c0f6f80 "http://64109hydra.gnu.org/nar/0did57blsaaspj49cl3q8nnydm5pr1qg-cflow-1.485412", 
    length=length@entry=77, start=start@entry=0, last_start=0, last_start@entry=77, stop=stop@entry=77, nmatch=9, 
    pmatch=0x7f274c0f7ac0, eflags=0) at regexec.c:873
#5  0x00007f275c92e556 in rpl_regexec (preg=0x29b0e40, 
    string=string@entry=0x7f274c0f6f80 "http://64109hydra.gnu.org/nar/0did57blsaaspj49cl3q8nnydm5pr1qg-cflow-1.485412", 
    nmatch=nmatch@entry=9, pmatch=pmatch@entry=0x7f274c0f7ac0, eflags=0) at regexec.c:252
#6  0x00007f275c91b473 in scm_regexp_exec (rx=0x29c8a50, str=0x2c36fa0, start=<optimized out>, flags=0x2) at regex-posix.c:288
#7  0x00007f275c90f9f2 in vm_regular_engine (vm=<optimized out>, program=0x7f275cbac570 <scm_regexp_exec.subr_raw_cell>, 
    argv=<optimized out>, nargs=4) at vm-i-system.c:861
#8  0x00007f275c8f7b80 in really_launch (d=0x7fff4246a800) at threads.c:1005
#9  0x00007f275c87d7aa in c_body (d=0x7f275a299d70) at continuations.c:517
#10 0x00007f275c90fa28 in vm_regular_engine (vm=<optimized out>, program=0x26d0040, argv=<optimized out>, nargs=2)
    at vm-i-system.c:855
#11 0x00007f275c886fe3 in scm_call_4 (proc=0x27d8c30, arg1=arg1@entry=0x404, arg2=<optimized out>, arg3=<optimized out>, 
    arg4=<optimized out>) at eval.c:507
#12 0x00007f275c8f9999 in scm_catch_with_pre_unwind_handler (key=key@entry=0x404, thunk=<optimized out>, handler=<optimized out>, 
    pre_unwind_handler=<optimized out>) at throw.c:73
#13 0x00007f275c8f9a9f in scm_c_catch (tag=tag@entry=0x404, body=body@entry=0x7f275c87d7a0 <c_body>, 
    body_data=body_data@entry=0x7f275a299d70, handler=handler@entry=0x7f275c87db80 <c_handler>, 
    handler_data=handler_data@entry=0x7f275a299d70, 
    pre_unwind_handler=pre_unwind_handler@entry=0x7f275c87d930 <pre_unwind_handler>, 
    pre_unwind_handler_data=pre_unwind_handler_data@entry=0x26d5040) at throw.c:207
#14 0x00007f275c87deef in scm_i_with_continuation_barrier (body=body@entry=0x7f275c87d7a0 <c_body>, 
    body_data=body_data@entry=0x7f275a299d70, handler=handler@entry=0x7f275c87db80 <c_handler>, 
    handler_data=handler_data@entry=0x7f275a299d70, 
    pre_unwind_handler=pre_unwind_handler@entry=0x7f275c87d930 <pre_unwind_handler>, pre_unwind_handler_data=0x26d5040)
    at continuations.c:455
#15 0x00007f275c87df85 in scm_c_with_continuation_barrier (func=<optimized out>, data=<optimized out>) at continuations.c:551
#16 0x00007f275c8f738c in with_guile_and_parent (base=0x7f275a299dd0, data=0x7f275a299e00) at threads.c:906
#17 0x00007f275c5ce172 in GC_call_with_stack_base () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#18 0x00007f275c8f6d4c in scm_i_with_guile_and_parent (parent=<optimized out>, data=0x7fff4246a800, 
    func=0x7f275c8f7b00 <really_launch>) at threads.c:949
#19 launch_thread (d=0x7fff4246a800) at threads.c:1017
#20 0x00007f275c5d2ec3 in GC_inner_start_routine () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#21 0x00007f275c5ce172 in GC_call_with_stack_base () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#22 0x00007f275c39f052 in start_thread () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libpthread.so.0
#23 0x00007f275add3b7d in clone () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libc.so.6

Thread 1 (Thread 0x7f27591f8700 (LWP 30826)):
#0  0x00007f275c5cee7b in GC_build_fl4 () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#1  0x00007f275c5cf085 in GC_new_hblk () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#2  0x00007f275c5c4882 in GC_allocobj () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#3  0x00007f275c5c9320 in GC_generic_malloc_inner () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#4  0x00007f275c5c93fd in GC_generic_malloc () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#5  0x00007f275c5c9689 in GC_core_malloc_atomic () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#6  0x00007f275c8ee3c4 in make_stringbuf (len=4) at strings.c:129
#7  0x00007f275c8efbf5 in scm_i_string_start_writing (orig_str=0x2c25360) at strings.c:573
#8  0x00007f275c8e4ccf in string_downcase_x (v=<optimized out>, start=start@entry=0, end=end@entry=4) at srfi-13.c:2169
#9  0x00007f275c8e50d8 in string_downcase_x (end=4, start=0, v=<optimized out>) at srfi-13.c:2167
#10 scm_substring_downcase (str=0x2c25380, start=<optimized out>, end=<optimized out>) at srfi-13.c:2218
#11 0x00007f275c90fa0f in vm_regular_engine (vm=<optimized out>, program=0x7f275cb9ef60 <scm_substring_downcase.subr_raw_cell>, 
    argv=<optimized out>, nargs=3) at vm-i-system.c:858
#12 0x00007f275c8f7b80 in really_launch (d=0x7fff4246a800) at threads.c:1005
#13 0x00007f275c87d7aa in c_body (d=0x7f27591f7d70) at continuations.c:517
#14 0x00007f275c90fa28 in vm_regular_engine (vm=<optimized out>, program=0x26d0040, argv=<optimized out>, nargs=2)
    at vm-i-system.c:855
#15 0x00007f275c886fe3 in scm_call_4 (proc=0x27d8c30, arg1=arg1@entry=0x404, arg2=<optimized out>, arg3=<optimized out>, 
    arg4=<optimized out>) at eval.c:507
#16 0x00007f275c8f9999 in scm_catch_with_pre_unwind_handler (key=key@entry=0x404, thunk=<optimized out>, handler=<optimized out>, 
    pre_unwind_handler=<optimized out>) at throw.c:73
#17 0x00007f275c8f9a9f in scm_c_catch (tag=tag@entry=0x404, body=body@entry=0x7f275c87d7a0 <c_body>, 
    body_data=body_data@entry=0x7f27591f7d70, handler=handler@entry=0x7f275c87db80 <c_handler>, 
    handler_data=handler_data@entry=0x7f27591f7d70, 
    pre_unwind_handler=pre_unwind_handler@entry=0x7f275c87d930 <pre_unwind_handler>, 
    pre_unwind_handler_data=pre_unwind_handler_data@entry=0x26d5040) at throw.c:207
#18 0x00007f275c87deef in scm_i_with_continuation_barrier (body=body@entry=0x7f275c87d7a0 <c_body>, 
    body_data=body_data@entry=0x7f27591f7d70, handler=handler@entry=0x7f275c87db80 <c_handler>, 
    handler_data=handler_data@entry=0x7f27591f7d70, 
    pre_unwind_handler=pre_unwind_handler@entry=0x7f275c87d930 <pre_unwind_handler>, pre_unwind_handler_data=0x26d5040)
    at continuations.c:455
#19 0x00007f275c87df85 in scm_c_with_continuation_barrier (func=<optimized out>, data=<optimized out>) at continuations.c:551
#20 0x00007f275c8f738c in with_guile_and_parent (base=0x7f27591f7dd0, data=0x7f27591f7e00) at threads.c:906
#21 0x00007f275c5ce172 in GC_call_with_stack_base () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#22 0x00007f275c8f6d4c in scm_i_with_guile_and_parent (parent=<optimized out>, data=0x7fff4246a800, 
    func=0x7f275c8f7b00 <really_launch>) at threads.c:949
#23 launch_thread (d=0x7fff4246a800) at threads.c:1017
#24 0x00007f275c5d2ec3 in GC_inner_start_routine () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#25 0x00007f275c5ce172 in GC_call_with_stack_base () from /nix/store/f072ihgps3078d9l71w6c7fz8vway2wy-libgc-7.2d/lib/libgc.so.1
#26 0x00007f275c39f052 in start_thread () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libpthread.so.0
#27 0x00007f275add3b7d in clone () from /nix/store/jwd1hc3i3pmnsxf2347r4k2c77nbr9vw-glibc-2.18/lib/libc.so.6
--8<---------------cut here---------------end--------------->8---

Thanks,
Ludo’.