🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #2684

Re: GDB 5.1 on 64-bit hpux-11 hangs running 32-bit program

#2684
From: J. Cone
Date: Fri, 08 Feb 2002 06:23
64 lines
3438 bytes
Hello Elena,

Thank you.  It no longer hangs.

My symptoms are now a bus error either running a program in the debugger, 
or attaching the debugger.
Using an older debugger (which goes but can't read the symbols in my 
GCC-3.0.3 program :-(  ),
the top few lines of the back-trace are.

Program received signal SIGBUS, Bus error.
0x92de8 in add_thread (ptid={pid = -1774190241, lwp = 402653185,
       tid = 1426915583}) at thread.c:125
125     {
(top-gdb) bt
#0  0x92de8 in add_thread (ptid={pid = -1774190241, lwp = 402653185,
       tid = 1426915583}) at thread.c:125
#1  0xa1690 in child_acknowledge_created_inferior (pid=29475)
     at infttrace.c:3126
#2  0x9f150 in ptrace_him (pid=29475) at inftarg.c:444
#3  0xed154 in fork_inferior (exec_file_arg=0x7323 "\226@\001_\030",
     allargs=0x400390e0 "", env=0x40039100,
     traceme_fun=0x40016172 <_exit_dummy_decl+5330>,
     init_trace_fun=0x4001617a <_exit_dummy_decl+5338>,
     pre_trace_fun=0x40016182 <_exit_dummy_decl+5346>, shell_file_arg=0x0)
     at fork-child.c:363

ptid is clearly insane, and looking down the stack, there seems to be a 
type conflict
where the caller's data is sane but a completely different shape.

(top-gdb) up
#1  0xa1690 in child_acknowledge_created_inferior (pid=29475)
     at infttrace.c:3126
3126      add_thread (pid);             /* in thread.c */
(top-gdb) print pid
$2 = 29475
(top-gdb) shell ps -ef | fgrep gdb
smf_oper 29416  3418  0 19:17:33 pts/ta    0:00 gdb2 bin/smsMaster.jcone
     root 29456 29177  1 19:18:22 pts/tb    0:01 /opt/gdb/bin/gdb ./gdb 29416
smf_oper 29475 29416  0 19:18:42 pts/ta    0:00 gdb2 bin/smsMaster.jcone
     root 29497 29456  2 19:19:22 pts/tb    0:00 ksh -c ps -ef | fgrep gdb
(top-gdb)

If you know this problem too, I'd love a solution, but it's now 7pm local 
time, so I'm running away, so it's not urgent.

Thanks for your help,
James.

At 00:42 8/02/2002 -0500, Elena Zannoni wrote:
>J. Cone writes:
<snip>
  > The gdb hangs forever having produced:
>  >
>  > (gdb) run
>  > Starting program: /volA/IN/service_packages/SMS/bin/smsMaster.jcone
>
>Yes, known problem, vfork seems to not work properly on such platform.
>Try this patch (of course, adapt it to hpux1100.mh or whatever
>makefile fragment you end up using).
>
>Elena
<snip>
Technical Details
Message-ID: <4.3.2.7.0.20020208191451.03910698@mail.g8labs.co.nz>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb
References: <4.3.2.7.0.20020208180636.03910698@mail.g8labs.co.nz> <4.3.2.7.0.20020208180636.03910698@mail.g8labs.co.nz>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,aaacdf21f8a7ed9c
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 2002-02-07 22:20:00 PST
x-uunet-gateway: mr0.ash.ops.us.uu.net from bug-gdb to gnu.gdb.bug; Fri, 8 Feb 2002 06:19:59 GMT
Message-ID: <4.3.2.7.0.20020208191451.03910698@mail.g8labs.co.nz>
X-Sender: jcone@mail.g8labs.co.nz
X-Mailer: QUALCOMM Windows Eudora Version 4.3.2
Date: Fri, 08 Feb 2002 19:23:26 +1300
From: "J. Cone" <jcone@eservglobal.co.nz>
Subject: Re: GDB 5.1 on 64-bit hpux-11 hangs running 32-bit program
References: <4.3.2.7.0.20020208180636.03910698@mail.g8labs.co.nz>
 <4.3.2.7.0.20020208180636.03910698@mail.g8labs.co.nz>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Approved: bug-gdb-request@mail.gnu.org
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb
Sender: bug-gdb-request@mail.gnu.org
Lines: 66