Bug 5984 - Stack trace when killing/rerunning processes with fhpd
Summary: Stack trace when killing/rerunning processes with fhpd
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Rick Moseley
URL:
Keywords:
Depends on:
Blocks: 2246
  Show dependency treegraph
 
Reported: 2008-03-25 17:55 UTC by Rick Moseley
Modified: 2008-04-17 20:16 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Moseley 2008-03-25 17:55:20 UTC
A stack trace occurs when the following sequence is executed:

(fhpd) load ../pkglibdir/funit-hello
[0.0] Loaded executable file:
/home/rmoseley/frysk-git1/build/frysk-core/frysk/bindir/../pkglibdir/funit-hello
(fhpd) load ../pkglibdir/funit-threads-looper
[1.0] Loaded executable file:
/home/rmoseley/frysk-git1/build/frysk-core/frysk/bindir/../pkglibdir/funit-threads-looper
(fhpd) focus
Target set      pid     id      path-to-executable
[0.0]           0       0      
/home/rmoseley/frysk-git1/build/frysk-core/frysk/bindir/../pkglibdir/funit-hello
[1.0]           0       0      
/home/rmoseley/frysk-git1/build/frysk-core/frysk/bindir/../pkglibdir/funit-threads-looper
(fhpd) run
Attached to process 15662
Attached to process 15663
running with this command: ../pkglibdir/funit-hello
Running process 15662
running with this command: ../pkglibdir/funit-threads-looper
Running process 15663
(fhpd) Task 15662 is terminating from signal SIGSEGV(11)
focus
Target set      pid     id      path-to-executable
[0.0]           15662   15662  
/home/rmoseley/frysk-git1/build/frysk-core/frysk/pkglibdir/funit-hello
[1.0]           15663   15663  
/home/rmoseley/frysk-git1/build/frysk-core/frysk/pkglibdir/funit-threads-looper
[1.1]           15663   15664   (same)
(fhpd) run
Killing process 15662 that was created from
/home/rmoseley/frysk-git1/build/frysk-core/frysk/pkglibdir/funit-hello
Killing process 15663 that was created from
/home/rmoseley/frysk-git1/build/frysk-core/frysk/pkglibdir/funit-threads-looper
Exception in thread "main" java.lang.NullPointerException
   at frysk.sys.Fork.spawn(Fork.cxx:134)
   at frysk.sys.Fork.ptrace(Fork.java:97)
   at frysk.proc.live.LinuxPtraceHost$4.execute(LinuxPtraceHost.java:273)
   at frysk.event.EventLoop.runEventLoop(EventLoop.java:365)
   at frysk.event.EventLoop.run(EventLoop.java:482)
   at frysk.bindir.fhpd.main(fhpd.java:185)
Comment 1 Stan Cox 2008-04-10 15:14:55 UTC
Ends up not being related to sysroot. 
frysk.proc.live.LinuxPtraceHost.requestCreateAttachedProc sometimes arrives with
args == null.  So you end up in frysk.proc.live.LinuxPtraceHost$4.execute() then
frysk.sys.Fork.ptrace then spawn() which checks:
int argc = JvGetArrayLength (args); 
which cuases the failure
Comment 2 Rick Moseley 2008-04-17 20:16:12 UTC
This bug has been fixed, as Stan found out it was null args being passed up to
the code that activates a process.  This was fixed when bz's 550/5501 were fixed.