public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: attach.exp failure
@ 2003-08-05 19:55 Michael Elizabeth Chastain
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Elizabeth Chastain @ 2003-08-05 19:55 UTC (permalink / raw)
  To: ac131313, carlton; +Cc: gdb

Andrew C writes:

> On Tue, 5 Aug 2003 13:21:33 -0400, Michael Elizabeth Chastain <mec@shout.net> said:

Actually, David C wrote all the useful stuff that you quoted.
I just contributed some useless hysteria about frames and 'sleep'.
Sorry for the hysteria.  :(

Michael C

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

* Re: attach.exp failure
  2003-08-05 17:39 ` David Carlton
@ 2003-08-05 18:06   ` Andrew Cagney
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2003-08-05 18:06 UTC (permalink / raw)
  To: David Carlton; +Cc: Michael Elizabeth Chastain, gdb

> On Tue, 5 Aug 2003 13:21:33 -0400, Michael Elizabeth Chastain <mec@shout.net> said:
> 
> 
>> Looks like gdb crashed or went into a loop.
> 
> 
> Yes.  Running GDB on itself, I get a segfault within reggroup_next, on
> this line:
> 
> 	return el->next->group;
> 
> Which is consistent with the bug having appeared within the last 4
> days, judging from ChangeLog entries.
> 
> I've seen this on two machines now: one with Red Hat 8.0, GCC 3.2, and
> the other with Red Hat 7.3 (possibly modified), GCC 2.96.  Both
> i686-pc-linux-gnu.

Doh, nothing in the test runs I use exercise this.  It should read 
something like:

       if (el->group == last)
	{
	  if (el->next != NULL)
	    return el->next->group;
	  else
	    return NULL;
	}

Andrew


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

* Re: attach.exp failure
  2003-08-05 17:21 Michael Elizabeth Chastain
@ 2003-08-05 17:39 ` David Carlton
  2003-08-05 18:06   ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: David Carlton @ 2003-08-05 17:39 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: gdb, Andrew Cagney

On Tue, 5 Aug 2003 13:21:33 -0400, Michael Elizabeth Chastain <mec@shout.net> said:

> Looks like gdb crashed or went into a loop.

Yes.  Running GDB on itself, I get a segfault within reggroup_next, on
this line:

	return el->next->group;

Which is consistent with the bug having appeared within the last 4
days, judging from ChangeLog entries.

I've seen this on two machines now: one with Red Hat 8.0, GCC 3.2, and
the other with Red Hat 7.3 (possibly modified), GCC 2.96.  Both
i686-pc-linux-gnu.

David Carlton
carlton@kealia.com

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

* Re: attach.exp failure
@ 2003-08-05 17:21 Michael Elizabeth Chastain
  2003-08-05 17:39 ` David Carlton
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Elizabeth Chastain @ 2003-08-05 17:21 UTC (permalink / raw)
  To: carlton, gdb

Well now that's interesting.

  attach 1065
  Attaching to program: /gdb/mirror/src/gdb/testsuite/gdb.base/attach2, process 1065
  Reading symbols from /lib/i686/libm.so.6...done.
  Loaded symbols for /lib/i686/libm.so.6
  Reading symbols from /lib/i686/libc.so.6...done.
  Loaded symbols for /lib/i686/libc.so.6
  Reading symbols from /lib/ld-linux.so.2...done.
  Loaded symbols for /lib/ld-linux.so.2
  0x420b0205 in nanosleep () from /lib/i686/libc.so.6
  (gdb) PASS: gdb.base/attach.exp: attach call
  i r r3
  ERROR: Couldn't send p should_exit = 1 to GDB.
  UNRESOLVED: gdb.base/attach.exp: p should_exit = 1
  ERROR: Couldn't send c to GDB.
  UNRESOLVED: gdb.base/attach.exp: c

Looks like gdb crashed or went into a loop.  Probably crashed because
if it went into a loop, the test would take some long $TIMEOUT time
to run.  Are there any funky core files lying around?

The target program is inside nanosleep, probably called from sleep, and
I know that gdb screws up the frame info when it backtraces through
sleep.

But I have never gotten this behavior.  The connection between
'nanosleep' and a crash is just too tenuous.  Your problem has the
word 'nanosleep' in it but I just don't see a smoking gun linking
it to the 'sleep' frame info problem.  :(
 
What vendor/version of linux are you running on?

Can you disassemble 'sleep' from libc.so and post the first few
instructions?

Want to try this patch?

  http://sources.redhat.com/ml/gdb-patches/2003-08/msg00053.html

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

* attach.exp failure
@ 2003-08-05 16:50 David Carlton
  0 siblings, 0 replies; 5+ messages in thread
From: David Carlton @ 2003-08-05 16:50 UTC (permalink / raw)
  To: gdb

I'm getting failures on gdb.base/attach.exp that I wasn't getting on
August 1:

Running ./gdb.base/attach.exp ...
ERROR: Couldn't send p should_exit = 1 to GDB.
ERROR: Couldn't send c to GDB.

This is on i686-pc-linux-gnu, GCC 3.2, DWARF-2.

Full log below.

David Carlton
carlton@kealia.com

Test Run By carlton on Tue Aug  5 09:48:08 2003
Native configuration is i686-pc-linux-gnu

		=== gdb tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/local/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/local/share/dejagnu/config/unix.exp as generic interface file for target.
Using ./config/unix.exp as tool-and-target-specific interface file.
Running ./gdb.base/attach.exp ...
Executing on build: rm -f /gdb/mirror/src/gdb/testsuite/gdb.base/attach /gdb/mirror/src/gdb/testsuite/gdb.base/attach2    (timeout = 300)
spawn rm -f /gdb/mirror/src/gdb/testsuite/gdb.base/attach /gdb/mirror/src/gdb/testsuite/gdb.base/attach2 
Executing on build: /gdb/mirror/src/gdb/testsuite/gdb.base/attach.awk    (timeout = 300)
spawn /gdb/mirror/src/gdb/testsuite/gdb.base/attach.awk 
Executing on host: gcc ./gdb.base/attach.c  -g  -lm   -o /gdb/mirror/src/gdb/testsuite/gdb.base/attach    (timeout = 300)
spawn gcc ./gdb.base/attach.c -g -lm -o /gdb/mirror/src/gdb/testsuite/gdb.base/attach 
Executing on host: gcc ./gdb.base/attach2.c  -g  -lm   -o /gdb/mirror/src/gdb/testsuite/gdb.base/attach2    (timeout = 300)
spawn gcc ./gdb.base/attach2.c -g -lm -o /gdb/mirror/src/gdb/testsuite/gdb.base/attach2 
Executing on host: gcc ./lib/compiler.c  -E  -o /gdb/mirror/src/gdb/testsuite/gdb.base/attach.ci    (timeout = 300)
spawn gcc ./lib/compiler.c -E -o /gdb/mirror/src/gdb/testsuite/gdb.base/attach.ci 
spawn /gdb/mirror/src/gdb/testsuite/../../gdb/gdb -nw -nx 
GNU gdb 2003-08-05-cvs
Copyright 2003 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 "i686-pc-linux-gnu".
(gdb) set height 0
(gdb) set width 0
(gdb) dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir ./gdb.base
Source directories searched: /gdb/mirror/src/gdb/testsuite/./gdb.base:$cdir:$cwd
(gdb) file /gdb/mirror/src/gdb/testsuite/gdb.base/attach
Reading symbols from /gdb/mirror/src/gdb/testsuite/gdb.base/attach...done.
(gdb) attach abc
Illegal process-id: abc

(gdb) PASS: gdb.base/attach.exp: attach to nonsense is prohibited
attach 0
Attaching to program: /gdb/mirror/src/gdb/testsuite/gdb.base/attach, process 0
ptrace: No such process.
(gdb) PASS: gdb.base/attach.exp: attach to nonexistent process is prohibited
file /gdb/mirror/src/gdb/testsuite/gdb.base/attach
Load new symbol table from "/gdb/mirror/src/gdb/testsuite/gdb.base/attach"? (y or n) y
Reading symbols from /gdb/mirror/src/gdb/testsuite/gdb.base/attach...done.
(gdb) PASS: gdb.base/attach.exp: (re)set file, before attach1
attach 1051
Attaching to program: /gdb/mirror/src/gdb/testsuite/gdb.base/attach, process 1051
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
0x0804834f in main () at gdb.base/attach.c:17
17	      local_i++;
(gdb) PASS: gdb.base/attach.exp: attach1, after setting file
print should_exit
$1 = 0
(gdb) PASS: gdb.base/attach.exp: after attach1, print should_exit
detach
Detaching from program: /gdb/mirror/src/gdb/testsuite/gdb.base/attach, process 1051
(gdb) PASS: gdb.base/attach.exp: attach1 detach
file
No executable file now.
Discard symbol table from `/gdb/mirror/src/gdb/testsuite/gdb.base/attach'? (y or n) y
No symbol file now.
(gdb) PASS: gdb.base/attach.exp: attach1, purging symbols after detach
attach 1051
Attaching to process 1051
Reading symbols from /gdb/mirror/src/gdb/testsuite/gdb.base/attach...done.
Symbols already loaded for /lib/i686/libm.so.6
Symbols already loaded for /lib/i686/libc.so.6
Symbols already loaded for /lib/ld-linux.so.2
0x08048346 in main () at gdb.base/attach.c:15
15	  while (! should_exit)
(gdb) PASS: gdb.base/attach.exp: attach2
set should_exit=1
(gdb) PASS: gdb.base/attach.exp: after attach2, set should_exit
tbreak 19
Breakpoint 1 at 0x8048351: file gdb.base/attach.c, line 19.
(gdb) PASS: gdb.base/attach.exp: after attach2, set tbreak postloop
continue
Continuing.
main () at gdb.base/attach.c:19
19	  return 0;
(gdb) PASS: gdb.base/attach.exp: after attach2, reach tbreak postloop
continue
Continuing.

Program exited normally.
(gdb) PASS: gdb.base/attach.exp: after attach2, exit
Executing on build: kill -9 1051    (timeout = 300)
spawn kill -9 1051 
kill 1051: No such process
dir /gdb/mirror/src/gdb/testsuite/gdb.base
Source directories searched: /gdb/mirror/src/gdb/testsuite/gdb.base:/gdb/mirror/src/gdb/testsuite/./gdb.base:$cdir:$cwd
(gdb) PASS: gdb.base/attach.exp: set source path
cd /tmp
Working directory /tmp.
(gdb) PASS: gdb.base/attach.exp: cd away from process' a.out
symbol
Discard symbol table from `/gdb/mirror/src/gdb/testsuite/gdb.base/attach'? (y or n) y
No symbol file now.
(gdb) PASS: gdb.base/attach.exp: before attach3, flush symbols
exec
No executable file now.
(gdb) PASS: gdb.base/attach.exp: before attach3, flush exec
attach 1057
Attaching to process 1057
Reading symbols from /gdb/mirror/src/gdb/testsuite/gdb.base/attach...done.
Symbols already loaded for /lib/i686/libm.so.6
Symbols already loaded for /lib/i686/libc.so.6
Symbols already loaded for /lib/ld-linux.so.2
main () at gdb.base/attach.c:17
17	      local_i++;
(gdb) PASS: gdb.base/attach.exp: attach when process' a.out not in cwd
kill
Kill the program being debugged? (y or n) y
(gdb) PASS: gdb.base/attach.exp: after attach3, exit
spawn /gdb/mirror/src/gdb/testsuite/../../gdb/gdb -nw -nx 
GNU gdb 2003-08-05-cvs
Copyright 2003 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 "i686-pc-linux-gnu".
(gdb) set height 0
(gdb) set width 0
(gdb) dir
Reinitialize source path to empty? (y or n) y
Source directories searched: $cdir:$cwd
(gdb) dir ./gdb.base
Source directories searched: /gdb/mirror/src/gdb/testsuite/./gdb.base:$cdir:$cwd
(gdb) file /gdb/mirror/src/gdb/testsuite/gdb.base/attach2
Reading symbols from /gdb/mirror/src/gdb/testsuite/gdb.base/attach2...done.
(gdb) PASS: gdb.base/attach.exp: force switch to gdb64, if necessary
attach 1065
Attaching to program: /gdb/mirror/src/gdb/testsuite/gdb.base/attach2, process 1065
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
0x420b0205 in nanosleep () from /lib/i686/libc.so.6
(gdb) PASS: gdb.base/attach.exp: attach call
i r r3
ERROR: Couldn't send p should_exit = 1 to GDB.
UNRESOLVED: gdb.base/attach.exp: p should_exit = 1
ERROR: Couldn't send c to GDB.
UNRESOLVED: gdb.base/attach.exp: c
Executing on build: kill -9 1065    (timeout = 300)
spawn kill -9 1065 
testcase ./gdb.base/attach.exp completed in 12 seconds

		=== gdb Summary ===

# of expected passes		20
# of unresolved testcases	2
Executing on host: /gdb/mirror/src/gdb/testsuite/../../gdb/gdb -nw --command gdb_cmd    (timeout = 300)
spawn /gdb/mirror/src/gdb/testsuite/../../gdb/gdb -nw --command gdb_cmd 
GNU gdb 2003-08-05-cvs
Copyright 2003 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 "i686-pc-linux-gnu".
/gdb/mirror/src/gdb/testsuite/../../gdb/gdb version  2003-08-05-cvs -nx

runtest completed at Tue Aug  5 09:48:20 2003

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

end of thread, other threads:[~2003-08-05 19:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-05 19:55 attach.exp failure Michael Elizabeth Chastain
  -- strict thread matches above, loose matches on Subject: below --
2003-08-05 17:21 Michael Elizabeth Chastain
2003-08-05 17:39 ` David Carlton
2003-08-05 18:06   ` Andrew Cagney
2003-08-05 16:50 David Carlton

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