fptrace
fptrace copied to clipboard
some trapCause may lost
some trapCause may lost if "var suspended map[int]int" just record only one state.
I think that suspended is correct. If fptrace exits with an error, could you post the error message? Try running fptrace with -seccomp=false: if this helps, please show the output of uname -srv.
NOT an error, i think it may lost some states. e.g. Progress B do some EXEC or FORK or exited before fptrace receive progress A(which B's Parent Process)‘s PTRACE_EVENT_FORK.
When fptrace marks a process as suspended here, that process is stopped (as after kill -STOP pid): it will not run and will not generate more events (like syscall, exec, fork, exit) until it is resumed here.
Firstly, it still can be killed by -SIGKILL. Secondly, if progress A(which B's Parent Process) exited before it's PTRACE_EVENT_FORK, Progress B will be stopped forever.
Though it is rarely, but can replay by "go tool dist test" cmd.
[wuheng@localhost fptrace]$ ./fptrace -d a.json go tool dist test
##### Testing packages. panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0xa8 pc=0x516167]
goroutine 1 [running, locked to thread]: main.terminate(0xb495, 0x0, 0xc4200bbc40) /home/wuheng/test/111111111/src/github.com/fptrace/main.go:262 +0x37 main.mainLoop.func1(0xb495) /home/wuheng/test/111111111/src/github.com/fptrace/main.go:150 +0xc3 main.mainLoop(0xc4200bbb90, 0xa920, 0xc4200bbbd0, 0xc4200bbc40, 0x0) /home/wuheng/test/111111111/src/github.com/fptrace/main.go:161 +0x1258 main.main() /home/wuheng/test/111111111/src/github.com/fptrace/main.go:115 +0x82c