Changes

Line 3: Line 3:  
This page contains project ideas for upcoming Google Summer of Code.
 
This page contains project ideas for upcoming Google Summer of Code.
   −
== Contacts ==
+
== Contact ==
   −
Please contact the respective mentor for the idea you are interested in. For general questions feel free to send an email to the [mailto:criu@openvz.org mailing list] or write in [https://gitter.im/save-restore/criu gitter].
+
First, make sure to go through the [[GSoC Students Recommendations]]. Once you build CRIU locally and C/R a simple process successfully, please contact the respective mentor for the idea you are interested in. For general questions feel free to send an email to the [mailto:criu@lists.linux.dev mailing list] or write in [https://gitter.im/save-restore/criu gitter].
    
== Project ideas ==
 
== Project ideas ==
   −
=== Support sparse ghosts ===
+
=== Kubernetes Operator for Automated Checkpointing ===
     −
When criu dumps processes it also dumps files that are opened by them. It does this by saving file names by which the files are accessible. But sometimes files can have no names. It may happen if a task opened a file and then removed it. To dump this file criu cannot save its name (because the name doesn't exist). Instead criu saves the whole file. This is called "ghost file". Since saving the whole file is very expensive (copying lots of data on disk) criu limits the maximum size of a ghost file. The latter is also not good, because there are "sparse" files, that are large in size, but may be small from the real disk usage perspective. The goal of the task is to support sparse ghost files, i.e. limit the size of the ghost not by its length but by disk usage and when copying the data detect the used blocks and save only those.
+
'''Summary:''' Extend the Checkpoint/Restore Operator with support for automated policy-based checkpointing.
    +
The [https://github.com/checkpoint-restore/checkpoint-restore-operator Checkpoint/Restore Operator] for Kubernetes currently supports only policies and parameters that limit the number of checkpoints. This project aims to extend the current support with automated policy-based checkpointing, allowing users to define triggers for checkpoint creation, such as time-based schedules, resource thresholds (CPU, memory, I/O usage), Kubernetes events (node drain, pod eviction, preemption), and application-level signals or annotations.
    
'''Links:'''
 
'''Links:'''
+
* https://github.com/checkpoint-restore/checkpoint-restore-operator
*[https://en.wikipedia.org/wiki/Sparse_file Sparse files]
+
* https://kubernetes.io/docs/reference/node/kubelet-checkpoint-api
*[[Dumping files]]
  −
*[[Invisible files]]
  −
*[https://www.kernel.org/doc/html/latest/filesystems/fiemap.html Fiemap ioctl]
      
'''Details:'''
 
'''Details:'''
 
* Skill level: intermediate
 
* Skill level: intermediate
* Language: C
+
* Language: Go
 
* Expected size: 350 hours
 
* Expected size: 350 hours
* Mentor: Pavel Emelyanov <ovzxemul@gmail.com>
+
* Mentors: Viktória Spišaková <spisakova@ics.muni.cz>, Radostin Stoyanov <rstoyanov@fedoraproject.org>, Adrian Reber <areber@redhat.com>
* Suggested by: Pavel Emelyanov <ovzxemul@gmail.com>
     −
=== Optimize logging engine ===
+
=== Forensic Checkpointing Framework for Kubernetes ===
  −
'''Summary:''' CRIU puts a lots of logs when doing its job. Logging is done with simple fprintf function. They are typically useless, but ''if'' some operation fails -- the logs are the only way to find what was the reason for failure.
     −
At the same time the printf family of functions is known to take some time to work -- they need to scan the format string for %-s and then convert the arguments into strings. If comparing criu dump with and without logs the time difference is notable (15%-20%), so speeding the logs up will help improve criu performance.
+
Kubernetes provides a highly dynamic and ephemeral environment where workloads can start and disappear very quickly and are continuously being rescheduled across different nodes in the cluster.
 +
One of the key challenges with forensic investigations in Kubernetes is capturing and preserving the evidence during security incidents. This project aims to address this problem by developing a framework for efficiently capturing and preserving the state of all running applications in a container at a specific point in time, along with the associated container configurations and metadata. These artifacts would allow investigators to accurately reconstruct the events, create a timeline, and analyze security incidents without impacting the running cluster. This is an important step towards enabling forensic readiness for Kubernetes, where cluster administrators proactively ensure the environments are prepared to collect and preserve evidence before a security incident occurs.
   −
One of the solutions to the problem might be binary logging. The problem with binary logs is the amount of efforts to convert existing logs to binary form. Preferably, the switch to binary logging either keeps existing log() calls intact, either has some automatics to convert them.
+
'''Links:'''
 
+
* https://github.com/checkpoint-restore/checkpointctl
The option to keep log() calls intact might be in pre-compilation pass of the sources. In this pass each <code>log(fmt, ...)</code> call gets translated into a call to a binary log function that saves <code>fmt</code> identifier copies all the args ''as is'' into the log file. The binary log decode utility, required in this case, should then find the fmt string by its ID in the log file and print the resulting message.
+
* [https://fosdem.org/2026/events/attachments/F9RANH-forensic-snapshots-in-kubernetes/slides/267371/fosdem_2_4dh73ni.pdf Investigating Security Incidents with Forensic Snapshots in Kubernetes]
 +
* [https://www.cncf.io/reports/cloud-native-security-whitepaper/ Cloud Native Security Whitepaper]
 +
* [https://media.defense.gov/2022/Aug/29/2003066362/-1/-1/0/CTR_KUBERNETES_HARDENING_GUIDANCE_1.2_20220829.PDF Kubernetes Hardening Guide]
   −
'''Links:'''
  −
* [[Better logging]]
  −
   
'''Details:'''
 
'''Details:'''
 
* Skill level: intermediate
 
* Skill level: intermediate
* Language: C, though decoder/preprocessor can be in any language
+
* Language: Go
 
* Expected size: 350 hours
 
* Expected size: 350 hours
* Mentor: Pavel Emelyanov <ovzxemul@gmail.com>
+
* Mentors: Lorena Goldoni <lory.goldoni@gmail.com>, Radostin Stoyanov <rstoyanov@fedoraproject.org>, Adrian Reber <areber@redhat.com>
* Suggested by: Andrei Vagin <avagin@gmail.com>
+
 
 +
=== Enabling Checkpoint/Restore of Rootless Containers ===
   −
=== Add support for checkpoint/restore of CORK-ed UDP socket ===
+
[https://rootlesscontaine.rs/ Rootless containers] are containers that can be created, run, and managed by unprivileged users. Container engines such as Podman natively support running containers in a rootless mode to improve security and usability. While checkpoint/restore functionality is already available for rootful containers and unprivileged checkpointing is possible with the <code>CAP_CHECKPOINT_RESTORE</code> capability, container engines do not yet support native checkpointing of containers running in rootless mode. This project aims to explore and address the remaining challenges required to enable unprivileged checkpoint/restore for rootless containers.
  −
'''Summary:''' Support C/R of corked UDP socket
  −
  −
There's UDP_CORK option for sockets. As man page says:
  −
<pre>
  −
    If this option is enabled, then all data output on this socket
  −
    is accumulated into a single datagram that is transmitted when
  −
    the option is disabled. This option should not be used in
  −
    code intended to be portable.
  −
</pre>
     −
Currently criu refuses to dump this case, so it's effectively a bug. Supporting
  −
this will need extending the kernel API to allow criu read back the write queue
  −
of the socket (see [[TCP connection|how it's done]] for TCP sockets, for example). Then
  −
the queue is written into the image and is restored into the socket (with the CORK
  −
bit set too).
  −
   
'''Links:'''
 
'''Links:'''
* https://github.com/checkpoint-restore/criu/issues/409
+
* https://github.com/checkpoint-restore/criu/pull/1930
* [[Sockets]], [[TCP connection]]
+
* https://github.com/torvalds/linux/commit/124ea650d3072b005457faed69909221c2905a1f
* [[https://groups.google.com/forum/#!topic/comp.os.linux.networking/Uz8PYiTCZSg UDP cork explained]]
+
* https://src.fedoraproject.org/rpms/criu/pull-request/10#request_diff
+
 
 
'''Details:'''
 
'''Details:'''
* Skill level: intermediate (+linux kernel)
+
* Skill level: intermediate
* Language: C
+
* Language: C, Go
 
* Expected size: 350 hours
 
* Expected size: 350 hours
* Mentor: Pavel Emelianov <ovzxemul@gmail.com>
+
* Mentors: Radostin Stoyanov <rstoyanov@fedoraproject.org>, Adrian Reber <areber@redhat.com>
* Suggested by: Pavel Emelianov <ovzxemul@gmail.com>
     −
=== Add support for pidfd file descriptors ===
+
=== Checkpointing of POSIX message queues ===
   −
'''Summary:''' Support C/R of pidfd descriptors
+
'''Summary:''' Add support for checkpoint/restore of POSIX message queues
   −
There is pidfd_open syscall which allows opening
+
POSIX message queues are a widely used inter-process communication mechanism. Message queues are implemented as files on a virtual filesystem (mqueue), where a file descriptor (message queue descriptor) is used to perform operations such as sending or receiving messages. To support checkpoint/restore of POSIX message queues, we need a kernel interface (similar to [https://github.com/checkpoint-restore/criu/commit/8ce9e947051e43430eb2ff06b96dddeba467b4fd MSG_PEEK]) that would enable the retrieval of messages from a queue without removing them. This project aims to implement such an interface that allows retrieving all messages and their priorities from a POSIX message queue.
a special PID file descriptor. A user can send a signal to
  −
the process (pidfd_send_signal syscall), wait for the process
  −
(poll() on pidfd).
     −
At the moment CRIU can't dump processes that have pidfd's opened.
+
'''Links:'''
 +
* https://github.com/checkpoint-restore/criu/issues/2285
 +
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/ipc/mqueue.c
 +
* https://www.man7.org/tlpi/download/TLPI-52-POSIX_Message_Queues.pdf
   −
'''Links:'''
  −
* https://lwn.net/Articles/801319/
  −
* https://lwn.net/Articles/794707/
  −
* https://github.com/torvalds/linux/blob/v5.16/kernel/fork.c#L1877
  −
   
'''Details:'''
 
'''Details:'''
 
* Skill level: intermediate
 
* Skill level: intermediate
 
* Language: C
 
* Language: C
 
* Expected size: 350 hours
 
* Expected size: 350 hours
* Mentors: Alexander Mikhalitsyn <alexander@mihalicyn.com>, Christian Brauner <christian@brauner.io>
+
* Mentors: Radostin Stoyanov <rstoyanov@fedoraproject.org>, Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
* Suggested by: Alexander Mikhalitsyn <alexander@mihalicyn.com>
+
* Suggested by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
 +
 
 +
=== Add support for SCM_CREDENTIALS / SCM_PIDFD and friends ===
 +
 
 +
'''Summary:''' Support for SCM_CREDENTIALS / SCM_PIDFD
   −
=== Use eBPF to lock and unlock the network ===
+
SCM_CREDENTIALS and SCM_PIDFD are types of SCM (Socket-level Control Messages). They play a crucial role
+
in systemd and many other user space applications. This project is about adding support for these
'''Summary:''' Use eBPF instead of external iptables-restore tool for network lock and unlock.
+
SCMs to be properly saved and restored back with CRIU. There is an existing code in OpenVZ CRIU fork,
 +
see [1] and [2]. Goal would be first of all to properly port this code, cover with extensive tests and
 +
ensure that SCM_PIDFD / SO_PEERPIDFD are handled correctly. Also we expect to cover things like
 +
SO_PASSRIGHTS and SO_PASSPIDFD.
   −
During checkpointing and restoring CRIU locks the network to make sure no network packets are accepted by the network stack during the time the process is checkpointed. Currently CRIU calls out to iptables-restore to create and delete the corresponding iptables rules. Another approach which avoids calling out to the external binary iptables-restore would be to directly inject eBPF rules. There have been reports from users that iptables-restore fails in some way and eBPF could avoid this external dependency.
+
There is some extra source of complexity here pidfds can be "stale" (see PIDFD_STALE in Linux kernel)
 +
and we need to ensure that we properly cover those cases.
    
'''Links:'''
 
'''Links:'''
* https://www.criu.org/TCP_connection#Checkpoint_and_restore_TCP_connection
+
* [1] openvz-criu https://bitbucket.org/openvz/criu.ovz/history-node/918653a0a343194385592d7b50b5bd7a8fbe1cc1/criu/sk-unix.c?at=hci-dev
* https://github.com/systemd/systemd/blob/master/src/core/bpf-firewall.c
+
* [2] openvz-criu https://bitbucket.org/openvz/criu.ovz/history-node/918653a0a343194385592d7b50b5bd7a8fbe1cc1/criu/sk-queue.c?at=hci-dev
* https://blog.zeyady.com/2021-08-16/gsoc-criu
+
* [3] Linux kernel https://github.com/torvalds/linux/commit/5e2ff6704a275be009be8979af17c52361b79b89
 +
* [4] Linux kernel https://github.com/torvalds/linux/commit/c679d17d3f2d895b34e660673141ad250889831f
    
'''Details:'''
 
'''Details:'''
* Skill level: intermediate
+
* Skill level: intermediate / advanced
 
* Language: C
 
* Language: C
 
* Expected size: 350 hours
 
* Expected size: 350 hours
* Mentor: Radostin Stoyanov <rstoyanov@fedoraproject.org>
+
* Suggested by: Alexander Mikhalitsyn <alexander@mihalicyn.com>
* Suggested by: Adrian Reber <areber@redhat.com>
+
* Mentors: Andrei Vagin <avagin@gmail.com>, Alexander Mikhalitsyn <alexander@mihalicyn.com>
   −
=== IOUring support ===
+
=== Integrate with Live Update Orchestrator (LUO) ===
The io_uring Asynchronous I/O (AIO) framework is a new Linux I/O interface, first introduced in upstream Linux kernel version 5.1 (March 2019). It provides a low-latency and feature-rich interface for applications that require AIO functionality.
     −
'''Links:'''
+
'''Summary:''' Integrate with Live Update Orchestrator (LUO)
* https://blogs.oracle.com/linux/an-introduction-to-the-io_uring-asynchronous-io-framework
  −
* https://github.com/axboe/liburing
     −
'''Details:'''
+
Live Update Orchestrator (LUO) is a framework for Linux kernel
* Skill level: expert (+linux kernel)
+
live updates (via kexec). Idea behind it is to provide kernel
* Expected size: 350 hours
+
and user space API to save specific system resources across
* Suggested by: Pavel Emelyanov <ovzxemul@gmail.com>
+
kexec reboot.
* Mentor: Pavel Emelyanov <ovzxemul@gmail.com>
     −
=== CGroup-v2 support ===
+
This research project explores how CRIU can be integrated with LUO.
 +
For example, if a user is running memcached on a node, the current
 +
approach would require a full CRIU dump, then saving the entire
 +
process memory to disk, then followed by restoring it after the
 +
kernel live update.
   −
'''Summary:''' cgroup is a mechanism to organize processes hierarchically and distribute system resources along the hierarchy in a controlled and configurable manner. cgroup v2 is a new version of the cgroup file system. Unlike v1, cgroup v2 has only single hierarchy. CRIU has to dump/restore a container cgroup hierarchy along with all per-cgroup options. The cgroupv2 support in CRIU has to be compatible with Docker, containerd and cri-o.
+
Instead, CRIU could be extended to leverage the LUO API. When instructed,
 +
it could preserve selected memory regions directly across the kexec reboot,
 +
avoiding a full disk dump and significantly accelerating the restore process
 +
after the kernel update.
    
'''Links:'''
 
'''Links:'''
* [[CGroups]]
+
* [1] LUO kernel documentation https://docs.kernel.org/core-api/liveupdate.html
* https://github.com/checkpoint-restore/criu/issues/252
+
* [2] LUO memfd doc https://docs.kernel.org/mm/memfd_preservation.html
* https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html
+
 
 
'''Details:'''
 
'''Details:'''
* Skill level: intermediate
+
* Skill level: intermediate / advanced
 
* Language: C
 
* Language: C
 
* Expected size: 350 hours
 
* Expected size: 350 hours
* Mentor: Andrei Vagin <avagin@gmail.com>
   
* Suggested by: Andrei Vagin <avagin@gmail.com>
 
* Suggested by: Andrei Vagin <avagin@gmail.com>
 +
* Mentors: Andrei Vagin <avagin@gmail.com>, Alexander Mikhalitsyn <alexander@mihalicyn.com>
 +
 +
=== Optimize COW memory dumping ===
 +
 +
'''Summary:''' Optimize COW memory dumping
 +
 +
The Linux kernel memory management subsystem is highly optimized not only for performance, but also to minimize unnecessary memory consumption. A key example of this is how the kernel handles private VMAs when user space invokes the fork() system call.
 +
 +
Rather than duplicating the entire VMA tree along with all memory contents, the kernel creates optimized copies of inherited VMAs using the Copy-on-Write (COW) mechanism. When a process writes to a page within a COW-ed VMA, a write page fault occurs, and the kernel creates a private copy of that page before applying the modification. However, if the page is only read, no copying is performed.
 +
 +
This approach significantly improves fork() performance and can dramatically reduce memory usage in many workloads.
   −
=== Dump shmem in user-mode (unprivileged-mode) ===
+
In CRIU, when dumping VMAs and their associated memory pages, this COW optimization is not currently taken into account during the dump phase. As a result, for COW-backed VMAs, CRIU may generate multiple copies of identical memory pages in the dump image.
   −
CRIU uses /proc/pid/map_files to dump and restore anonymous shared memory regions, but map_files is restricted to the global CAP_SYS_ADMIN capability. In most cases, it is possible to dump/restore shared memory region without map_files and we need to implement this in CRIU.
+
During restore, however, CRIU explicitly handles this situation (see [1] and [2]) and attempts to reconstruct COW relationships inside the kernel. This step is critical: without it, a checkpoint/restore (C/R) cycle could lead to a substantial increase in memory consumption for the same process tree. For example, a workload that originally consumed 500 MiB could expand to 800 MiB after restore, which is clearly unacceptable.
 +
 
 +
This project aims to improve the dumping algorithm so that it avoids producing multiple unnecessary copies of identical pages belonging to COW-ed VMAs.
 +
 
 +
The project requires some understanding of Linux memory management internals and CRIU’s architecture. We strongly encourage GSoC contributors to study references [1] and [2] and experiment with the relevant code paths before applying. We are happy to answer questions and provide guidance along the way.
    
'''Links:'''
 
'''Links:'''
* [[User-mode]]
+
* [1] preparing COW VMAs https://github.com/checkpoint-restore/criu/blob/c180188db036f8ea4c08bfee28cbcdbdd52cdfc3/criu/mem.c#L878
 +
* [2] private vma content restore cow case https://github.com/checkpoint-restore/criu/blob/c180188db036f8ea4c08bfee28cbcdbdd52cdfc3/criu/mem.c#L1219
    
'''Details:'''
 
'''Details:'''
* Skill level: intermediate
+
* Skill level: intermediate / advanced
 
* Language: C
 
* Language: C
 
* Expected size: 350 hours
 
* Expected size: 350 hours
 
* Suggested by: Andrei Vagin <avagin@gmail.com>
 
* Suggested by: Andrei Vagin <avagin@gmail.com>
* Suggested by: Pavel Emelyanov <ovzxemul@gmail.com>
+
* Mentors: Andrei Vagin <avagin@gmail.com>, Alexander Mikhalitsyn <alexander@mihalicyn.com>
* Mentor: Pavel Emelyanov <ovzxemul@gmail.com>
     −
=== Porting crit functionalities in GO ===
+
== Suspended project ideas ==
 +
 
 +
Listed here are tasks that seem suitable for GSoC, but currently do not have anybody to mentor it.
 +
 
 +
=== Optimize logging engine ===
 
   
 
   
'''Summary:''' Implement image view and manipulation in Go
+
'''Summary:''' CRIU puts a lots of logs when doing its job. Logging is done with simple fprintf function. They are typically useless, but ''if'' some operation fails -- the logs are the only way to find what was the reason for failure.
+
 
CRIU's checkpoint images are stored on disk using protobuf. For easier analysis of checkpoint files CRIU has a tool called [[CRIT|CRiu Image Tool (CRIT)]]. It can display/decode CRIU image files from binary protobuf to JSON as well as encode JSON files back to the binary format. With closer integration of CRIU in container runtimes it becomes important to be able to view the CRIU output files. Either for manipulation before restoring or for reading checkpoint statistics (memory pages written to disk, memory pages skipped, process downtime).
+
At the same time the printf family of functions is known to take some time to work -- they need to scan the format string for %-s and then convert the arguments into strings. If comparing criu dump with and without logs the time difference is notable (15%-20%), so speeding the logs up will help improve criu performance.
 +
 
 +
One of the solutions to the problem might be binary logging. The problem with binary logs is the amount of efforts to convert existing logs to binary form. Preferably, the switch to binary logging either keeps existing log() calls intact, either has some automatics to convert them.
   −
Currently CRIT is implemented in Python, for easier integration in other Go projects it is important to have image manipulation and analysis available from GO. This means we need a Go based library to read/modify/write/encode/decode CRIU's image files. Based on this library a Go based implementation of CRIT would be useful.
+
The option to keep log() calls intact might be in pre-compilation pass of the sources. In this pass each <code>log(fmt, ...)</code> call gets translated into a call to a binary log function that saves <code>fmt</code> identifier copies all the args ''as is'' into the log file. The binary log decode utility, required in this case, should then find the fmt string by its ID in the log file and print the resulting message.
    
'''Links:'''
 
'''Links:'''
* [[CRIT]]
+
* [[Better logging]]
* Possible use case see LXD: https://github.com/lxc/lxd/blob/cb55b1c5a484a43e0c21c6ae8c4a2e30b4d45be3/lxd/migrate_container.go#L179
  −
* https://github.com/lxc/lxd/pull/4072
  −
* https://github.com/checkpoint-restore/go-criu/tree/master/stats
  −
* https://github.com/checkpoint-restore/go-criu/pull/28
   
   
 
   
 
'''Details:'''
 
'''Details:'''
* Skill level: beginner
+
* Skill level: intermediate
* Language: Go
+
* Language: C, though decoder/preprocessor can be in any language
 
* Expected size: 350 hours
 
* Expected size: 350 hours
* Mentor: Radostin Stoyanov <rstoyanov@fedoraproject.org>
+
* Suggested by: Andrei Vagin
* Suggested by: Adrian Reber <areber@redhat.com>
+
* Mentors: Alexander Mikhalitsyn <alexander@mihalicyn.com>
   −
== Suspended project ideas ==
+
=== IOUring support ===
 +
The io_uring Asynchronous I/O (AIO) framework is a new Linux I/O interface, first introduced in upstream Linux kernel version 5.1 (March 2019). It provides a low-latency and feature-rich interface for applications that require AIO functionality.
 +
 
 +
'''Links:'''
 +
* https://blogs.oracle.com/linux/an-introduction-to-the-io_uring-asynchronous-io-framework
 +
* https://github.com/axboe/liburing
   −
Listed here are tasks that seem suitable for GSoC, but currently do not have anybody to mentor it.
+
'''Details:'''
 +
* Skill level: expert (+linux kernel)
 +
* Expected size: 350 hours
    
=== Add support for SPFS ===
 
=== Add support for SPFS ===
Line 204: Line 212:  
* Skill level: expert
 
* Skill level: expert
 
* Language: C
 
* Language: C
* Mentor: Alexander Mikhalitsyn <alexander@mihalicyn.com> / <alexander.mikhalitsyn@virtuozzo.com>
+
* Mentor: Alexander Mikhalitsyn <alexander@mihalicyn.com>
* Suggested by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
+
* Suggested by: Alexander Mikhalitsyn <alexander@mihalicyn.com>
      Line 234: Line 242:  
* Skill level: beginner
 
* Skill level: beginner
 
* Language: Python
 
* Language: Python
* Mentor: Pavel Emelianov <xemul@virtuozzo.com>
+
 
* Suggested by: Pavel Emelianov <xemul@virtuozzo.com>
+
=== Add support for checkpoint/restore of CORK-ed UDP socket ===
 +
 +
'''Summary:''' Support C/R of corked UDP socket
 +
 +
There's UDP_CORK option for sockets. As man page says:
 +
<pre>
 +
    If this option is enabled, then all data output on this socket
 +
    is accumulated into a single datagram that is transmitted when
 +
    the option is disabled.  This option should not be used in
 +
    code intended to be portable.
 +
</pre>
 +
 
 +
Currently criu refuses to dump this case, so it's effectively a bug. Supporting
 +
this will need extending the kernel API to allow criu read back the write queue
 +
of the socket (see [[TCP connection|how it's done]] for TCP sockets, for example). Then
 +
the queue is written into the image and is restored into the socket (with the CORK
 +
bit set too).
 +
 
 +
'''Notes:'''
 +
 
 +
We already had a couple (3) of tries for this problem:
 +
 
 +
* UDP_REPAIR approach didn't succeed: https://lore.kernel.org/netdev/721a2e32-c930-ad6b-5055-631b502ed11b@gmail.com/, https://lore.kernel.org/netdev/?q=udp_repair
 +
* eBPF (CRIB) approach, socket queue iterator was not merged: https://lore.kernel.org/netdev/AM6PR03MB5848EDA002E3D7EACA7C6BDA99A52@AM6PR03MB5848.eurprd03.prod.outlook.com/, and we have general objections to CRIB approach https://lore.kernel.org/bpf/CAHk-=wjLWFa3i6+Tab67gnNumTYipj_HuheXr2RCq4zn0tCTzA@mail.gmail.com/
 +
 
 +
We still have one idea we didn't try, as UDP allows packets to be lost on the way on restore we can somehow mark the socket to drop all data before UNCORK. This way we don't really need to restore contents of UDP CORK-ed sockets send queue.
 +
 +
'''Links:'''
 +
* https://github.com/checkpoint-restore/criu/issues/409
 +
* https://github.com/criupatchwork/criu/commit/a532312
 +
* [[Sockets]], [[TCP connection]]
 +
* [[https://groups.google.com/forum/#!topic/comp.os.linux.networking/Uz8PYiTCZSg UDP cork explained]]
 +
 +
'''Details:'''
 +
* Skill level: intermediate (+linux kernel)
 +
* Language: C
 +
* Expected size: 350 hours
 +
* Mentors: Alexander Mikhalitsyn <alexander@mihalicyn.com>, Pavel Tikhomirov <ptikhomirov@virtuozzo.com>, Andrei Vagin <avagin@gmail.com>
 +
 
 +
 
    
[[Category:GSoC]]
 
[[Category:GSoC]]
 
[[Category:Development]]
 
[[Category:Development]]