public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "ppluzhnikov at google dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug threads/10970] GDB hangs when main thread does pthread_exit
Date: Tue, 17 Nov 2009 05:44:00 -0000	[thread overview]
Message-ID: <20091117054453.23168.qmail@sourceware.org> (raw)
In-Reply-To: <20091117053515.10970.ppluzhnikov@google.com>


------- Additional Comments From ppluzhnikov at google dot com  2009-11-17 05:44 -------
Same result with breakpoints as well:

gdb64-cvs -q -nx ./hang
Reading symbols from /usr/local/google/tmp/multiple-so/hang...done.
(gdb) list
13	      sleep (1);
14	    }
15	  printf ("thread %p done\n", (void *) pthread_self ());
16	  return NULL;
17	}
18	
19	int main ()
20	{
21	  pthread_t tid;
22	  pthread_create (&tid, NULL, fn, NULL);
(gdb) b 13
Breakpoint 1 at 0x400686: file hang.c, line 13.
(gdb) r
Starting program: /usr/local/google/tmp/hang 
[Thread debugging using libthread_db enabled]
[New Thread 0x40800950 (LWP 2631)]
thread 0x40800950
i = 0
[Switching to Thread 0x40800950 (LWP 2631)]

Breakpoint 1, fn (p=0x0) at hang.c:13
13	      sleep (1);
(gdb) c
Continuing.
i = 1
      <<< no further progress from here; can't gain GDB prompt with Control-C.

I verified that if I replace pthread_exit() with sleep(300), GDB starts working
fine.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1


http://sourceware.org/bugzilla/show_bug.cgi?id=10970

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


  reply	other threads:[~2009-11-17  5:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17  5:35 [Bug threads/10970] New: " ppluzhnikov at google dot com
2009-11-17  5:44 ` ppluzhnikov at google dot com [this message]
     [not found] <bug-10970-4717@http.sourceware.org/bugzilla/>
2011-05-27 16:56 ` [Bug threads/10970] " cvs-commit at gcc dot gnu.org
2011-05-27 16:59 ` jan.kratochvil at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091117054453.23168.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).