Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* attaching gdb causes pthread_create hang [gdb6.3, long subject]
@ 2007-09-07 10:04 Bogdan Slusarczyk
  2007-09-07 12:32 ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Bogdan Slusarczyk @ 2007-09-07 10:04 UTC (permalink / raw)
  To: gdb

Hi everyone, maybe you can help me.
There is following scenario:
1) I use gdb6.3, which was build on some linux, and I cannot change its 
version and cannot build gdb for every linux on the world (I mean I have 
to deliver built gdb to customers, regardless of which linux they have)
2) mentioned gdb will be used for debugging another delivered 
application (huge and complicated)

Problem is, that gdb on on some linux machines works fine, on others it 
causes that inside debugged application pthread_create hangs (from 
boost::thread).
But:
- with simple application which uses boost::thread (pthread_create) it 
works fine
- when I build the same gdb version on such specific linux, it works 
fine too!
- it's not specific for linux distribution, my quess is that some 
additional installed packages (or differences between them) can cause 
this problem

And my questions
-what can cause mentioned problems? different system libraries (which 
one)? what else?
-what kind of operations does gdb which could harm debugged application?

Thank in advance
Bogdan


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

* Re: attaching gdb causes pthread_create hang [gdb6.3, long subject]
  2007-09-07 10:04 attaching gdb causes pthread_create hang [gdb6.3, long subject] Bogdan Slusarczyk
@ 2007-09-07 12:32 ` Daniel Jacobowitz
  2007-09-07 14:03   ` Bogdan Slusarczyk
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2007-09-07 12:32 UTC (permalink / raw)
  To: Bogdan Slusarczyk; +Cc: gdb

On Fri, Sep 07, 2007 at 11:20:46AM +0200, Bogdan Slusarczyk wrote:
> Hi everyone, maybe you can help me.
> There is following scenario:
> 1) I use gdb6.3, which was build on some linux, and I cannot change its version 
> and cannot build gdb for every linux on the world (I mean I have to deliver 
> built gdb to customers, regardless of which linux they have)

Sorry, but if you say "I have a version of GDB three years old and it
has this problem", we're only going to suggest you try the current
version.  We've spent those three years fixing problems in GDB.

> - when I build the same gdb version on such specific linux, it works fine too!

I don't know what this might be.  My first guess would be that the
system you're building on didn't have tkill available.

> -what kind of operations does gdb which could harm debugged application?

It debugs it!  Debugging, especially for threaded programs, is
intrusive and complicated.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: attaching gdb causes pthread_create hang [gdb6.3, long subject]
  2007-09-07 12:32 ` Daniel Jacobowitz
@ 2007-09-07 14:03   ` Bogdan Slusarczyk
  2007-09-07 17:56     ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Bogdan Slusarczyk @ 2007-09-07 14:03 UTC (permalink / raw)
  To: gdb

> Sorry, but if you say "I have a version of GDB three years old and it
> has this problem", we're only going to suggest you try the current
> version.  We've spent those three years fixing problems in GDB.

You're absolutely right, but I have to cope with old gdb for the moment :(

> I don't know what this might be.  My first guess would be that the
> system you're building on didn't have tkill available.

How check it in the simplest way?

Regards
Bogdan


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

* Re: attaching gdb causes pthread_create hang [gdb6.3, long subject]
  2007-09-07 14:03   ` Bogdan Slusarczyk
@ 2007-09-07 17:56     ` Daniel Jacobowitz
  2007-09-18  9:34       ` Bogdan Slusarczyk
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2007-09-07 17:56 UTC (permalink / raw)
  To: Bogdan Slusarczyk; +Cc: gdb

On Fri, Sep 07, 2007 at 03:53:00PM +0200, Bogdan Slusarczyk wrote:
> > Sorry, but if you say "I have a version of GDB three years old and it
> > has this problem", we're only going to suggest you try the current
> > version.  We've spent those three years fixing problems in GDB.
> 
> You're absolutely right, but I have to cope with old gdb for the moment :(
> 
> > I don't know what this might be.  My first guess would be that the
> > system you're building on didn't have tkill available.
> 
> How check it in the simplest way?

Compare the output of configure in the gdb subdirectory on your
different builds.

-- 
Daniel Jacobowitz
CodeSourcery


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

* Re: attaching gdb causes pthread_create hang [gdb6.3, long subject]
  2007-09-07 17:56     ` Daniel Jacobowitz
@ 2007-09-18  9:34       ` Bogdan Slusarczyk
  2007-09-18 10:20         ` Andreas Schwab
  0 siblings, 1 reply; 7+ messages in thread
From: Bogdan Slusarczyk @ 2007-09-18  9:34 UTC (permalink / raw)
  To: gdb

Daniel Jacobowitz wrote:
>>> I don't know what this might be.  My first guess would be that the
>>> system you're building on didn't have tkill available.
>> How check it in the simplest way?
> 
> Compare the output of configure in the gdb subdirectory on your
> different builds.
> 

You were right. System which I used didn't have tkill. Can you tell me 
if tkill availability is strongly connected with glibc version? I 
noticed that mentioned system has glibc2.2.5, but others that I have 
have tkill and glibc 2.3.x.
Is that the reason or maybe there is more to it?

Regards
Bogdan


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

* Re: attaching gdb causes pthread_create hang [gdb6.3, long subject]
  2007-09-18  9:34       ` Bogdan Slusarczyk
@ 2007-09-18 10:20         ` Andreas Schwab
  2007-09-18 10:51           ` Bogdan Slusarczyk
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Schwab @ 2007-09-18 10:20 UTC (permalink / raw)
  To: Bogdan Slusarczyk; +Cc: gdb

Bogdan Slusarczyk <bodzio131@op.pl> writes:

> You were right. System which I used didn't have tkill. Can you tell me if
> tkill availability is strongly connected with glibc version?

It's rather the version of the kernel headers that matter.  There is no
tkill function in glibc, gdb is directly calling the syscall, but needs
to know its number which is provided by <asm/syscall.h> (indirectly
through <sys/syscall.h>).

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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

* Re: attaching gdb causes pthread_create hang [gdb6.3, long subject]
  2007-09-18 10:20         ` Andreas Schwab
@ 2007-09-18 10:51           ` Bogdan Slusarczyk
  0 siblings, 0 replies; 7+ messages in thread
From: Bogdan Slusarczyk @ 2007-09-18 10:51 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gdb

>> You were right. System which I used didn't have tkill. Can you tell me if
>> tkill availability is strongly connected with glibc version?
> 
> It's rather the version of the kernel headers that matter.  There is no
> tkill function in glibc, gdb is directly calling the syscall, but needs
> to know its number which is provided by <asm/syscall.h> (indirectly
> through <sys/syscall.h>).

So question from other side: is there any kernel version from which I 
can presuppose that it should have tkill support? Or maybe can I specify 
some linux system requirements which can assure that system supports tkill?

Bogdan


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

end of thread, other threads:[~2007-09-18 10:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-07 10:04 attaching gdb causes pthread_create hang [gdb6.3, long subject] Bogdan Slusarczyk
2007-09-07 12:32 ` Daniel Jacobowitz
2007-09-07 14:03   ` Bogdan Slusarczyk
2007-09-07 17:56     ` Daniel Jacobowitz
2007-09-18  9:34       ` Bogdan Slusarczyk
2007-09-18 10:20         ` Andreas Schwab
2007-09-18 10:51           ` Bogdan Slusarczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox