guile: build fails due to small thread stack
build of guile-2.2.2 fails during bootstrap due to small thread stack size and recursive function in garbage collection. It seems to happen more often on 32 bit architectures.
backtrace:
#0 0xe83d4795 in GC_call_with_alloc_lock () from /usr/lib/libgc.so.1
#1 0xe84d7503 in copy_weak_entry (dst=0xe7b09060, src=0xe640d5dc)
at weak-table.c:123
#2 give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=7292)
at weak-table.c:286
#3 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=7291)
at weak-table.c:291
#4 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=7290)
at weak-table.c:291
...
...
#859 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6272)
at weak-table.c:291
#860 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6271)
at weak-table.c:291
#861 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=6270,
k@entry=6269) at weak-table.c:291
#862 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6268)
at weak-table.c:291
#863 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6267)
at weak-table.c:291
#864 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6266)
at weak-table.c:291
#865 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6265)
at weak-table.c:291
#866 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6264)
at weak-table.c:291
#867 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6263)
at weak-table.c:291
#868 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6262)
at weak-table.c:291
#869 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6261)
at weak-table.c:291
#870 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6260)
at weak-table.c:291
#871 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6259)
at weak-table.c:291
#872 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6258)
at weak-table.c:291
#873 0xe84d7561 in give_to_poor (table=table@entry=0xe81b0e00, k=k@entry=6257)
at weak-table.c:291
#874 0xe84d7d9b in vacuum_weak_table (table=0xe81b0e00) at weak-table.c:562
#875 do_vacuum_weak_table (table=<optimized out>) at weak-table.c:829
#876 scm_i_visit_weak_list (list_loc=0xe856ad04 <all_weak_tables>,
visit=<optimized out>) at ../libguile/weak-list.h:57
#877 vacuum_all_weak_tables () at weak-table.c:843
#878 0xe8454777 in async_gc_finalizer (ptr=0xe81b2fa8, data=0x0)
at finalizers.c:305
#879 0xe83cedc1 in GC_invoke_finalizers () from /usr/lib/libgc.so.1
#880 0xe8454d94 in scm_run_finalizers () at finalizers.c:387
#881 0xe8454e0d in finalization_thread_proc (unused=0x0) at finalizers.c:223
#882 0xe844489d in c_body (d=0xe7b1dc10) at continuations.c:422
#883 0xe84d21f7 in vm_regular_engine (thread=0xe81afd10, vp=0xe8017f30,
registers=0xe7b1d970, resume=0) at vm-engine.c:784
#884 0xe84d5328 in scm_call_n (proc=0xe80312e0, argv=0x0, nargs=0) at vm.c:1257
#885 0xe844a9fc in scm_call_0 (proc=0xe80312e0) at eval.c:481
#886 0xe84c144c in catch (tag=0x404, thunk=0xe80312e0, handler=0xe80312c0,
pre_unwind_handler=0xe80312b0) at throw.c:137
#887 0xe84c17e5 in scm_catch_with_pre_unwind_handler (key=0x404,
thunk=0xe80312e0, handler=0xe80312c0, pre_unwind_handler=0xe80312b0)
at throw.c:254
#888 0xe84c19be in scm_c_catch (tag=0x404, body=0xe8444890 <c_body>,
body_data=0xe7b1dc10, handler=0xe8444b80 <c_handler>,
handler_data=0xe7b1dc10,
pre_unwind_handler=0xe84449a0 <pre_unwind_handler>,
pre_unwind_handler_data=0xe8014980) at throw.c:377
#889 0xe8444f08 in scm_i_with_continuation_barrier (body=0xe8444890 <c_body>,
body_data=0xe7b1dc10, handler=0xe8444b80 <c_handler>,
handler_data=0xe7b1dc10,
pre_unwind_handler=0xe84449a0 <pre_unwind_handler>,
pre_unwind_handler_data=0xe8014980) at continuations.c:360
#890 0xe8444ff3 in scm_c_with_continuation_barrier (
func=0xe8454da0 <finalization_thread_proc>, data=0x0)
at continuations.c:456
#891 0xe84bfc0e in with_guile (base=0xe7b1dc88, data=0xe7b1dcb0)
at threads.c:660
#892 0xe83d4806 in GC_call_with_stack_base () from /usr/lib/libgc.so.1
#893 0xe84c0066 in scm_i_with_guile (dynamic_state=<optimized out>, data=0x0,
func=0xe8454da0 <finalization_thread_proc>) at threads.c:703
#894 scm_with_guile (func=0xe8454da0 <finalization_thread_proc>, data=0x0)
at threads.c:709
#895 0xe84548cf in run_finalization_thread (arg=0x0) at finalizers.c:236
#896 0xe85c0152 in start (p=0xe7b1dd50) at src/thread/pthread_create.c:145
#897 0xe85beea1 in __clone () at src/thread/i386/clone.s:36
#898 0x00000000 in ?? ()
(from redmine: issue id 7919, created on 2017-09-27, closed on 2019-05-03)
- Changesets:
- Revision 4a121590 by Natanael Copa on 2017-09-27T06:57:33Z:
main/guile: fix bootstrap failure
the garbage collector uses recursive functions while bootstrapping the
build and runs out of stack space. Fix it by explicitly set thread stack
size when creating the thread.
fixes #7919