From: David Lecomber <david@allinea.com>
To: gdb <gdb@sources.redhat.com>
Subject: Itanium and GDB on 2.6.x kernels with pthreads
Date: Wed, 07 Sep 2005 16:27:00 -0000 [thread overview]
Message-ID: <1126110236.8094.85.camel@delmo.priv.wark.uk.streamline-computing.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]
Dear all,
Attached is a simple program, and simple script for GDB (current CVS,
and previous versions)
gcc -o pf -g pf.c -lm -lpthread
gdb ./pf < gdb.script
The script is a break main and then 'next' four times, followed by quit.
On a 2.4.21 Itanium system, it's quick and quits happily.
On a 2.6.5 Itanium, it hangs during the later nexts. Does anyone have a
more recent Itanium they could try and see if this is a transient kernel
issue?
Note, the Intel IDB debugger does not have a problem with this test
case.
GDB consumes CPU, and a 'strace' shows it to be doing repeatedly:
wait4(29113, 0x60000fffffffa730, 0, NULL) = -1 ECHILD (No child
processes)
wait4(29113, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGTRAP}], __WCLONE,
NULL) = 29113
ptrace(PTRACE_CONT, 29113, 0, SIG_0) = 0
wait4(29113, 0x60000fffffffa730, 0, NULL) = -1 ECHILD (No child
processes)
Also, just generally, signal processing is goofed up -- and if I try to
attach to the running GDB I just see:
Loaded symbols for /lib/tls/libthread_db.so.1
<signal handler called>
(gdb) bt
#0 <signal handler called>
Cannot access memory at address 0x28
(gdb) The program is running. Quit anyway (and detach it)? (y or n) y
Anyone seen this before? If someone could verify this is ok on their
system, I'd appreciate it..
d.
--
David Lecomber <david@allinea.com>
[-- Attachment #2: pf.c --]
[-- Type: text/x-csrc, Size: 465 bytes --]
#include <pthread.h>
#include <math.h>
#include <stdio.h>
void f(char* s)
{
int i;
printf("Hello from : %s\n", s);
fflush(stdout);
for (i = 0 ; i < 100000000; i++)
{
float f = sqrt(i);
}
printf("Goodbye from : %s\n", s);
fflush(stdout);
}
int main()
{
pthread_t t1;
pthread_t t2;
pthread_create(&t1, NULL, (void*) &f, "One");
pthread_create(&t2, NULL, (void*) &f, "Two");
pthread_join(t1, NULL);
pthread_join(t2, NULL);
}
[-- Attachment #3: gdb.script --]
[-- Type: text/plain, Size: 32 bytes --]
b main
run
next
next
next
quit
next reply other threads:[~2005-09-07 16:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-07 16:27 David Lecomber [this message]
2005-09-07 22:15 ` Andreas Schwab
2005-09-09 14:48 ` David Lecomber
2005-09-10 15:29 ` Daniel Jacobowitz
2005-09-10 15:57 ` Daniel Jacobowitz
2005-09-16 10:36 ` David Lecomber
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=1126110236.8094.85.camel@delmo.priv.wark.uk.streamline-computing.com \
--to=david@allinea.com \
--cc=gdb@sources.redhat.com \
/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).