Bug 4249 - ftrace -c /bin/true -- Exception in thread "Thread-1" java.lang.NullPointerException
Summary: ftrace -c /bin/true -- Exception in thread "Thread-1" java.lang.NullPointerEx...
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks: 2245
  Show dependency treegraph
 
Reported: 2007-03-21 22:45 UTC by Andrew Cagney
Modified: 2007-05-04 20:02 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 Andrew Cagney 2007-03-21 22:45:26 UTC
$ ../bindir/ftrace -c /bin/true
Exception in thread "Thread-1" java.lang.NullPointerException
   at frysk.util.Ftrace$1.update(ftrace)
   at java.util.Observable.notifyObservers(libgcj.so.7)
   at frysk.proc.Host$ObservableXXX.notify(ftrace)
   at frysk.proc.Host.add(ftrace)
   at frysk.proc.Proc.<init>(ftrace)
   at frysk.proc.Proc.<init>(ftrace)
   at frysk.proc.LinuxPtraceProc.<init>(ftrace)
   at frysk.proc.LinuxPtraceHost$ProcChanges.update(ftrace)
   at frysk.proc.LinuxPtraceHost$ProcChanges.update(ftrace)
   at frysk.proc.LinuxPtraceHost$ProcChanges.update(ftrace)
   at frysk.proc.LinuxPtraceHost$ProcChanges.update(ftrace)
   at frysk.proc.LinuxPtraceHost.sendrecSelf(ftrace)
   at frysk.proc.Host.getSelf(ftrace)
   at frysk.proc.LinuxPtraceHost.sendCreateAttachedProc(ftrace)
   at frysk.proc.LinuxPtraceHostState$1.handleCreateAttachedProc(ftrace)
   at frysk.proc.Host$3.execute(ftrace)
   at frysk.event.EventLoop.runEventLoop(ftrace)
   at frysk.event.EventLoop.run(ftrace)
Comment 1 Sami Wagiaalla 2007-05-04 21:02:42 UTC
fixed with:


2007-05-04  Sami Wagiaalla  <swagiaal@redhat.com>
	
	* TestFtrace.java: New file.
	
	2007-05-04  Sami Wagiaalla  <swagiaal@redhat.com>
	
	* TestTaskSyscallObserver.java: Added a syscall cache.
	Replaced SyscallEventInfo.arg() with Syscall.getArguments().
	Replaced SyscallEventInfo.returnCode() with Syscall.getReturnCode().
	* SyscallEventInfo.java (arg): Removed.
	(returnCode): Removed.
	* Syscall.java: Changed all calls to SyscallEventInfo.args() to
	this.getArgument().
	Changed all calls to SyscallEventInfo.returnCode() to
	this.getReturnCode().
	* LinuxIa32Syscall.java: Changed second argument of write system call
	to a string.
	* LinuxX8664Syscall.java: Ditto.
	* LinuxPowerPCSyscall.java: Ditto.
	
	2007-05-04  Sami Wagiaalla  <swagiaal@redhat.com>
	
	* StracePrinter.java: Removed SyscallEventInfo argument.
	Removed when argument.
	Split the handle function into handleEnter and handleExit.
	* SyscallHandler.java: Ditto.
	* Ftrace.java: Added forkObserver for properly following forked
	children.
	Stoped use of Refresh for finding forked children.
	Added procObserver to newly added Procs.
	Added tasksObserver to procs executed by ftrace; fix for bz 2916.
	
	2007-05-04  Sami Wagiaalla  <swagiaal@redhat.com>
	
	* observers/SysCallUtilyInfo.java: Replaced use of
	SyscallEventInfo.arg() with Syscall.getArgument().
	Replaced use of SyscallEventInfo.returnCode() with
	Syscall.getReturnCode().



[swagiaal@toner frysk-core]$ ftrace -c /bin/true 
Ftrace.main() Proc.getPid() 21682
Ftrace.main() Proc.getExe() /bin/true
21682.21682 <SYSCALL> brk (NULL) 21682.21682 = 158056448
21682.21682 <SYSCALL> mmap2 (NULL,4096,3,34,-1,-38) 21682.21682 = 0xb7f91000
21682.21682 <SYSCALL> access ("/etc/ld.so.preload",4) 21682.21682 = -1 ERRNO=2
21682.21682 <SYSCALL> open ("/usr/local/lib/tls/i...",0,0) 21682.21682 = -1 ERRNO=2
21682.21682 <SYSCALL> stat64 ("/usr/local/lib/tls/i...",0xbfa6e038) 21682.21682
= -1 ERRNO=2
21682.21682 <SYSCALL> open ("/usr/local/lib/tls/i...",0,0) 21682.21682 = -1 ERRNO=2
21682.21682 <SYSCALL> stat64 ("/usr/local/lib/tls/i...",0xbfa6e038) 21682.21682
= -1 ERRNO=2
21682.21682 <SYSCALL> open ("/usr/local/lib/tls/s...",0,0) 21682.21682 = -1 ERRNO=2
21682.21682 <SYSCALL> stat64 ("/usr/local/lib/tls/s...",0xbfa6e038) 21682.21682
= -1 ERRNO=2
21682.21682 <SYSCALL> open ("/usr/local/lib/tls/l...",0,0) 21682.21682 = -1 ERRNO=2
21682.21682 <SYSCALL> stat64 ("/usr/local/lib/tls",0xbfa6e038) 21682.21682 = -1
ERRNO=2
21682.21682 <SYSCALL> open ("/usr/local/lib/i686/...",0,0) 21682.21682 = -1 ERRNO=2
21682.21682 <SYSCALL> stat64 ("/usr/local/lib/i686/...",0xbfa6e038) 21682.21682
= -1 ERRNO=2
21682.21682 <SYSCALL> open ("/usr/local/lib/i686/...",0,0) 21682.21682 = -1 ERRNO=2
21682.21682 <SYSCALL> stat64 ("/usr/local/lib/i686",0xbfa6e038) 21682.21682 = -1
ERRNO=2
21682.21682 <SYSCALL> open ("/usr/local/lib/sse2/...",0,0) 21682.21682 = -1 ERRNO=2
21682.21682 <SYSCALL> stat64 ("/usr/local/lib/sse2",0xbfa6e038) 21682.21682 = -1
ERRNO=2
21682.21682 <SYSCALL> open ("/usr/local/lib/libc....",0,0) 21682.21682 = -1 ERRNO=2
21682.21682 <SYSCALL> stat64 ("/usr/local/lib",0xbfa6e038) 21682.21682 = 0
21682.21682 <SYSCALL> open ("/etc/ld.so.cache",0,0) 21682.21682 = 3
21682.21682 <SYSCALL> fstat64 (3,0xbfa6dfc4) 21682.21682 = 0
21682.21682 <SYSCALL> mmap2 (NULL,107146,1,2,3,-38) 21682.21682 = 0xb7f76000
21682.21682 <SYSCALL> close (3) 21682.21682 = 0
21682.21682 <SYSCALL> open ("/lib/libc.so.6",0,-1079582556) 21682.21682 = 3
21682.21682 <SYSCALL> read (3,0xbfa6e118,512) 21682.21682 = 512
21682.21682 <SYSCALL> fstat64 (3,0xbfa6e028) 21682.21682 = 0
21682.21682 <SYSCALL> mmap2 (0x491000,1295780,5,2050,3,-38) 21682.21682 = 0x491000
21682.21682 <SYSCALL> mmap2 (0x5c8000,12288,3,2066,3,-38) 21682.21682 = 0x5c8000
21682.21682 <SYSCALL> mmap2 (0x5cb000,9636,3,50,-1,-38) 21682.21682 = 0x5cb000
21682.21682 <SYSCALL> close (3) 21682.21682 = 0
21682.21682 <SYSCALL> mmap2 (NULL,4096,3,34,-1,-38) 21682.21682 = 0xb7f75000
21682.21682 <SYSCALL> set_thread_area (0xbfa6e510) 21682.21682 = 0
21682.21682 <SYSCALL> mprotect (0x5c8000,8192,1) 21682.21682 = 0
21682.21682 <SYSCALL> mprotect (0x48d000,4096,1) 21682.21682 = 0
21682.21682 <SYSCALL> munmap (0xb7f76000,107146) 21682.21682 = 0
21682.21682 <SYSCALL> brk (NULL) 21682.21682 = 158056448
21682.21682 <SYSCALL> brk (0x96dd000) 21682.21682 = 158191616
21682.21682 <SYSCALL> open ("/usr/lib/locale/loca...",32768,1) 21682.21682 = 3
21682.21682 <SYSCALL> fstat64 (3,0x5caaa0) 21682.21682 = 0
21682.21682 <SYSCALL> mmap2 (NULL,2097152,1,2,3,-38) 21682.21682 = 0xb7d75000
21682.21682 <SYSCALL> close (3) 21682.21682 = 0
21682.21682 <SYSCALL> close (1) 21682.21682 = 0
21682.21682 <SYSCALL> exit_group (0)