Open hanwen-flow opened 3 weeks ago
It is a known issue. Someone has to introduce a kernel interface for that.
@kolyshkin wrote a fun article about that a few years ago: https://medium.com/@kolyshkin/oracle-in-a-docker-container-checkpoint-restore-debug-fun-dda98b7302ed
We can try doing same as it is done in OpenVZ
https://github.com/OpenVZ/vzkernel/commit/2602bde7a34fff55753e8568527c2260c4939c30 https://github.com/OpenVZ/criu/commit/df8fec2c9250f6c3330eb529eca39d7d2ca5219b
Sadly it relies heavily on "ve" container object which is OpenVZ specific, but probably it would be not so hard to rework it to time-namespace based approach instead.
start_boottime_timens
, to show it in /proc/$pid/stat inside timens, outside we should probably show regular start_boottime
prctl_set_task_ct_fields
via prctl (maybe restrict it to CAP_SYS_ADMIN, so that container user can't change it)
Description
The process start time (entry 22 in /proc/$PID/stat) is not restored faithfully.
This is a problem, b/c the software I'm trying to checkpoint/restore has a client that uses the pid + start time to check if it the server wasn't changed from under it.
version info: