public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Tobias Erbsland <terbsland@printsoft.ch>
To: gdb@sources.redhat.com
Subject: Re: Threading bug, already solved, or is there a workaround?
Date: Thu, 02 Dec 2004 09:56:00 -0000	[thread overview]
Message-ID: <200412021056.15660.terbsland@printsoft.ch> (raw)
In-Reply-To: <20041201171640.GA8619@nevyn.them.org>

[-- 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 --]

  reply	other threads:[~2004-12-02  9:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-01 11:53 Tobias Erbsland
2004-12-01 17:16 ` Daniel Jacobowitz
2004-12-02  9:56   ` Tobias Erbsland [this message]
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

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=200412021056.15660.terbsland@printsoft.ch \
    --to=terbsland@printsoft.ch \
    --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).