public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Threading bug, already solved, or is there a workaround?
@ 2004-12-01 11:53 Tobias Erbsland
  2004-12-01 17:16 ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Tobias Erbsland @ 2004-12-01 11:53 UTC (permalink / raw)
  To: gdb


Hello

I'm currently try to debug a multithreaded application with gdb. It seems that
there are this threading problems described in the PROBLEMS document.
(It's a SuSE 9.2, but i installed gdb 6.3 in the hope, the bug is already 
solved.)

Is there already a solution for that problem? Or is there a workaround? 

kind regards
Tobias

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

* Re: Threading bug, already solved, or is there a workaround?
  2004-12-01 11:53 Threading bug, already solved, or is there a workaround? Tobias Erbsland
@ 2004-12-01 17:16 ` Daniel Jacobowitz
  2004-12-02  9:56   ` Tobias Erbsland
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2004-12-01 17:16 UTC (permalink / raw)
  To: Tobias Erbsland; +Cc: gdb

On Wed, Dec 01, 2004 at 12:52:47PM +0100, Tobias Erbsland wrote:
> 
> Hello
> 
> I'm currently try to debug a multithreaded application with gdb. It seems that
> there are this threading problems described in the PROBLEMS document.
> (It's a SuSE 9.2, but i installed gdb 6.3 in the hope, the bug is already 
> solved.)
> 
> Is there already a solution for that problem? Or is there a workaround? 

Which problem, specifically, do you mean?  What symptoms do you see?

-- 
Daniel Jacobowitz

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

* Re: Threading bug, already solved, or is there a workaround?
  2004-12-01 17:16 ` Daniel Jacobowitz
@ 2004-12-02  9:56   ` Tobias Erbsland
  2004-12-06 15:59     ` Daniel Jacobowitz
  0 siblings, 1 reply; 7+ messages in thread
From: Tobias Erbsland @ 2004-12-02  9:56 UTC (permalink / raw)
  To: gdb

[-- Attachment #1: Type: text/plain, Size: 2360 bytes --]


Hello

> > I'm currently try to debug a multithreaded application with gdb. It seems
> > that there are this threading problems described in the PROBLEMS
> > document. (It's a SuSE 9.2, but i installed gdb 6.3 in the hope, the bug
> > is already solved.)
> >
> > Is there already a solution for that problem? Or is there a workaround?
>
> Which problem, specifically, do you mean?  What symptoms do you see?

If i try to debug an multithread application with gdb, the threads aren't 
started. Without gdb all is working fine.

An minimal example program for Qt with qmake.

The regular output would be:

**snip**
drzoom@toe:~/Entwicklung/kdevelopthreadbug/bin> ./kdevelopthreadbug
start 5 thread
Start thread 0
Start thread 1
Start thread 2
Start thread 3
Start thread 4
Thread started
Thread started
Thread started
Thread started
Thread started
Start thread 5
Start thread 6
Start thread 7
Start thread 8
Start thread 9
Thread started
Thread started
Thread started
Thread started
Thread started
5 threads are running...
Thread done
Thread done
Thread done
Thread done
Thread done
Thread done
Thread done
Thread done
Thread done
Thread done
**snip*

The output with the debugger is:

drzoom@toe:~/Entwicklung/kdevelopthreadbug/bin> /usr/bin/gdb kdevelopthreadbug
GNU gdb 6.2.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-suse-linux"...Using host libthread_db library 
"/lib/tls/libthread_db.so.1".

(gdb) r
Starting 
program: /home/drzoom/Entwicklung/kdevelopthreadbug/bin/kdevelopthreadbug
[Thread debugging using libthread_db enabled]
warning: Unable to set global thread event mask: generic error
[New Thread 1085896896 (LWP 6096)]
start 5 thread
Start thread 0
Start thread 1
Start thread 2
Start thread 3
Start thread 4
Start thread 5
Start thread 6
Start thread 7
Start thread 8
Start thread 9
5 threads are running...

I tried the same with gdb 6.1, 6.2.1 and with 6.3. Everywhere the same 
problem.

The example as attachement.

kind regards
Tobias

[-- Attachment #2: bug.tar.gz --]
[-- Type: application/x-tgz, Size: 747 bytes --]

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

* Re: Threading bug, already solved, or is there a workaround?
  2004-12-02  9:56   ` Tobias Erbsland
@ 2004-12-06 15:59     ` Daniel Jacobowitz
  2004-12-06 16:16       ` Duncan Sands
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2004-12-06 15:59 UTC (permalink / raw)
  To: Tobias Erbsland; +Cc: gdb

On Thu, Dec 02, 2004 at 10:56:15AM +0100, Tobias Erbsland wrote:
> 
> Hello
> 
> > > I'm currently try to debug a multithreaded application with gdb. It seems
> > > that there are this threading problems described in the PROBLEMS
> > > document. (It's a SuSE 9.2, but i installed gdb 6.3 in the hope, the bug
> > > is already solved.)
> > >
> > > Is there already a solution for that problem? Or is there a workaround?
> >
> > Which problem, specifically, do you mean?  What symptoms do you see?
> 
> If i try to debug an multithread application with gdb, the threads aren't 
> started. Without gdb all is working fine.
> 
> An minimal example program for Qt with qmake.
> 
> The regular output would be:

Your test works for me on Debian unstable.  I can only assume that SuSE
has some change in glibc, libqt, or the kernel that caused this
problem; you may want to take it up with SuSE.

-- 
Daniel Jacobowitz

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

* Re: Threading bug, already solved, or is there a workaround?
  2004-12-06 15:59     ` Daniel Jacobowitz
@ 2004-12-06 16:16       ` Duncan Sands
  2004-12-08  9:07         ` Tobias Erbsland
  0 siblings, 1 reply; 7+ messages in thread
From: Duncan Sands @ 2004-12-06 16:16 UTC (permalink / raw)
  To: gdb; +Cc: Daniel Jacobowitz, Tobias Erbsland

> > If i try to debug an multithread application with gdb, the threads aren't 
> > started. Without gdb all is working fine.
> > 
> > An minimal example program for Qt with qmake.
> > 
> > The regular output would be:
> 
> Your test works for me on Debian unstable.  I can only assume that SuSE
> has some change in glibc, libqt, or the kernel that caused this
> problem; you may want to take it up with SuSE.

Yes, SuSE recently distributed a new kernel (2.6.5-7.111.5) which breaks gdb
with multithreaded apps.  I worked around it by compiling my own more recent
kernel.  I don't know if SuSE is aware of the problem.

All the best,

Duncan.

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

* Re: Threading bug, already solved, or is there a workaround?
  2004-12-06 16:16       ` Duncan Sands
@ 2004-12-08  9:07         ` Tobias Erbsland
  0 siblings, 0 replies; 7+ messages in thread
From: Tobias Erbsland @ 2004-12-08  9:07 UTC (permalink / raw)
  To: gdb

> > > If i try to debug an multithread application with gdb, the threads
> > > aren't started. Without gdb all is working fine.
> > Your test works for me on Debian unstable.  I can only assume that SuSE
> > has some change in glibc, libqt, or the kernel that caused this
> > problem; you may want to take it up with SuSE.
> Yes, SuSE recently distributed a new kernel (2.6.5-7.111.5) which breaks
> gdb with multithreaded apps.  I worked around it by compiling my own more
> recent kernel.  I don't know if SuSE is aware of the problem.

I built a new kernel, and it's working now. Thank you for this hint!

regards
Tobias

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

* Re: Threading bug, already solved, or is there a workaround?
@ 2004-12-06 15:45 Markus Riese
  0 siblings, 0 replies; 7+ messages in thread
From: Markus Riese @ 2004-12-06 15:45 UTC (permalink / raw)
  To: gdb

Hello,

i have the same problem and the same configuration (SUSE 9.2 and gdb6.2.1 - 
update-> gdb 6.3 and QT 3.3.3). 
A thread (QThread) does not start. If i interrupt the program and
continue, the thread will start. 

Any idea yet ?

Markus

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

end of thread, other threads:[~2004-12-08  9:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-01 11:53 Threading bug, already solved, or is there a workaround? Tobias Erbsland
2004-12-01 17:16 ` Daniel Jacobowitz
2004-12-02  9:56   ` Tobias Erbsland
2004-12-06 15:59     ` Daniel Jacobowitz
2004-12-06 16:16       ` Duncan Sands
2004-12-08  9:07         ` Tobias Erbsland
2004-12-06 15:45 Markus Riese

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