From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12867 invoked by alias); 13 May 2014 15:53:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 12848 invoked by uid 89); 13 May 2014 15:53:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: hera.aquilenet.fr Received: from hera.aquilenet.fr (HELO hera.aquilenet.fr) (141.255.128.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 May 2014 15:53:32 +0000 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id DBEB328E1; Tue, 13 May 2014 17:53:28 +0200 (CEST) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VQamJ2411We8; Tue, 13 May 2014 17:53:28 +0200 (CEST) Received: from pluto (pluto.bordeaux.inria.fr [193.50.110.57]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 7466F2784; Tue, 13 May 2014 17:53:28 +0200 (CEST) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Eli Zaretskii Cc: xdje42@gmail.com, tillmann@selfnet.de, gdb-patches@sourceware.org, wingo@pobox.com Subject: Re: GDB-Guile vs. libgc 7.4 marker threads References: <83ha54zrry.fsf@gnu.org> <87wqdr1l61.fsf_-_@gnu.org> <83lhu7t8u9.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 23 =?utf-8?Q?Flor=C3=A9al?= an 222 de la =?utf-8?Q?R?= =?utf-8?Q?=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 Date: Tue, 13 May 2014 15:53:00 -0000 Message-ID: <8738gdisjr.fsf@inria.fr> User-Agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2014-05/txt/msg00161.txt.bz2 Eli Zaretskii skribis: >> From: ludo@gnu.org (Ludovic Court=C3=A8s) >> Cc: Eli Zaretskii , Tillmann Karras = , "gdb-patches\@sourceware.org" , Andy Wingo <= wingo@pobox.com> >> Date: Mon, 12 May 2014 10:00:22 +0200 >>=20 >> > https://lists.gnu.org/archive/html/guile-commits/2014-04/msg00051.html >>=20 >> Yes, but note that this commit is for Guile 2.2. >>=20 >> That said, although Guile 2.0 builds and runs fine with 7.4 > > Are you saying that Guile 2.0.x does not suffer from the bug in > libgc-7.4.0? Yes, in my experience. >> I noticed that GDB-Guile is confused when there are several marker >> threads. Thus, we have to set GC_MARKERS=3D1 when running Guile-GDB >> with Guile 2.0 on libgc 7.4. > > Are you sure this confusion is related to the same libgc issue? What I know is that setting GC_MARKERS=3D1 allows GDB-Guile with libgc 7.4.0 to work flawlessly, whereas it otherwise hangs when not doing that. For instance, with GC_MARKERS unset (my machine has 4 cores, so libgc spawns 3 marker threads), I can run: --8<---------------cut here---------------start------------->8--- $ ./gdb --args guile GNU gdb (GDB) 7.7.50.20140505-cvs Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from guile...done. (gdb) r Starting program: /home/ludo/soft/bin/guile=20 warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/gnu/store/hf5kklv837xbfcv6gc7gpsj36l69j3s= j-glibc-2.19/lib/libthread_db.so.1". --8<---------------cut here---------------end--------------->8--- and it hangs right here. The backtrace of gdb at this point is: --8<---------------cut here---------------start------------->8--- (gdb) bt #0 0x00007f0e5e4717a2 in do_sigsuspend (set=3D0xb702c0 ) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 #1 __GI___sigsuspend (set=3Dset@entry=3D0xb702c0 ) at ../sys= deps/unix/sysv/linux/sigsuspend.c:45 #2 0x0000000000451ced in linux_nat_wait_1 (ops=3D, target_o= ptions=3D0, ourstatus=3D0x7fffee48a910,=20 ptid=3D...) at linux-nat.c:3418 #3 linux_nat_wait (ops=3D, ptid=3D..., ourstatus=3D0x7fffee= 48a910, target_options=3D0) at linux-nat.c:3654 #4 0x0000000000458d66 in thread_db_wait (ops=3D, ptid=3D...= , ourstatus=3D0x7fffee48a910, options=3D0) at linux-thread-db.c:1486 #5 0x000000000056f59d in delegate_wait (self=3D, arg1=3D...= , arg2=3D,=20 arg3=3D) at target-delegates.c:60 #6 0x0000000000576d33 in target_wait (ptid=3D..., status=3Dstatus@entry=3D= 0x7fffee48a910, options=3Doptions@entry=3D0) at target.c:2103 #7 0x0000000000540f95 in wait_for_inferior () at infrun.c:2810 #8 0x00000000005411ef in proceed (addr=3D, siggnal=3Dsiggna= l@entry=3DGDB_SIGNAL_0, step=3Dstep@entry=3D0) at infrun.c:2371 #9 0x00000000005367dd in run_command_1 (args=3D0x0, from_tty=3D1, tbreak_a= t_main=3D) at infcmd.c:631 #10 0x000000000060a08b in execute_command (p=3D, p@entry=3D0= x224e6c0 "", from_tty=3D1) at top.c:460 #11 0x00000000005567d5 in command_handler (command=3D0x224e6c0 "") at event= -top.c:437 #12 0x0000000000556db4 in command_line_handler (rl=3D) at ev= ent-top.c:634 #13 0x0000000000650ac0 in rl_callback_read_char () at callback.c:220 #14 0x0000000000556839 in rl_callback_read_char_wrapper (client_data=3D) at event-top.c:166 #15 0x0000000000555441 in process_event () at event-loop.c:342 #16 0x000000000055580a in gdb_do_one_event () at event-loop.c:394 #17 0x0000000000555a5e in start_event_loop () at event-loop.c:431 #18 0x000000000054f453 in captured_command_loop (data=3Ddata@entry=3D0x0) a= t main.c:266 #19 0x000000000054caca in catch_errors (func=3Dfunc@entry=3D0x54f440 ,=20 func_args=3Dfunc_args@entry=3D0x0, errstring=3Derrstring@entry=3D0x7122= 12 "", mask=3Dmask@entry=3DRETURN_MASK_ALL) at exceptions.c:524 #20 0x00000000005501b6 in captured_main (data=3Ddata@entry=3D0x7fffee48adb0= ) at main.c:1054 #21 0x000000000054caca in catch_errors (func=3Dfunc@entry=3D0x54f740 ,=20 func_args=3Dfunc_args@entry=3D0x7fffee48adb0, errstring=3Derrstring@ent= ry=3D0x712212 "",=20 mask=3Dmask@entry=3DRETURN_MASK_ALL) at exceptions.c:524 #22 0x000000000055067b in gdb_main (args=3Dargs@entry=3D0x7fffee48adb0) at = main.c:1062 #23 0x000000000040b645 in main (argc=3D, argv=3D) at gdb.c:33 (gdb) info threads Id Target Id Frame=20 4 Thread 0x7f0e56efb700 (LWP 17172) "gdb" pthread_cond_wait@@GLIBC_2.3= .2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 3 Thread 0x7f0e566aa700 (LWP 17173) "gdb" pthread_cond_wait@@GLIBC_2.3= .2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 2 Thread 0x7f0e55e59700 (LWP 17174) "gdb" pthread_cond_wait@@GLIBC_2.3= .2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 * 1 Thread 0x7f0e5fb93740 (LWP 17170) "gdb" 0x00007f0e5e4717a2 in do_sig= suspend (set=3D0xb702c0 ) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 (gdb) thread 2 [Switching to thread 2 (Thread 0x7f0e55e59700 (LWP 17174))] #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x8= 6_64/pthread_cond_wait.S:185 185 ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: No such fil= e or directory. (gdb) bt #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x8= 6_64/pthread_cond_wait.S:185 #1 0x00007f0e5ea28907 in GC_wait_marker () at pthread_support.c:2036 #2 0x00007f0e5ea1f31a in GC_help_marker (my_mark_no=3Dmy_mark_no@entry=3D1= 1) at mark.c:1160 #3 0x00007f0e5ea26f5c in GC_mark_thread (id=3D) at pthread_= support.c:389 #4 0x00007f0e5e010052 in start_thread (arg=3D0x7f0e55e59700) at pthread_cr= eate.c:309 #5 0x00007f0e5e521e1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clo= ne.S:111 (gdb) thread 1 [Switching to thread 1 (Thread 0x7f0e5fb93740 (LWP 17170))] #0 0x00007f0e5e4717a2 in do_sigsuspend (set=3D0xb702c0 ) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 31 ../sysdeps/unix/sysv/linux/sigsuspend.c: No such file or directory. (gdb) finish Run till exit from #0 0x00007f0e5e4717a2 in do_sigsuspend (set=3D0xb702c0 = ) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 --8<---------------cut here---------------end--------------->8--- and =E2=80=98sigsuspend=E2=80=99 never returns. So it looks like it=E2=80= =99s losing some SIGCHLDs, which would be unrelated to the problem we=E2=80=99re seeing with Guile 2.2. libgc installs handlers for SIGPWR and SIGXCPU, which it uses to coordinate stop-the-world GCs, but that doesn=E2=80=99t interfere AFAICS (a= nd it=E2=80=99s the case regardless of whether there are 1 or more marker thre= ads.) I=E2=80=99ve investigated a bit but can=E2=80=99t find any why/how libgc co= uld interfere with gdb=E2=80=99s signal handling. Ideas? Ludo=E2=80=99.