Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some trapCause may lost #2

Open
hengwu0 opened this issue Feb 12, 2019 · 5 comments
Open

some trapCause may lost #2

hengwu0 opened this issue Feb 12, 2019 · 5 comments

Comments

@hengwu0
Copy link

hengwu0 commented Feb 12, 2019

some trapCause may lost if "var suspended map[int]int" just record only one state.

@orivej
Copy link
Owner

orivej commented Feb 12, 2019

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.

@hengwu0
Copy link
Author

hengwu0 commented Feb 12, 2019

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.

@orivej
Copy link
Owner

orivej commented Feb 12, 2019

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.

@hengwu0
Copy link
Author

hengwu0 commented Feb 13, 2019

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.

@hengwu0
Copy link
Author

hengwu0 commented Feb 13, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants