Subject: Re: gdb/PTRACE broken on sparc64?
To: None <current-users@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: port-sparc64
Date: 09/12/2006 16:35:10
On Tue, Sep 12, 2006 at 04:29:03PM -0500, David Young wrote:
> With -current sources of last night, I see the following error when I
> try to attach to a live process with gdb.  Anybody else?
> 
>   % sudo gdb ~/scratch-cuw/Z/utd/utd `pgrep utd`
>   GNU gdb 5.3nb1
>   Copyright 2002 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 "sparc64--netbsdelf"...
>   Attaching to program: /u1/dyoung/scratch-cuw/Z/utd/utd, process 1098
>   sorry, pid 1098 was killed: orphaned traced process
>   Sep 12 16:23:38 thule /netbsd: pid 1098 was killed: orphaned traced process
>   Bus error (core dumped)
>   % uname -a
>   NetBSD thule.ojctech.com 4.99.1 NetBSD 4.99.1 (GENERIC) #5: Tue Sep 12 12:01:59 CDT 2006  dyoung@cuw.ojctech.com:/u4/dyoung-scratch/new-nbsd/sparc64/O/sys/arch/sparc64/compile/GENERIC sparc64
> 
> Presumably this is fallout from recent PTRACE changes?

Nothing has changed, but now I can get a little bit further before the
error occurs,

% sudo gdb ~/scratch-cuw/Z/utd/utd `pgrep utd`
GNU gdb 5.3nb1
Copyright 2002 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 "sparc64--netbsdelf"...
Attaching to program: /u1/dyoung/scratch-cuw/Z/utd/utd, process 1406
Reading symbols from /u1/dyoung/scratch-cuw/Z/ssrv/libssrv.so.0...done.
Loaded symbols for /u1/dyoung/scratch-cuw/Z/ssrv/libssrv.so.0
Reading symbols from /u1/dyoung/scratch-cuw/Z/log/liblog.so.0...done.
Loaded symbols for /u1/dyoung/scratch-cuw/Z/log/liblog.so.0
Reading symbols from /u1/dyoung/scratch-cuw/Z/misc/libmisc.so.0...done.
Loaded symbols for /u1/dyoung/scratch-cuw/Z/misc/libmisc.so.0
Reading symbols from /usr/lib/libevent.so.1...done.
Loaded symbols for /usr/lib/libevent.so.1
Reading symbols from /usr/lib/libutil.so.7...done.
Loaded symbols for /usr/lib/libutil.so.7
Reading symbols from /usr/lib/libc.so.12...done.
Loaded symbols for /usr/lib/libc.so.12
Reading symbols from /usr/libexec/ld.elf_so...done.
Loaded symbols for /usr/libexec/ld.elf_so
0x0000000040b03824 in kq_dispatch () from /usr/lib/libevent.so.1
(gdb) where
#0  0x0000000040b03824 in kq_dispatch () from /usr/lib/libevent.so.1
#1  0x0000000040b054a0 in event_base_loop () from /usr/lib/libevent.so.1
sorry, pid 1406 was killed: orphaned traced process
Sep 12 16:33:23 thule /netbsd: pid 1406 was killed: orphaned traced process
Segmentation fault (core dumped)
[1]  + Hangup                        sudo /u1/dyoung/scratch-cuw/Z/utd/utd 64.198.255.12,2525 192.168.49.1/24

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933