Difference between revisions of "Postulates"

From CRIU
Jump to navigation Jump to search
(some reformatting / rephrasing, added see also)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
* All shared resources must be restored by the task with the least PID to avoid deadlocks.
+
Here are a few principles that must be taken into account while developing CRIU.
 +
 
 +
* All shared resources must be restored by the task with the lowest PID among the group to avoid deadlocks.
 +
* No operations with file paths in restorer blob — task has restored its fs (cwd and root) and may see a different tree.
 +
* In dumping code, any fork()+exec() should be done using the cr_system() helper to avoid interfering with victim task tracing.
 +
 
 +
== Protobuf images compatibility ==
 +
 
 +
To retain backward compatibility of protobuf image files, follow these rules:
 +
 
 +
* Don't change the numeric tags for any existing fields.
 +
* Any new fields that you add should be optional or repeated.
 +
* Non-required fields can be removed, as long as the tag number is not used again in your updated message type.
 +
 
 +
For more info, see [https://developers.google.com/protocol-buffers/docs/proto#updating protobuf messages updating guide].
 +
 
 +
== External links ==
 +
* https://developers.google.com/protocol-buffers/docs/proto#updating
  
 
[[Category:Development]]
 
[[Category:Development]]

Latest revision as of 18:31, 2 September 2016

Here are a few principles that must be taken into account while developing CRIU.

  • All shared resources must be restored by the task with the lowest PID among the group to avoid deadlocks.
  • No operations with file paths in restorer blob — task has restored its fs (cwd and root) and may see a different tree.
  • In dumping code, any fork()+exec() should be done using the cr_system() helper to avoid interfering with victim task tracing.

Protobuf images compatibility[edit]

To retain backward compatibility of protobuf image files, follow these rules:

  • Don't change the numeric tags for any existing fields.
  • Any new fields that you add should be optional or repeated.
  • Non-required fields can be removed, as long as the tag number is not used again in your updated message type.

For more info, see protobuf messages updating guide.

External links[edit]