processcoredumpprocess-migration

Can you freeze a C/C++ process and continue it on a different host?


I was wondering if it is possible to generate a "core" file, copy if to another machine and then continue execution of the a core file on that machine?

I have seen the gcore utility that will make a core file from a running process. But I do not think gdb can continue execution based on a core file.

Is there any way to just dump the heap/stack and and restore those at a later point?


Solution

  • On modern systems, not from a core file, no you can't. For freezing and restoring an individual process on Linux, CryoPID and the new Kernel-based checkpoint and restart are in the works, but their abilities are currently quite limited. OpenVZ and other virtualization-like softwares can freeze and restore an entire system.