From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#10655: [2.0.3+] =?UTF-8?Q?=E2=80=98queue=5Fafter=5Fgc=5Fhook=E2=80=99?= called during thread startup leads to SIGSEGV Date: Mon, 30 Jan 2012 16:26:39 +0100 Message-ID: <87y5spxlcg.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327937283 571 80.91.229.3 (30 Jan 2012 15:28:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 30 Jan 2012 15:28:03 +0000 (UTC) To: 10655@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Jan 30 16:28:02 2012 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rrt9F-0000C8-4w for guile-bugs@m.gmane.org; Mon, 30 Jan 2012 16:28:01 +0100 Original-Received: from localhost ([::1]:51468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrt9E-0000xv-Oa for guile-bugs@m.gmane.org; Mon, 30 Jan 2012 10:28:00 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrt98-0000xp-B3 for bug-guile@gnu.org; Mon, 30 Jan 2012 10:27:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rrt96-00047C-0b for bug-guile@gnu.org; Mon, 30 Jan 2012 10:27:54 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrt95-00046w-V0 for bug-guile@gnu.org; Mon, 30 Jan 2012 10:27:51 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rrt9F-0004nE-Sm for bug-guile@gnu.org; Mon, 30 Jan 2012 10:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 30 Jan 2012 15:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10655 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.132793723418358 (code B ref -1); Mon, 30 Jan 2012 15:28:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Jan 2012 15:27:14 +0000 Original-Received: from localhost ([127.0.0.1]:45319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rrt8T-0004m2-Ch for submit@debbugs.gnu.org; Mon, 30 Jan 2012 10:27:14 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:36908) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rrt8Q-0004lp-LK for submit@debbugs.gnu.org; Mon, 30 Jan 2012 10:27:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rrt85-0003z0-Ah for submit@debbugs.gnu.org; Mon, 30 Jan 2012 10:26:55 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:41109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrt85-0003yv-8f for submit@debbugs.gnu.org; Mon, 30 Jan 2012 10:26:49 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:55126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrt83-0000x5-V8 for bug-guile@gnu.org; Mon, 30 Jan 2012 10:26:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rrt7x-0003xA-NM for bug-guile@gnu.org; Mon, 30 Jan 2012 10:26:47 -0500 Original-Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:45970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrt7x-0003x3-9D for bug-guile@gnu.org; Mon, 30 Jan 2012 10:26:41 -0500 X-IronPort-AV: E=Sophos;i="4.71,592,1320620400"; d="scan'208";a="129421071" Original-Received: from unknown (HELO pluto) ([193.50.110.167]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 30 Jan 2012 16:26:39 +0100 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 =?UTF-8?Q?Pluvi=C3=B4se?= an 220 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6113 Archived-At: Hi! I=E2=80=99ve just captured the following backtrace on x86_64-linux-gnu (with v2.0.3-212-g2f3e436): --8<---------------cut here---------------start------------->8--- Core was generated by `/home/ludo/soft/bin/guile -e (@@ (guild) main) -s /h= ome/ludo/soft/bin/guile-too'.=20 Program terminated with signal 11, Segmentation fault. #0 queue_after_gc_hook (hook_data=3D, fn_data=3D, data=3D) at gc.c:737 737 SCM_SETCDR (after_gc_async_cell, t->active_asyncs); (gdb) thread apply all bt Thread 2 (Thread 27824): #0 0x00007f236e50b930 in sem_wait () from /nix/store/vxycd107wjbhcj720hzkw2px7s7kr724-glibc-2.12.2/lib/libpth= read.so.0 #1 0x00007f236e73abe8 in GC_pthread_create (new_thread=3D0x7fff1406fce8, a= ttr=3D0x0, start_routine=3D0x7f236ea5aa10 , arg=3D0x7fff1406fc60) at= pthread_support.c:1582 #2 0x00007f236ea5b71c in scm_spawn_thread (body=3D, body_data=3D, handler=3D0x7f236ea5da90 , handler_data=3D0x7f236ea9bb48) at threads.c:1125 #3 0x00007f236ea37f61 in start_signal_delivery_thread () at scmsigs.c:208 #4 0x00007f236e50ac83 in pthread_once () from /nix/store/vxycd107wjbhcj720hzkw2px7s7kr724-glibc-2.12.2/lib/libpth= read.so.0 #5 0x00007f236ea3814a in scm_sigaction_for_thread (signum=3D, handler=3D0x6, flags=3D0x904, thread=3D0x23bae40) at scmsigs.c:338 #6 0x00007f236ea39216 in scm_system_star (args=3D) at= simpos.c:133 #7 0x00007f236ea71e4b in vm_regular_engine (vm=3D0x2441740, program=3D0x24= cfa20, argv=3D0x24458c8, nargs=3D-1) at vm-i-system.c:892 #8 0x00007f236e9eb9b3 in scm_primitive_eval (exp=3D0x2a98340) at eval.c:639 #9 0x00007f236ea0deab in scm_primitive_load (filename=3D) at load.c:131 #10 0x00007f236ea0e316 in scm_primitive_load_path (args=3D) at load.c:954 #11 0x00007f236ea71e4b in vm_regular_engine (vm=3D0x2441740, program=3D0x29= bd820, argv=3D0x24452f0, nargs=3D-1) at vm-i-system.c:892 #12 0x00007f236ea0e4a8 in scm_primitive_load_path (args=3D) at load.c:913 #13 0x00007f236ea71e4b in vm_regular_engine (vm=3D0x2441740, program=3D0x29= afa20, argv=3D0x2445020, nargs=3D-1) at vm-i-system.c:892 #14 0x00007f236ea0e4a8 in scm_primitive_load_path (args=3D) at load.c:913 #15 0x00007f236ea71e4b in vm_regular_engine (vm=3D0x2441740, program=3D0x29= 955e0, argv=3D0x2444d50, nargs=3D-1) at vm-i-system.c:892 #16 0x00007f236ea0e4a8 in scm_primitive_load_path (args=3D) at load.c:913 #17 0x00007f236ea71e4b in vm_regular_engine (vm=3D0x2441740, program=3D0x24= cfa20, argv=3D0x2444a80, nargs=3D-1) at vm-i-system.c:892 #18 0x00007f236e9eb9b3 in scm_primitive_eval (exp=3D0x260e790) at eval.c:639 #19 0x00007f236e9eba13 in scm_eval (exp=3D0x260e790, module_or_state=3D0x25= f1d80) at eval.c:673 #20 0x00007f236ea390cf in scm_shell (argc=3D17, argv=3D0x7fff140712e8) at s= cript.c:441 #21 0x00007f236ea0814d in invoke_main_func (body_data=3D0x7fff140711d0) at = init.c:336 #22 0x00007f236e9e221a in c_body (d=3D0x7fff14071120) at continuations.c:512 #23 0x00007f236ea71eea in vm_regular_engine (vm=3D0x2441740, program=3D0x25= 2ea50, argv=3D0x24440c0, nargs=3D-1) at vm-i-system.c:960 #24 0x00007f236e9eb683 in scm_call_4 (proc=3D0x252ea50, arg1=3D, arg2=3D, arg3=3D, arg4=3D) at eval.c:506 #25 0x00007f236e9e2a03 in scm_i_with_continuation_barrier (body=3D0x7f236e9= e2210 , body_data=3D0x7fff14071120, handler=3D0x7f236e9e25e0 , handl= er_data=3D0x7fff14071120, pre_unwind_handler=3D, pre_unwind_handler_data=3D<= value optimized out>) at continuations.c:450 #26 0x00007f236e9e2ab5 in scm_c_with_continuation_barrier (func=3D, data=3D) at continuations.c:546 #27 0x00007f236ea5ae2a in with_guile_and_parent (base=3D0x7fff14071180, dat= a=3D) at threads.c:902 #28 0x00007f236e7348d5 in GC_call_with_stack_base (fn=3D, arg=3D) at misc.c:1535 #29 0x00007f236ea5afd8 in scm_i_with_guile_and_parent (func=3D, data=3D) at threads.c:945 #30 scm_with_guile (func=3D, data=3D) at threads.c:951 #31 0x00007f236ea08255 in scm_boot_guile (argc=3D, arg= v=3D, main_func=3D, closure=3D) at = init.c:319 #32 0x0000000000400b3a in main (argc=3D, argv=3D) at guile.c:71 Thread 1 (Thread 27825): #0 queue_after_gc_hook (hook_data=3D, fn_data=3D, data=3D) at gc.c:737 #1 0x00007f236ea0518c in scm_c_hook_run (hook=3D0x7f236ed00a10, data=3D0x0= ) at hooks.c:103 #2 0x00007f236e729951 in GC_notify_full_gc (stop_func=3D0x7f236e728e00 ) at alloc.c:334 #3 GC_try_to_collect_inner (stop_func=3D0x7f236e728e00 ) at alloc.c:429 #4 GC_try_to_collect_inner (stop_func=3D0x7f236e728e00 ) at alloc.c:410 #5 0x00007f236e72a65e in GC_collect_or_expand (needed_blocks=3D1, ignore_o= ff_page=3D0, retry=3D) at alloc.c:1215 #6 0x00007f236e72a7c6 in GC_allocobj (gran=3D42, kind=3D1) at alloc.c:1302 #7 0x00007f236e72f61a in GC_generic_malloc_inner (lb=3D664, k=3D1) at mall= oc.c:121 #8 0x00007f236e739aff in GC_new_thread (id=3D139790027667200) at pthread_s= upport.c:478 #9 0x00007f236e739fb7 in GC_register_my_thread_inner (sb=3D0x7f2366f12ed0, my_pthread=3D) at pthread_support.c:1358 #10 0x00007f236e73a167 in GC_start_rtn_prepare_thread (pstart=3D0x7f2366f12= eb0, pstart_arg=3D0x7f2366f12eb8, sb=3D0x7f2366f12ed0, arg=3D0x2aa1fc0) at p= thread_support.c:1449 #11 0x00007f236e739993 in GC_inner_start_routine (sb=3D, arg=3D) at pthread_start.c:50 #12 0x00007f236e7348d5 in GC_call_with_stack_base (fn=3D, arg=3D) at misc.c:1535 #13 0x00007f236e504cec in start_thread () from /nix/store/vxycd107wjbhcj720hzkw2px7s7kr724-glibc-2.12.2/lib/libpth= read.so.0 #14 0x00007f236d0111ed in clone () from /nix/store/vxycd107wjbhcj720hzkw2px7s7kr724-glibc-2.12.2/lib/libc.s= o.6 --8<---------------cut here---------------end--------------->8--- The problems seems to be that the after-gc-hook runs while the thread is being created and not yet a full-blown Guile thread. Thanks, Ludo=E2=80=99.