public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Re: segmentation fault on exit in Insight 5.0
@ 2000-06-28 15:17 Nicholas_Karagas
  0 siblings, 0 replies; 7+ messages in thread
From: Nicholas_Karagas @ 2000-06-28 15:17 UTC (permalink / raw)
  To: Jim Ingham; +Cc: insight

>OTOH, I am made nervous by the statement "Note that the line numbers for
>remote.c may not match yours exactly, as I have some stuff specific to our
>particular setup in there."  Given that the crash is down below
remote_kill,
>Nicholas really needs to try this with the vanilla version of Insight if
he
>can, and see if he gets the crash there.  I haven't heard any reports of
>Insight crashing like this on some other systems, so with no disrespect to
>Nicholas, we really need to remove his code from the loop first, before we
>can help with the problem further...
>
>Jim

The remote.c stuff is just sending a couple of extra characters to the
target, no big deal.  I've actually tracked down and solved the problem,
though.  What I don't really understand is why am I the only one seeing
this?  Does everyone else just use the close box :)  The problem is this:
When you select 'Exit' from the file menu, it runs (after some other stuff)
gdb_force_quit, which runs quit_force from top.c.  One of the last things
that quit_force does, through some function or other, is to delete all of
the remaining windows.  Now, there is some code in managedwin.ith that
says, 'when you delete the last window, call gdb_force_quit'.  Oops!  I
don't know if this little bit of recursion is intentional, but it causes a
SIGSEGV because it causes gdb to try to close the remote target again,
after the scb (serial control block?) has already been deallocated by the
previous quit_force.  To solve, I changed the following (sorry, I don't
know how to use CVS so I can't give you the changes in a nicer format):  I
changed quit_if_last in managedwin.ith to return 0 instead of 1, so that it
no longer calls gdb_force_quit whan the last window is deleted.  This
unfortunately breaks closing the program with the close box, so I had to
make the following changes to _exit in srcwin.itb:

body SrcWin::_exit {} {
    debug
    if {[llength [ManagedWin::find SrcWin]] == 1} {
      gdbtk_quit
    } else {
      after idle [delete object $this]
    }
  }

This way, quit_force does not ever have to be called from the destructor of
the last window, which (IMHO) provides more consistant behavior.  Let me
know if you think these are good changes, or if you have a better fix.

Nicholas Karagas
Associate Software Engineer
Cirilium Corporation
Tempe, AZ
(480) 317-1144

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

* Re: segmentation fault on exit in Insight 5.0
  2000-06-28 14:36     ` Chris Faylor
@ 2000-06-28 14:38       ` Chris Faylor
  0 siblings, 0 replies; 7+ messages in thread
From: Chris Faylor @ 2000-06-28 14:38 UTC (permalink / raw)
  To: Jim Ingham; +Cc: Nicholas_Karagas, insight

Oops.  Sorry.

On Wed, Jun 28, 2000 at 05:36:29PM -0400, Chris Faylor wrote:
>Yeah, he sent me private email apprising me of this situation.
                  ^^^^^^^
		  public

cgf

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

* Re: segmentation fault on exit in Insight 5.0
  2000-06-28 14:27   ` Jim Ingham
@ 2000-06-28 14:36     ` Chris Faylor
  2000-06-28 14:38       ` Chris Faylor
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Faylor @ 2000-06-28 14:36 UTC (permalink / raw)
  To: Jim Ingham; +Cc: Nicholas_Karagas, insight

On Wed, Jun 28, 2000 at 02:27:40PM -0700, Jim Ingham wrote:
>Also sprach Chris Faylor:
>
>> On Tue, Jun 27, 2000 at 10:21:36AM -0700, Nicholas_Karagas@cirilium.com wrote:
>>> Hello again,
>>> 
>>> I tried downloading the gdb/Insight 5.0 release, and still have the same
>>> problem (SIGSEGV when exiting).  Here's the complete backtrace (actually,
>>> all output) from debugging the Insight session.  All I did was start
>>> Insight with my .gdbinit file and immediately exit.  Note that the line
>>> numbers for remote.c may not match yours exactly, as I have some stuff
>>> specific to our particular setup in there.  I am connecting to a remote
>>> m68k via Remote/Serial at 38400 baud.  I am running Cygwin 1.1.0(0.18/3/2)
>>> (from uname -r) on WINNT 4.0 (Build 1381: Service Pack 6).  Any help on
>>> this would be greatly appreciated.  Thanks.
>>> 
>>> GNU gdb 4.17.1
>> ^^^^^^
>> This is not gdb 5.0.
>
>Chris,
>
>I think he is using a 4.17.1 version of gdb to debug the gdb crash.  That is
>not the version of Insight that he is trying to run...

Yeah, he sent me private email apprising me of this situation.

I was lulled into a false sense of superiority because we recently
had exactly this problem on the cygwin mailing list.  Somebody was
complaining about running the "new" version of gdb and their version
string showed "4.17-GNATS" or something like that.

On rereading, I share your concerns about running a tarnished version
of remote.c

cgf

>OTOH, I am made nervous by the statement "Note that the line numbers for
>remote.c may not match yours exactly, as I have some stuff specific to our
>particular setup in there."  Given that the crash is down below remote_kill,
>Nicholas really needs to try this with the vanilla version of Insight if he
>can, and see if he gets the crash there.  I haven't heard any reports of
>Insight crashing like this on some other systems, so with no disrespect to
>Nicholas, we really need to remove his code from the loop first, before we

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

* Re: segmentation fault on exit in Insight 5.0
  2000-06-28 12:54 ` Chris Faylor
@ 2000-06-28 14:27   ` Jim Ingham
  2000-06-28 14:36     ` Chris Faylor
  0 siblings, 1 reply; 7+ messages in thread
From: Jim Ingham @ 2000-06-28 14:27 UTC (permalink / raw)
  To: Chris Faylor, Nicholas_Karagas; +Cc: insight

Also sprach Chris Faylor:

> On Tue, Jun 27, 2000 at 10:21:36AM -0700, Nicholas_Karagas@cirilium.com wrote:
>> Hello again,
>> 
>> I tried downloading the gdb/Insight 5.0 release, and still have the same
>> problem (SIGSEGV when exiting).  Here's the complete backtrace (actually,
>> all output) from debugging the Insight session.  All I did was start
>> Insight with my .gdbinit file and immediately exit.  Note that the line
>> numbers for remote.c may not match yours exactly, as I have some stuff
>> specific to our particular setup in there.  I am connecting to a remote
>> m68k via Remote/Serial at 38400 baud.  I am running Cygwin 1.1.0(0.18/3/2)
>> (from uname -r) on WINNT 4.0 (Build 1381: Service Pack 6).  Any help on
>> this would be greatly appreciated.  Thanks.
>> 
>> GNU gdb 4.17.1
> ^^^^^^
> This is not gdb 5.0.
> 
> cgf
> 

Chris,

I think he is using a 4.17.1 version of gdb to debug the gdb crash.  That is
not the version of Insight that he is trying to run...

OTOH, I am made nervous by the statement "Note that the line numbers for
remote.c may not match yours exactly, as I have some stuff specific to our
particular setup in there."  Given that the crash is down below remote_kill,
Nicholas really needs to try this with the vanilla version of Insight if he
can, and see if he gets the crash there.  I haven't heard any reports of
Insight crashing like this on some other systems, so with no disrespect to
Nicholas, we really need to remove his code from the loop first, before we
can help with the problem further...

Jim

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

* Re: segmentation fault on exit in Insight 5.0
@ 2000-06-28 13:12 Nicholas_Karagas
  0 siblings, 0 replies; 7+ messages in thread
From: Nicholas_Karagas @ 2000-06-28 13:12 UTC (permalink / raw)
  To: Chris Faylor; +Cc: insight

>>Hello again,
>>
>>I tried downloading the gdb/Insight 5.0 release, and still have the same
>>problem (SIGSEGV when exiting).  Here's the complete backtrace (actually,
>>all output) from debugging the Insight session.  All I did was start
>>Insight with my .gdbinit file and immediately exit.  Note that the line
>>numbers for remote.c may not match yours exactly, as I have some stuff
>>specific to our particular setup in there.  I am connecting to a remote
>>m68k via Remote/Serial at 38400 baud.  I am running Cygwin
1.1.0(0.18/3/2)
>>(from uname -r) on WINNT 4.0 (Build 1381: Service Pack 6).  Any help on
>>this would be greatly appreciated.  Thanks.
>>
>>GNU gdb 4.17.1
>         ^^^^^^
>This is not gdb 5.0.
>
>cgf

No, I realize that 4.17.1 is not 5.0.  But you must have misunderstood me.
I was debugging the Insight/gdb 5.0 cross-debugger for m68k, and to debug
it I was using my local gdb, which happens to be 4.17.1.  (In other words,
the command I entered to get the above output was "gdb m68k-coff-gdb".)
The segmentation violation is in Insight 5.0, not gdb 4.17.1.  Please take
a look at the rest of the output dump if you want to see the problem.  I
could not show the output from Insight 5.0, because the fault only occurs
when I use the GUI.

Nicholas Karagas
Associate Software Engineer
Cirilium Corporation
Tempe, AZ
(480) 317-1144

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

* Re: segmentation fault on exit in Insight 5.0
  2000-06-27 10:22 Nicholas_Karagas
@ 2000-06-28 12:54 ` Chris Faylor
  2000-06-28 14:27   ` Jim Ingham
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Faylor @ 2000-06-28 12:54 UTC (permalink / raw)
  To: Nicholas_Karagas; +Cc: insight

On Tue, Jun 27, 2000 at 10:21:36AM -0700, Nicholas_Karagas@cirilium.com wrote:
>Hello again,
>
>I tried downloading the gdb/Insight 5.0 release, and still have the same
>problem (SIGSEGV when exiting).  Here's the complete backtrace (actually,
>all output) from debugging the Insight session.  All I did was start
>Insight with my .gdbinit file and immediately exit.  Note that the line
>numbers for remote.c may not match yours exactly, as I have some stuff
>specific to our particular setup in there.  I am connecting to a remote
>m68k via Remote/Serial at 38400 baud.  I am running Cygwin 1.1.0(0.18/3/2)
>(from uname -r) on WINNT 4.0 (Build 1381: Service Pack 6).  Any help on
>this would be greatly appreciated.  Thanks.
>
>GNU gdb 4.17.1
         ^^^^^^
This is not gdb 5.0.

cgf

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

* segmentation fault on exit in Insight 5.0
@ 2000-06-27 10:22 Nicholas_Karagas
  2000-06-28 12:54 ` Chris Faylor
  0 siblings, 1 reply; 7+ messages in thread
From: Nicholas_Karagas @ 2000-06-27 10:22 UTC (permalink / raw)
  To: insight

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 8265 bytes --]

Hello again,

I tried downloading the gdb/Insight 5.0 release, and still have the same
problem (SIGSEGV when exiting).  Here's the complete backtrace (actually,
all output) from debugging the Insight session.  All I did was start
Insight with my .gdbinit file and immediately exit.  Note that the line
numbers for remote.c may not match yours exactly, as I have some stuff
specific to our particular setup in there.  I am connecting to a remote
m68k via Remote/Serial at 38400 baud.  I am running Cygwin 1.1.0(0.18/3/2)
(from uname -r) on WINNT 4.0 (Build 1381: Service Pack 6).  Any help on
this would be greatly appreciated.  Thanks.

GNU gdb 4.17.1
Copyright 1998 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-cygwin32"...
(gdb) set args -x /.gdbinit
(gdb) run
Starting program: /usr/local/insight/bin/m68k-coff-gdb.exe -x /.gdbinit
66700000:/usr/local/insight/bin/cygitcl30.dll
66000000:/usr/local/insight/bin/cygtcl80.dll
61000000:/cygnus/CYGWIN~1/H-I586~1/bin/cygwin1.dll
77e70000:/WINNT/system32/USER32.dll
77ed0000:/WINNT/system32/GDI32.dll
77e10000:/WINNT/system32/RPCRT4.dll
66800000:/usr/local/insight/bin/cygitk30.dll
66300000:/usr/local/insight/bin/cygtk80.dll
77d80000:/WINNT/system32/comdlg32.dll
77c40000:/WINNT/system32/SHELL32.dll
715a0000:/WINNT/system32/COMCTL32.dll
66600000:/usr/local/insight/bin/tix4180.dll
77bf0000:/WINNT/System32/rpcltc1.dll
77800000:/WINNT/System32/netapi32.dll
78000000:/WINNT/system32/MSVCRT.dll
52000000:/WINNT/System32/INDICDLL.dll
76ab0000:/WINNT/System32/IMM32.dll
711d0000:/WINNT/system32/MSIDLE.DLL

Program received signal SIGSEGV, Segmentation fault.
0x47338e in serial_write (scb=0x0, str=0x291d1f0 "$k#6b", len=5)
    at serial.c:387
387    return (scb->ops->write (scb, str, len));
(gdb) bt
#0  0x47338e in serial_write (scb=0x0, str=0x291d1f0 "$k#6b", len=5)
    at serial.c:387
#1  0x44c4c7 in putpkt_binary (buf=0x44cb21 "k", cnt=1) at remote.c:3857
#2  0x44c374 in putpkt (buf=0x44cb21 "k") at remote.c:3805
#3  0x473921 in catch_errors (func=0x44c320 <putpkt>, args=0x44cb21,
    errstring=0x44cb20 "", mask=4) at top.c:615
#4  0x44cb57 in remote_kill () at remote.c:4176
#5  0x47736c in quit_force (args=0x0, from_tty=1) at top.c:3569
#6  0x4517aa in gdb_force_quit (clientData=0x451798, interp=0xa054430,
objc=1,
    objv=0xa0550b4) at ./gdbtk/generic/gdbtk-cmds.c:671
#7  0x451604 in wrapped_call (opaque_args=0x291d4cc)
    at ./gdbtk/generic/gdbtk-cmds.c:550
#8  0x473921 in catch_errors (func=0x4515ec <wrapped_call>, args=0x291d4cc,
    errstring=0x4514c2 "", mask=6) at top.c:615
#9  0x451538 in call_wrapper (clientData=0x451798, interp=0xa054430,
objc=1,
    objv=0xa0550b4) at ./gdbtk/generic/gdbtk-cmds.c:488
#10 0x66021258 in TclExecuteByteCode (interp=0xa054430, codePtr=0xa49e198)
    at ./../generic/tclExecute.c:955
#11 0x66004cf0 in Tcl_EvalObj (interp=0xa054430, objPtr=0xa20c108)
    at ./../generic/tclBasic.c:2645
#12 0x667090da in Itcl_EvalMemberCode (interp=0xa054430, mfunc=0xa0a90b0,
    member=0xa1d56a8, contextObj=0xa3602a8, objc=1, objv=0xa369468)
    at /insight-5.0/itcl/itcl/generic/itcl_methods.c:1029
#13 0x6670a959 in Itcl_InvokeMethodIfExists (interp=0xa054430,
    name=0x6670b3a8 "destructor", contextClass=0xa19a988,
    contextObj=0xa3602a8, objc=0, objv=0x0)
    at /insight-5.0/itcl/itcl/generic/itcl_methods.c:2441
#14 0x6670b3e7 in ItclDestructBase (interp=0xa054430, contextObj=0xa3602a8,
    contextClass=0xa19a988, flags=0)
    at /insight-5.0/itcl/itcl/generic/itcl_objects.c:428
#15 0x6670b40f in ItclDestructBase (interp=0xa054430, contextObj=0xa3602a8,
    contextClass=0xa352550, flags=0)
    at /insight-5.0/itcl/itcl/generic/itcl_objects.c:445
#16 0x6670b40f in ItclDestructBase (interp=0xa054430, contextObj=0xa3602a8,
    contextClass=0xa2eb8f8, flags=0)
    at /insight-5.0/itcl/itcl/generic/itcl_objects.c:445
#17 0x6670b371 in Itcl_DestructObject (interp=0xa054430,
contextObj=0xa3602a8,
    flags=0) at /insight-5.0/itcl/itcl/generic/itcl_objects.c:383
#18 0x6670b271 in Itcl_DeleteObject (interp=0xa054430,
contextObj=0xa3602a8)
    at /insight-5.0/itcl/itcl/generic/itcl_objects.c:300
#19 0x667058a7 in Itcl_DelObjectCmd (clientData=0xa091ca0,
interp=0xa054430,
    objc=2, objv=0xa4a37d0) at
/insight-5.0/itcl/itcl/generic/itcl_cmds.c:836
#20 0x667073fd in HandleEnsemble (clientData=0xa0674a0, interp=0xa054430,
    objc=3, objv=0xa0550a8)
    at /insight-5.0/itcl/itcl/generic/itcl_ensemble.c:1543
#21 0x66021258 in TclExecuteByteCode (interp=0xa054430, codePtr=0xa3f28d0)
    at ./../generic/tclExecute.c:955
#22 0x66004cf0 in Tcl_EvalObj (interp=0xa054430, objPtr=0xa4b32d0)
    at ./../generic/tclBasic.c:2645
#23 0x6600492f in Tcl_Eval (interp=0xa054430,
    string=0x291e42c "itcl::delete object ::.srcwin0.srcwin")
    at ./../generic/tclBasic.c:2453
#24 0x6600621c in Tcl_GlobalEval (interp=0xa054430,
    command=0x291e42c "itcl::delete object ::.srcwin0.srcwin")
    at ./../generic/tclBasic.c:3983
#25 0x6631b34d in Tk_BindEvent (bindingTable=0xa063ac8, eventPtr=0x291e5dc,
    tkwin=0xa1a46f0, numObjects=0, objectPtr=0x291e54c)
    at ./../generic/tkBind.c:1731
#26 0x66333aad in TkBindEventProc (winPtr=0xa1a46f0, eventPtr=0x291e5dc)
    at ./../generic/tkCmds.c:242
#27 0x6633a36d in Tk_HandleEvent (eventPtr=0x291e5dc)
    at ./../generic/tkEvent.c:657
#28 0x663785fc in Tk_DestroyWindow (tkwin=0xa1a46f0)
    at ./../generic/tkWindow.c:1138
#29 0x6637856f in Tk_DestroyWindow (tkwin=0xa1be478)
    at ./../generic/tkWindow.c:1081
#30 0x6637856f in Tk_DestroyWindow (tkwin=0xa05df20)
    at ./../generic/tkWindow.c:1081
#31 0x6637926d in DeleteWindowsExitProc (clientData=0x0)
    at ./../generic/tkWindow.c:2447
#32 0x6601fec4 in Tcl_Finalize () at ./../generic/tclEvent.c:532
#33 0x450288 in gdbtk_cleanup (dummy=0x0) at ./gdbtk/generic/gdbtk.c:360
#34 0x47a27d in do_my_cleanups (pmy_chain=0x557750, old_chain=0x0)
    at utils.c:281
#35 0x47a209 in do_final_cleanups (old_chain=0x0) at utils.c:248
#36 0x47739a in quit_force (args=0x0, from_tty=1) at top.c:3579
#37 0x4517aa in gdb_force_quit (clientData=0x451798, interp=0xa054430,
objc=1,
    objv=0xa0550a4) at ./gdbtk/generic/gdbtk-cmds.c:671
#38 0x451604 in wrapped_call (opaque_args=0x291e8fc)
    at ./gdbtk/generic/gdbtk-cmds.c:550
#39 0x473921 in catch_errors (func=0x4515ec <wrapped_call>, args=0x291e8fc,
    errstring=0x4514c2 "", mask=6) at top.c:615
#40 0x451538 in call_wrapper (clientData=0x451798, interp=0xa054430,
objc=1,
    objv=0xa0550a4) at ./gdbtk/generic/gdbtk-cmds.c:488
#41 0x66021258 in TclExecuteByteCode (interp=0xa054430, codePtr=0xa49b7c0)
    at ./../generic/tclExecute.c:955
#42 0x66004cf0 in Tcl_EvalObj (interp=0xa054430, objPtr=0xa149d00)
    at ./../generic/tclBasic.c:2645
#43 0x66043e01 in TclObjInterpProc (clientData=0xa18a108, interp=0xa054430,
    objc=1, objv=0xa0550a0) at ./../generic/tclProc.c:996
#44 0x66021258 in TclExecuteByteCode (interp=0xa054430, codePtr=0xa4e1de0)
    at ./../generic/tclExecute.c:955
#45 0x66004cf0 in Tcl_EvalObj (interp=0xa054430, objPtr=0xa1456d0)
    at ./../generic/tclBasic.c:2645
#46 0x6600492f in Tcl_Eval (interp=0xa054430, string=0x291f604
"gdbtk_quit")
    at ./../generic/tclBasic.c:2453
#47 0x6600621c in Tcl_GlobalEval (interp=0xa054430,
    command=0x291f604 "gdbtk_quit") at ./../generic/tclBasic.c:3983
#48 0x6631eb30 in TkCopyAndGlobalEval (interp=0xa054430,
    script=0xa3bedd8 "P1\n\n ±\aait") at ./../generic/tkBind.c:4547
#49 0x6635482c in TkInvokeMenu (interp=0xa054430, menuPtr=0xa3a4290,
index=8)
    at ../generic/tkMenu.c:922
#50 0x6630ce5f in TkWinHandleMenuEvent (phwnd=0x291f868,
pMessage=0x291f86c,
    pwParam=0x291f870, plParam=0x291f874, plResult=0x291f85c)
    at tkWinMenu.c:977
#51 0x66314d3a in WmProc (hwnd=0xd60188, message=273, wParam=56, lParam=0)
    at tkWinWm.c:3965
#52 0x77e7124c in _temp_a_iname ()
(gdb) quit
The program is running.  Exit anyway? (y or n)


Nicholas Karagas
Associate Software Engineer
Cirilium Corporation
Tempe, AZ
(480) 317-1144

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

end of thread, other threads:[~2000-06-28 15:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-28 15:17 segmentation fault on exit in Insight 5.0 Nicholas_Karagas
  -- strict thread matches above, loose matches on Subject: below --
2000-06-28 13:12 Nicholas_Karagas
2000-06-27 10:22 Nicholas_Karagas
2000-06-28 12:54 ` Chris Faylor
2000-06-28 14:27   ` Jim Ingham
2000-06-28 14:36     ` Chris Faylor
2000-06-28 14:38       ` Chris Faylor

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