This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug threads/9817] New: GDB goes to 100% CPU usage indefinitely if pthread stack address is modified
- From: "mihai dot stanescu at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 4 Feb 2009 12:03:33 -0000
- Subject: [Bug threads/9817] New: GDB goes to 100% CPU usage indefinitely if pthread stack address is modified
- Reply-to: sourceware-bugzilla at sourceware dot org
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.