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
` (5 more replies)
0 siblings, 6 replies; 8+ 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] 8+ messages in thread
* [Bug threads/9817] GDB goes to 100% CPU usage indefinitely if pthread stack address is modified
2009-02-04 12:03 [Bug threads/9817] New: GDB goes to 100% CPU usage indefinitely if pthread stack address is modified mihai dot stanescu at gmail dot com
@ 2009-02-04 12:05 ` mihai dot stanescu at gmail dot com
2009-02-04 12:32 ` [Bug gdb/9817] " mihai dot stanescu at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: mihai dot stanescu at gmail dot com @ 2009-02-04 12:05 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From mihai dot stanescu at gmail dot com 2009-02-04 12:05 -------
*** Bug 9815 has been marked as a duplicate of this bug. ***
--
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] 8+ messages in thread
* [Bug gdb/9817] GDB goes to 100% CPU usage indefinitely if pthread stack address is modified
2009-02-04 12:03 [Bug threads/9817] New: GDB goes to 100% CPU usage indefinitely if pthread stack address is modified 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:32 ` mihai dot stanescu at gmail dot com
2009-02-04 12:33 ` [Bug threads/9817] " mihai dot stanescu at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: mihai dot stanescu at gmail dot com @ 2009-02-04 12:32 UTC (permalink / raw)
To: gdb-prs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|threads |gdb
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] 8+ messages in thread
* [Bug threads/9817] GDB goes to 100% CPU usage indefinitely if pthread stack address is modified
2009-02-04 12:03 [Bug threads/9817] New: GDB goes to 100% CPU usage indefinitely if pthread stack address is modified 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:32 ` [Bug gdb/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
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: mihai dot stanescu at gmail dot com @ 2009-02-04 12:33 UTC (permalink / raw)
To: gdb-prs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|gdb |threads
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] 8+ messages in thread
* [Bug threads/9817] GDB goes to 100% CPU usage indefinitely if pthread stack address is modified
2009-02-04 12:03 [Bug threads/9817] New: GDB goes to 100% CPU usage indefinitely if pthread stack address is modified mihai dot stanescu at gmail dot com
` (2 preceding siblings ...)
2009-02-04 12:33 ` [Bug threads/9817] " 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
5 siblings, 0 replies; 8+ messages in thread
From: pedro at codesourcery dot com @ 2009-02-04 13:09 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From pedro at codesourcery dot com 2009-02-04 13:09 -------
Subject: Re: New: GDB goes to 100% CPU usage indefinitely if pthread stack address is modified
Hi,
On Wednesday 04 February 2009 12:03:33, mihai dot stanescu at gmail dot com wrote:
> 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)
>
Any chance you have a minimal test app you could attach that reproduce
the problem?
There have been numerous fixes since gdb 6.8. Could you please try
what happens with a recent gdb snapshot (or cvs head)?
Thanks,
--
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] 8+ messages in thread
* [Bug threads/9817] GDB goes to 100% CPU usage indefinitely if pthread stack address is modified
2009-02-04 12:03 [Bug threads/9817] New: GDB goes to 100% CPU usage indefinitely if pthread stack address is modified mihai dot stanescu at gmail dot com
` (3 preceding siblings ...)
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
5 siblings, 0 replies; 8+ messages in thread
From: mihai dot stanescu at gmail dot com @ 2009-02-05 10:32 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From mihai dot stanescu at gmail dot com 2009-02-05 10:32 -------
I tried with gdb-6.8.50.20090205.tar.bz2 and same problem. I will try to make a
sample program for you.
(In reply to comment #2)
> Subject: Re: New: GDB goes to 100% CPU usage indefinitely if pthread stack
address is modified
>
> Hi,
>
> On Wednesday 04 February 2009 12:03:33, mihai dot stanescu at gmail dot com wrote:
> > 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)
> >
>
> Any chance you have a minimal test app you could attach that reproduce
> the problem?
>
> There have been numerous fixes since gdb 6.8. Could you please try
> what happens with a recent gdb snapshot (or cvs head)?
>
> Thanks,
>
>
--
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] 8+ messages in thread
* [Bug threads/9817] GDB goes to 100% CPU usage indefinitely if pthread stack address is modified
2009-02-04 12:03 [Bug threads/9817] New: GDB goes to 100% CPU usage indefinitely if pthread stack address is modified mihai dot stanescu at gmail dot com
` (4 preceding siblings ...)
2009-02-05 10:32 ` mihai dot stanescu at gmail dot com
@ 2009-02-05 11:18 ` mihai dot stanescu at gmail dot com
5 siblings, 0 replies; 8+ messages in thread
From: mihai dot stanescu at gmail dot com @ 2009-02-05 11:18 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From mihai dot stanescu at gmail dot com 2009-02-05 11:18 -------
I did also a small test program but i could not reproduce the problem. Is not
like our application (which is a lot bigger. Our executable has 300MB in debug)
Also loads
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/libstdc++.so.6...done.
Loaded symbols for /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/libstdc++.so.6
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/libgcc_s.so.1...done.
Loaded symbols for /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /usr/lib/liblber-2.3.so.0...done.
Loaded symbols for /usr/lib/liblber-2.3.so.0
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /usr/lib/libssl.so.0.9.8...done.
Loaded symbols for /usr/lib/libssl.so.0.9.8
Reading symbols from /usr/lib/libcrypto.so.0.9.8...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.8
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_compat.so.2...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_nis.so.2...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
0xb7f64882 in ?? () from /lib/ld-linux.so.2
My test program only loads:
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/libstdc++.so.6...done.
Loaded symbols for /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/libstdc++.so.6
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/libgcc_s.so.1...done.
Loaded symbols for /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
0xb7f35882 in ?? () from /lib/ld-linux.so.2
Sorry.
--
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] 8+ messages in thread
* [Bug threads/9817] GDB goes to 100% CPU usage indefinitely if pthread stack address is modified
[not found] <bug-9817-4717@http.sourceware.org/bugzilla/>
@ 2011-12-14 16:02 ` dje at google dot com
0 siblings, 0 replies; 8+ messages in thread
From: dje at google dot com @ 2011-12-14 16:02 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=9817
dje at google dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dje at google dot com
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-12-14 16:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-04 12:03 [Bug threads/9817] New: GDB goes to 100% CPU usage indefinitely if pthread stack address is modified 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:32 ` [Bug gdb/9817] " mihai dot stanescu at gmail dot com
2009-02-04 12:33 ` [Bug threads/9817] " 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
[not found] <bug-9817-4717@http.sourceware.org/bugzilla/>
2011-12-14 16:02 ` dje at google 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).