Changes

Jump to navigation Jump to search
1,117 bytes added ,  10:18, 1 November 2013
no edit summary
Line 44: Line 44:     
Some app may use file locks for synchronization. Generally they will use flock or posix file locks, which were achieved by flock or fcntl system calls. For dump/restore, it is hard to be handled perfectly, because we can't guarantee all potential users are dumped for a specific file lock. Right now, we assume that all file lock users are taken into dump, and we should use the --file-locks option on both dump and restore stages if our app may use any file locks. Remember that file locks dump/restore is only safe for container dumping in theory.
 
Some app may use file locks for synchronization. Generally they will use flock or posix file locks, which were achieved by flock or fcntl system calls. For dump/restore, it is hard to be handled perfectly, because we can't guarantee all potential users are dumped for a specific file lock. Right now, we assume that all file lock users are taken into dump, and we should use the --file-locks option on both dump and restore stages if our app may use any file locks. Remember that file locks dump/restore is only safe for container dumping in theory.
 +
 +
== Leave task running after checkpoint ==
 +
 +
In some scenarios a user might want to leave program in a running state once checkpoint complete. For this sake '''criu''' has <code>--leave-running</code> command line option. We strongly encourage '''NOT''' to use it, until you understand what you are doing. Leaving task in a running state may lead to inconsistency between task images and external resources such as opened files, TCP connections.
 +
 +
Imagine a task been dumped and then continue execution, for some reason the task close and delete a file which has been checkpointed — any attempt to restore such task will simply fail because '''criu''' wont be able to open deleted file. Situation become more drastic if TCP connections are checkpointed — during execution the internal state of connections is changed inside kernel and restore then fail as well.
 +
 +
Still, leaving task running might be helpful but it is up to a user to make sure
 +
 +
* No established TCP connections are present
 +
* File system get snapshoted with <code>post-dump</code> script (and then manually restored before criu restore takes place)

Navigation menu