From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.user Subject: Re: guile 2.0.9 build on mingw Date: Mon, 10 Jun 2013 19:18:05 +0300 Message-ID: <83hah6lz2a.fsf@gnu.org> References: <83sj1hv2ml.fsf@gnu.org> <874ndx9y7h.fsf@pobox.com> <83ip2bt4qk.fsf@gnu.org> <8761xqhyyt.fsf@gnu.org> <83li6mt18y.fsf@gnu.org> <83wqq3mcq9.fsf@gnu.org> <87k3m3kor5.fsf@gnu.org> <87k3m39e8t.fsf@pobox.com> <8738srklvp.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1370881113 5540 80.91.229.3 (10 Jun 2013 16:18:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Jun 2013 16:18:33 +0000 (UTC) Cc: wingo@pobox.com, guile-user@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Jun 10 18:18:33 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Um4nd-0003jR-Oc for guile-user@m.gmane.org; Mon, 10 Jun 2013 18:18:30 +0200 Original-Received: from localhost ([::1]:50523 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um4nd-0007dU-7x for guile-user@m.gmane.org; Mon, 10 Jun 2013 12:18:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um4nT-0007d1-T4 for guile-user@gnu.org; Mon, 10 Jun 2013 12:18:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Um4nP-0004eo-81 for guile-user@gnu.org; Mon, 10 Jun 2013 12:18:19 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:55716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Um4nO-0004ec-Qn; Mon, 10 Jun 2013 12:18:15 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MO600J00QG61B00@a-mtaout20.012.net.il>; Mon, 10 Jun 2013 19:18:03 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MO600IO3QM2VT40@a-mtaout20.012.net.il>; Mon, 10 Jun 2013 19:18:03 +0300 (IDT) In-reply-to: <8738srklvp.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10420 Archived-At: > From: ludo@gnu.org (Ludovic Court=C3=A8s) > Cc: Eli Zaretskii , guile-user@gnu.org > Date: Sun, 09 Jun 2013 23:35:54 +0200 >=20 > Andy Wingo skribis: >=20 > > On Sun 09 Jun 2013 22:33, ludo@gnu.org (Ludovic Court=C3=A8s) wri= tes: > > > >> However, that warning doesn=E2=80=99t take into account the sign= al thread, nor > >> the GC thread (if any). So, although that seems unlikely, there= could > >> still be issues, for instance if the =E2=80=98scm_fork=E2=80= =99 call happens while > >> =E2=80=98signal_delivery_thread_mutex=E2=80=99 is locked. > > > > In theory the signal thread is counted among the threads -- iirc = anyway. >=20 > Apparently no, because =E2=80=98scm_fork=E2=80=99 uses =E2=80=98scm= _all_threads=E2=80=99, which > explicitly =E2=80=9Chides=E2=80=9D the signal thread. >=20 > > The signal-handling thread is kicked off at the first call to sig= action, > > which shouldn't happen there, right? >=20 > Hmm, right, though it can also be spawned from =E2=80=98on_thread_e= xit=E2=80=99. >=20 > A better test would be: >=20 > (use-modules (ice-9 match)) > (sigaction SIGINT) > (match (primitive-fork) > (0 (gc) (primitive-exit 0)) > (child > (waitpid child) > (exit 0))) Are you sure the above is relevant to Windows? You are aware that there's no 'fork' system call on Windows, and no real signals (except SIGINT and SIGSEGV)? Or does Guile emulate 'fork' somehow? Anyway, I tried what you asked. I've put the above into a test.scm script and invoked Guile thusly, from the libguile directory of the source tree: $ GUILE_INSTALL_LOCALE=3D1 GUILE_AUTO_COMPILE=3D0 ../meta/uninstall= ed-env guild test1 Is this the right way of running the above script? Anyway, Guile gets stuck. Attaching GDB shows the info below, I hope it will help you see what is going on. (Thread #3 is the thread started by Windows for attaching the debugger, so disregard it.) If nothing rings the bell, I guess I will try building Guile without threads, maybe I will have better luck that way. (gdb) info threads Id Target Id Frame * 3 Thread 15068.0x32f4 0x77c4000d in ntdll!DbgBreakPoint () =09from C:\Windows\SysWOW64\ntdll.dll 2 Thread 15068.0x32e0 0x77c4f8b1 in ntdll!ZwWaitForSingleOb= ject () =09from C:\Windows\SysWOW64\ntdll.dll 1 Thread 15068.0x3e90 0x77c5013d in ntdll!ZwWaitForMultiple= Objects () =09from C:\Windows\SysWOW64\ntdll.dll (gdb) thread apply all bt Thread 3 (Thread 15068.0x32f4): #0 0x77c4000d in ntdll!DbgBreakPoint () from C:\Windows\SysWOW6= 4\ntdll.dll #1 0x77ccf896 in ntdll!DbgUiRemoteBreakin () =09from C:\Windows\SysWOW64\ntdll.dll #2 0x3a26c959 in ?? () #3 0x00000000 in ?? () Thread 2 (Thread 15068.0x32e0): #0 0x77c4f8b1 in ntdll!ZwWaitForSingleObject () =09from C:\Windows\SysWOW64\ntdll.dll #1 0x77c4f8b1 in ntdll!ZwWaitForSingleObject () =09from C:\Windows\SysWOW64\ntdll.dll #2 0x7744149d in WaitForSingleObjectEx () =09from C:\Windows\syswow64\KernelBase.dll #3 0x0000016c in ?? () #4 0x00000000 in ?? () Thread 1 (Thread 15068.0x3e90): #0 0x77c5013d in ntdll!ZwWaitForMultipleObjects () =09from C:\Windows\SysWOW64\ntdll.dll #1 0x77c5013d in ntdll!ZwWaitForMultipleObjects () =09from C:\Windows\SysWOW64\ntdll.dll #2 0x774415e9 in WaitForMultipleObjectsEx () =09from C:\Windows\syswow64\KernelBase.dll #3 0x00000002 in ?? () #4 0x0028ef38 in ?? () #5 0x75e91a2c in WaitForMultipleObjectsEx () =09from C:\Windows\syswow64\kernel32.dll #6 0x75e94220 in WaitForMultipleObjects () =09from C:\Windows\syswow64\kernel32.dll #7 0x6248b9ec in pthreadCancelableTimedWait () from d:\usr\bin\= pthreadGC2.dll #8 0x6248c6b6 in sem_timedwait () from d:\usr\bin\pthreadGC2.dl= l #9 0x6248cf8b in pthread_cond_wait () from d:\usr\bin\pthreadGC= 2.dll #10 0x00432ecb in scm_pthread_cond_wait (cond=3Dcond@entry=3D0x2= 8f1ac, =09 mutex=3Dmutex@entry=3D0x28f1a8) at threads.c:1990 #11 0x00432f7c in scm_spawn_thread ( =09 body=3Dbody@entry=3D0x436340 , =09 body_data=3Dbody_data@entry=3D0x0, handler=3D0x431794 , =09 handler_data=3Dhandler_data@entry=3D0x4e5a60 ) at threads.c:1143 #12 0x00436318 in start_signal_delivery_thread () at scmsigs.c:2= 00 #13 0x6248b751 in pthread_once () from d:\usr\bin\pthreadGC2.dll #14 0x0043641c in scm_i_ensure_signal_delivery_thread () at scms= igs.c:212 #15 0x0043648f in scm_sigaction_for_thread (signum=3D0xa, handle= r=3D0x904, =09 flags=3D0x904, thread=3D0x23396d8) at scmsigs.c:330 #16 0x00454b5a in vm_regular_engine (vm=3D0x2395c80, program= =3D0x0, =09 argv=3D0x2400308, nargs=3D5121981) at vm-i-system.c:861 #17 0x00414adc in scm_primitive_eval (exp=3D0x2d28188) at eval.c= :685 #18 0x00437b6f in scm_primitive_load (filename=3Dfilename@entry= =3D0x2bad3d0) =09 at load.c:132 #19 0x004386f8 in scm_primitive_load_path (args=3D0x2d07b10) at = load.c:1050 #20 0x00454b99 in vm_regular_engine (vm=3D0x2395c80, program= =3D0x0, =09 argv=3D0x24002d8, nargs=3D5120951) at vm-i-system.c:852 #21 0x00414adc in scm_primitive_eval (exp=3Dexp@entry=3D0x2e056c= 0) at eval.c:685 #22 0x00414b2f in scm_eval (exp=3D0x2e056c0, =09 module_or_state=3Dmodule_or_state@entry=3D0x2d866c0) at eval.c:71= 9 #23 0x004129fd in scm_shell (argc=3Dargc@entry=3D6, argv=3Dargv@= entry=3D0xa30f78) =09 at script.c:441 #24 0x0040146f in inner_main (closure=3D0x0, argc=3D6, argv=3D0x= a30f78) =09 at guile.c:62 #25 0x00412aec in invoke_main_func (body_data=3D0x28fee0) at ini= t.c:337 #26 0x0045f8ac in c_body (d=3D0x28fe14) at continuations.c:511 #27 0x00454b8b in vm_regular_engine (vm=3D0x2395c80, program= =3D0x0, =09 argv=3D0x240007c, nargs=3D5121210) at vm-i-system.c:855 #28 0x004145f8 in scm_call_4 (proc=3D0x22f6b28, arg1=3Darg1@entr= y=3D0x404, =09 arg2=3Darg2@entry=3D0x2c11d50, arg3=3Darg3@entry=3D0x2c11d20, =09 arg4=3Darg4@entry=3D0x2c11ce0) at eval.c:507 #29 0x004312a2 in scm_catch_with_pre_unwind_handler (key=3D0x404= , =09 thunk=3D0x2c11d50, handler=3D0x2c11d20, pre_unwind_handler=3D0x2c= 11ce0) =09 at throw.c:86 #30 0x0043143e in scm_c_catch (tag=3Dtag@entry=3D0x404, body= =3D0x2c11d50, =09 body@entry=3D0x45f89c , body_data=3D0x2c11d20, =09 body_data@entry=3D0x28fe14, handler=3D0x2c11ce0, =09 handler@entry=3D0x45fb50 , =09 handler_data=3Dhandler_data@entry=3D0x28fe14, =09 pre_unwind_handler=3Dpre_unwind_handler@entry=3D0x45f9bc , pre_unwind_handler_data=3Dpre_unwind_handler_data@entry= =3D0x2395c40) =09 at throw.c:213 #31 0x0045ff3b in scm_i_with_continuation_barrier ( =09 body=3Dbody@entry=3D0x45f89c , body_data=3Dbody_data@entr= y=3D0x28fe14, =09 handler=3Dhandler@entry=3D0x45fb50 , =09 handler_data=3Dhandler_data@entry=3D0x28fe14, =09 pre_unwind_handler=3Dpre_unwind_handler@entry=3D0x45f9bc , pre_unwind_handler_data=3D0x2395c40) at continuations.c= :449 #32 0x0045ffcc in scm_c_with_continuation_barrier ( =09 func=3D0x412abc , data=3D0x28fee0) at continuat= ions.c:545 #33 0x004326a5 in with_guile_and_parent (base=3D0x28fe8c, data= =3D0x28feb4) =09 at threads.c:908 #34 0x709cae6f in ?? () from d:\usr\bin\libgc-1.dll #35 0x004328e0 in scm_i_with_guile_and_parent (parent=3D, =09 data=3D0x28fee0, data@entry=3D0x28feb0, =09 func=3Dfunc@entry=3D0x412abc ) at threads.c:951 #36 scm_with_guile (func=3Dfunc@entry=3D0x412abc , =09 data=3Ddata@entry=3D0x28fee0) at threads.c:957 #37 0x00412bf7 in scm_boot_guile (argc=3Dargc@entry=3D6, =09 argv=3Dargv@entry=3D0xa30f78, =09 main_func=3Dmain_func@entry=3D0x4013d4 , =09 closure=3Dclosure@entry=3D0x0) at init.c:320 #38 0x004c631f in main (argc=3D6, argv=3D0xa30f78) at guile.c:10= 8 (gdb)