Add support for parsing of TaskState#187
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #187 +/- ##
==========================================
+ Coverage 74.14% 74.37% +0.23%
==========================================
Files 13 13
Lines 1257 1284 +27
==========================================
+ Hits 932 955 +23
- Misses 251 253 +2
- Partials 74 76 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I see! We had to propagate the task state to display dead/zombie state in process tree in the output. Thanks :) |
2d44b90 to
5a1e201
Compare
5a1e201 to
1b3f54a
Compare
|
Hey @rst0git, out of curiosity, I’d appreciate it if you could explain the design choice behind moving the task states to the go-criu library. Thanks in advance :) |
|
@TusharMohapatra07 The CRIT tool contains most of the code used for parsing CRIU images, and the Go version of this tool provides most of the core functionality used in |
|
Makes sense! Thank you so much :) |
1b3f54a to
d852724
Compare
When parsing the state of a checkpoint, we need to take into account the state of the PID we are analysing. This can be alive, stopped, dead, or zombie. In particular, only processes in alive and stopped task state have CRIU images for memory pages, open files, sockets, etc. This patch extends checkpointctl to display the TaskState of non-alive processes, and skip parsing the runtime state of dead or zombie tasks. Signed-off-by: TusharMohapatra07 <tusharmohapatra.gig@gmail.com> Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Our tests check the content of specific lines in the output, and we need to use consistent output for this to work. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Ensure use_tcp_socket is initialized to a known value. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
fork() returns pid_t, not bool. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Fix implicit declarations for socket, bind, listen, accept, send, and recv. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Prevent undefined behavior caused by uninitialized padding and unused fields in sockaddr_in. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Stop busy-looping when recv() returns 0 or -1. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Use correct string length and avoid sending unintended null byte. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Cast to char* before adding stack size to comply with C standard. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Check for errors when opening the log file before redirecting output. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
enable is already declared, so let's use it to improve readability. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
d852724 to
11d87da
Compare
When parsing the state of a checkpoint, we need to take into account the state of the PID we are analysing. This can be alive, stopped, dead, or zombie. In particular, only processes in alive and stopped task state have CRIU images for memory pages, open files, sockets, etc. This patch extends checkpointctl to display the TaskState of non-alive processes, and skip parsing the runtime state of dead or zombie tasks.
Example:
This patch uses changes to go-criu from checkpoint-restore/go-criu#220