* Cannot get thread event message: debugger service failed
@ 2008-11-25 8:10 D. Hugh Redelmeier
2008-12-01 22:27 ` Michael Snyder
0 siblings, 1 reply; 5+ messages in thread
From: D. Hugh Redelmeier @ 2008-11-25 8:10 UTC (permalink / raw)
To: gdb
I'm trying to debug Firefox on Linux. I'm using GDB. Execution of
Firefox is frequently interrupted with this message:
[New Thread 0x44125950 (LWP 30469)]
Cannot get thread event message: debugger service failed
At this point, I enter a "continue" GDB command and execution
proceeds.
Sometimes the screen locks up until the "continue". So I need to run
GDB somewhere other than the X desktop.
What is the best way to avoid this problem and get on with debugging
Firefox? (I admit: a quixotic quest.)
Google finds this for me:
http://sourceware.org/ml/gdb/2006-10/msg00259.html
but I don't see a resolution.
Some details:
- I get this message on 64-bit Fedora 9 (on a dual-core machine) and on
64-bit Ubuntu 8.04 (on a quad core machine)
- GDB on Fedora 9: gdb-6.8-23.fc9.x86_64
- GDB on Ubuntu 8.04: 6.8-1ubuntu3
- I run Firefox this way: Firefox --sync
or: Firefox --sync -no-remote
- I run gdb later, giving it the executable file and the PID
- I tell gdb to ignore sigpipe signals: handle SIGPIPE nostop
- I then let GDB continue Firefox
- after a small amount of browsing, the dreaded message shows up
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Cannot get thread event message: debugger service failed
2008-11-25 8:10 Cannot get thread event message: debugger service failed D. Hugh Redelmeier
@ 2008-12-01 22:27 ` Michael Snyder
0 siblings, 0 replies; 5+ messages in thread
From: Michael Snyder @ 2008-12-01 22:27 UTC (permalink / raw)
To: D. Hugh Redelmeier; +Cc: gdb
D. Hugh Redelmeier wrote:
> I'm trying to debug Firefox on Linux. I'm using GDB. Execution of
> Firefox is frequently interrupted with this message:
> [New Thread 0x44125950 (LWP 30469)]
> Cannot get thread event message: debugger service failed
> At this point, I enter a "continue" GDB command and execution
> proceeds.
>
> Sometimes the screen locks up until the "continue". So I need to run
> GDB somewhere other than the X desktop.
>
> What is the best way to avoid this problem and get on with debugging
> Firefox? (I admit: a quixotic quest.)
>
> Google finds this for me:
> http://sourceware.org/ml/gdb/2006-10/msg00259.html
> but I don't see a resolution.
>
> Some details:
>
> - I get this message on 64-bit Fedora 9 (on a dual-core machine) and on
> 64-bit Ubuntu 8.04 (on a quad core machine)
>
> - GDB on Fedora 9: gdb-6.8-23.fc9.x86_64
>
> - GDB on Ubuntu 8.04: 6.8-1ubuntu3
>
>
> - I run Firefox this way: Firefox --sync
> or: Firefox --sync -no-remote
>
> - I run gdb later, giving it the executable file and the PID
>
> - I tell gdb to ignore sigpipe signals: handle SIGPIPE nostop
>
> - I then let GDB continue Firefox
>
> - after a small amount of browsing, the dreaded message shows up
I have only a few random guesses.
1) Can you try building gdb from sources on your host machine?
Could conceivably be some sort of header file issue.
2) We can see where the error message comes from: void check_event
in linux-thread-db.c. It's not very informative, it just tells us
that the call to td_ta_event_getmsg_p failed. No reason for that
suggests itself, other than
1) maybe mis-matched header files
2) maybe privilege issues? Does firefox run as priveleged?
I'm guessing that at least parts of it must, otherwise you would
not be seeing it taking over and hanging up your X server.
If its a privilege issue, can you try running gdb as root?
> Sometimes the screen locks up until the "continue". So I need to run
> GDB somewhere other than the X desktop.
Yeah, this suggests that firefox is grabbing some locks or resources
from the X server, which may suggest that it's running privileged.
You're already running gdb from a separate pseudo-console, might as
well try running it as root as well...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Gdb
@ 2006-10-25 7:05 Russell Shaw
2006-10-26 12:41 ` Cannot get thread event message: debugger service failed Christophe Benoit
0 siblings, 1 reply; 5+ messages in thread
From: Russell Shaw @ 2006-10-25 7:05 UTC (permalink / raw)
To: gdb
Hi,
After narrowing down a bug location in the last few days, it seems
all too obvious that gdb needs to be gutted and recast. It can all
be made simpler and more understandable, thus easier to maintain.
Gdb should should be a library of functions for the various things
that can be done to a target, and have no user interface and command-
line parsing at all.
All the current user terminal interaction should be in a separate
program that is linked to the gdb library.
There is far too much complexity for the simple things that gdb does.
The bug i have is that gdb does not stop at pending breakpoints i have
set in a dlopen library. I made a small testcase, and gdb does do the
pending breakpoints there ok. This bug should be easy to find and fix,
but it isn't.
If there's no plans to redo gdb, i'll do it anyway.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Cannot get thread event message: debugger service failed
2006-10-25 7:05 Gdb Russell Shaw
@ 2006-10-26 12:41 ` Christophe Benoit
2006-10-26 12:45 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Christophe Benoit @ 2006-10-26 12:41 UTC (permalink / raw)
To: gdb
[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]
Hi everybody,
I am trying to use gdb script on a multithreaded application.
My script is very simple :
- Attach on the process
- I set a breakpoint
- I use a while statement to reach the breakpoint fifty times
- After that, I delete the breakpoint, detach and quit.
The problem is that, sometimes, when the breakpoint is reach, gdb goes
in error:
[New Thread -1210061904 (LWP 15939)]
scriptgdb.withoutserv.out:56: Error in sourced command file:
Cannot get thread event message: debugger service failed
The command is : gdb -batch -x scriptgdb.withoutserv.out
I don't know what the problem is, may be on the way I use gdb ? (The
script is in attachment)
It seems that gdb have some problems with the multithreaded application,
is it a known "bug" ?
Any help will be appreciated.
Regards,
Christophe
--
Christophe BENOIT, Production logiciels 6500
AASTRA MATRA Telecom
1 rue Arnold Schoenberg
78280 Guyancourt
e-mail: christophe.benoit@aastra.com
[-- Attachment #2: scriptgdb.withoutserv.out --]
[-- Type: application/octet-stream, Size: 1117 bytes --]
echo -- Suppression de la pagination\n
set pagination off
echo -- Mise en route verbose et complaint
set verbose on
set complaints 5
show complaints
set confirm off
echo -- Valeur de scheduler-locking\n
show scheduler-locking
echo \n-- Attache sur PID\n
attach 15809
echo \n-- On coupe le Watchdog\n
print maid_system[3]
set maid_system[3]=0
print maid_system[3]
echo \n-- Pose du breakpoint\n
break cm291aaa.c:1362
c
echo \n-- Info threads\n
info threads
set $IND=0
# On ne passe que 5 fois dans le breakpoint
while($IND != 50)
printf "\n-- Breakpoint rencontre pour la %d fois\n",$IND
#echo \n-- Listing du code du breakpoint :\n
#list
echo \n-- Valeurs des variables locales\n
info local
# echo \n-- Info threads\n
# info threads
echo \n-- Info process\n
info proc
# On continue lexecution
echo \n-- Continue\n
c
echo \n-- Breakpoint atteint\n
set $IND += 1
end
echo \n-- Suppression du breakpoint\n
delete breakpoints
echo \n-- On remet le Watchdog\n
print maid_system[3]
set maid_system[3]=65535
print maid_system[3]
echo \n-- On se detache du process\n
detach
quit
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Cannot get thread event message: debugger service failed
2006-10-26 12:41 ` Cannot get thread event message: debugger service failed Christophe Benoit
@ 2006-10-26 12:45 ` Daniel Jacobowitz
2006-10-26 13:31 ` Christophe Benoit
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2006-10-26 12:45 UTC (permalink / raw)
To: Christophe Benoit; +Cc: gdb
On Thu, Oct 26, 2006 at 02:41:43PM +0200, Christophe Benoit wrote:
> Hi everybody,
>
> I am trying to use gdb script on a multithreaded application.
>
> My script is very simple :
> - Attach on the process
> - I set a breakpoint
> - I use a while statement to reach the breakpoint fifty times
> - After that, I delete the breakpoint, detach and quit.
>
>
> The problem is that, sometimes, when the breakpoint is reach, gdb goes
> in error:
>
> [New Thread -1210061904 (LWP 15939)]
> scriptgdb.withoutserv.out:56: Error in sourced command file:
> Cannot get thread event message: debugger service failed
Before today I'd never even seen that error, and now twice. I have no
idea what is causing this. If you are using an older version of GDB,
I recommend trying a current one; otherwise, we would need an
application that can reproduce the problem.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Cannot get thread event message: debugger service failed
2006-10-26 12:45 ` Daniel Jacobowitz
@ 2006-10-26 13:31 ` Christophe Benoit
0 siblings, 0 replies; 5+ messages in thread
From: Christophe Benoit @ 2006-10-26 13:31 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb
> > The problem is that, sometimes, when the breakpoint is reach, gdb
goes
> > in error:
> >
> > [New Thread -1210061904 (LWP 15939)]
> > scriptgdb.withoutserv.out:56: Error in sourced command file:
> > Cannot get thread event message: debugger service failed
>
> Before today I'd never even seen that error, and now twice. I have no
> idea what is causing this. If you are using an older version of GDB,
> I recommend trying a current one; otherwise, we would need an
> application that can reproduce the problem.
Thanks Daniel,
I have just updated to the last release of gdb, the problem is always
here.
I will try to see with our development team if we can determine when
this problem occurred.
I will give you some feedback as soon as possible.
Christophe
>
> --
> Daniel Jacobowitz
> CodeSourcery
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-12-01 22:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-25 8:10 Cannot get thread event message: debugger service failed D. Hugh Redelmeier
2008-12-01 22:27 ` Michael Snyder
-- strict thread matches above, loose matches on Subject: below --
2006-10-25 7:05 Gdb Russell Shaw
2006-10-26 12:41 ` Cannot get thread event message: debugger service failed Christophe Benoit
2006-10-26 12:45 ` Daniel Jacobowitz
2006-10-26 13:31 ` Christophe Benoit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox