Bug 4347

Summary: LinuxPtraceTask aborts when trying to activate a new Proc from Source Window
Product: frysk Reporter: Rick Moseley <rmoseley>
Component: generalAssignee: Unassigned <frysk-bugzilla>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 4193    

Description Rick Moseley 2007-04-11 18:02:52 UTC
When calling the "Manager.host.requestCreateAttachedProc(cmd, new
AttachedObserver());" method from the SourceWindowFactory the Linux core
generates an unhandled exception error as follows:

{frysk.proc.LinuxPtraceTask@12f60e0,pid=9905,tid=9905,state=StartMainTask.wantToAttachContinue}
in state "StartMainTask.wantToAttachContinue" did not handle handleTerminatedEvent

java.lang.RuntimeException:
{frysk.proc.LinuxPtraceTask@12f60e0,pid=9905,tid=9905,state=StartMainTask.wantToAttachContinue}
in state "StartMainTask.wantToAttachContinue" did not handle handleTerminatedEvent
   at frysk.proc.State.unhandled(State.java:70)
   at frysk.proc.TaskState.handleTerminatedEvent(TaskState.java:70)
   at frysk.proc.Task.processTerminatedEvent(Task.java:414)
   at frysk.proc.LinuxPtraceWaitBuilder.terminated(LinuxPtraceWaitBuilder.java:217)
   at frysk.sys.Wait.waitAllNoHang(Wait.cxx:276)
   at frysk.event.PollEventLoop$1$PollWaitOnSigChild.execute(PollEventLoop.java:277)
   at frysk.event.PollEventLoop.runEventLoop(PollEventLoop.java:339)
   at frysk.event.EventLoop.run(EventLoop.java:178)
   at frysk.gui.Gui$4.run(Gui.java:367)
   at java.lang.Thread.run(libgcj.so.7)
Comment 1 Rick Moseley 2007-04-13 17:17:52 UTC
This was actually a problem with the GUI passing a file path to execvp with a
space on the front of it.
Comment 2 Andrew Cagney 2007-04-13 19:58:03 UTC
The core shouldn't panic when the exec path is invalid though :-)
Comment 3 Rick Moseley 2007-05-04 20:19:59 UTC
Still seeing this randomly.  Here is another stacktrace:

{frysk.proc.LinuxPtraceTask@1143e00,pid=32052,tid=32052,state=detached} in state
"detached" did not handle handleTerminatedEvent

java.lang.RuntimeException:
{frysk.proc.LinuxPtraceTask@1143e00,pid=32052,tid=32052,state=detached} in state
"detached" did not handle handleTerminatedEvent
   at frysk.proc.State.unhandled(State.java:70)
   at frysk.proc.TaskState.handleTerminatedEvent(TaskState.java:70)
   at frysk.proc.Task.processTerminatedEvent(Task.java:414)
   at frysk.proc.LinuxPtraceWaitBuilder.terminated(LinuxPtraceWaitBuilder.java:218)
   at frysk.sys.Wait.wait(Wait.cxx:568)
   at frysk.sys.Wait.waitAll(Wait.java:106)
   at frysk.event.WaitEventLoop.block(WaitEventLoop.java:83)
   at frysk.event.EventLoop.runEventLoop(EventLoop.java:380)
   at frysk.event.EventLoop.run(EventLoop.java:485)
   at frysk.gui.Gui$4.run(Gui.java:367)
   at java.lang.Thread.run(libgcj.so.7)

This pops up *sometimes* shorty after a source window has been brought up that
has been attached to a running bash process.
Comment 4 Rick Moseley 2007-08-01 19:32:54 UTC
I can no longer reproduce this.  It appears to be fixed.