public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug threads/9817] New: GDB goes to 100% CPU usage indefinitely if pthread stack address is modified
@ 2009-02-04 12:03 mihai dot stanescu at gmail dot com
  2009-02-04 12:05 ` [Bug threads/9817] " mihai dot stanescu at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mihai dot stanescu at gmail dot com @ 2009-02-04 12:03 UTC (permalink / raw)
  To: gdb-prs

The particular thing about the program is that is doing a pthread_attr_setstack
to setup the thread stack to a dynamically allocated memory area on heap.

pthread_attr_setstack(&attr, alignedStackBase, THREAD_STACK_SIZE -
2*PTHREAD_STACK_MIN)

When attaching to an already running program (which uses pthreads) on
gentoo/x86, GDB loops indefinitely 

Here is a small dump from strace which goes forever

open("/proc/6204/mem", O_RDONLY|O_LARGEFILE) = 7
pread64(7,"\220{\237\266\220\r\253\27\220{\237\266\1\0\0\0\200\351\363\267\0\0\n\377,DRv\0\0\0\0"...,1136,
3063905168) = 1136
close(7) = 0
open("/proc/6204/mem", O_RDONLY|O_LARGEFILE) = 7
pread64(7,
"\220;\254\266\210\1\253\27\220;\254\266\1\0\0\0\200\351\363\267\0\0\n\377,DRv\0\0\0\0"...,1136,
3064740752) = 1136
close(7)                                = 0
open("/proc/6204/mem", O_RDONLY|O_LARGEFILE) = 7
pread64(7,"\220;\254\266\210\1\253\27\220;\254\266\1\0\0\0\200\351\363\267\0\0\n\377,DRv\0\0\0\0"...,1136,
3064740752) = 1136
close(7)                                = 0

-- 
           Summary: GDB goes to 100% CPU usage indefinitely if pthread stack
                    address is modified
           Product: gdb
           Version: 6.8
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: threads
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: mihai dot stanescu at gmail dot com
                CC: gdb-prs at sourceware dot org


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

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-14 16:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-9817-4717@http.sourceware.org/bugzilla/>
2011-12-14 16:02 ` [Bug threads/9817] GDB goes to 100% CPU usage indefinitely if pthread stack address is modified dje at google dot com
2009-02-04 12:03 [Bug threads/9817] New: " mihai dot stanescu at gmail dot com
2009-02-04 12:05 ` [Bug threads/9817] " mihai dot stanescu at gmail dot com
2009-02-04 12:33 ` mihai dot stanescu at gmail dot com
2009-02-04 13:09 ` pedro at codesourcery dot com
2009-02-05 10:32 ` mihai dot stanescu at gmail dot com
2009-02-05 11:18 ` mihai dot stanescu at gmail dot com

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).