Enable CONFIG_UNIX_DIAG (=m) so CRIU can checkpoint processes that use unix sockets
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 63/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- c, linux
- Domaine
- operating-systems
Piste de recherche
Commencez par lire les fichiers de configuration du noyau pour les cibles Raspberry Pi 64 bits qui activent déjà CONFIG_CHECKPOINT_RESTORE, puis vérifiez comment les options Unix socket voisines sont configurées. Activez CONFIG_UNIX_DIAG en tant que module pour les cibles concernées. Compilez le noyau et vérifiez que le module est disponible et que CRIU peut sauvegarder et restaurer un processus qui détient un socket Unix.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Motivation
I'm working toward backing up and restoring a desktop session on a Pi 500: the Wayland session, Chromium and other GUI apps. The Pi 500 has no working suspend-to-RAM (/sys/power/state is empty and CONFIG_SUSPEND is not set), so checkpoint/restore is the only route to "come back exactly as left" after a power-off.
Unix sockets are the first thing in the way. Wayland, D-Bus, PipeWire and the Chromium process tree all communicate over them, so CRIU can't even start on a GUI session without unix_diag. I know it won't be enough on its own, since DRM/GPU file descriptors are a separate gap in CRIU. But it unblocks everything that doesn't touch the GPU (terminal sessions, shells, daemons), and it is a prerequisite for any further progress on the GUI side.
Describe the bug
CONFIG_CHECKPOINT_RESTORE=y has been enabled since #5516, but CRIU still can't dump any process that holds a unix socket, because CONFIG_UNIX_DIAG is not set. CRIU finds unix sockets (and their peers) through the sock_diag netlink interface, so without it the dump fails:
Error (criu/sockets.c:210): sockets: Diag module missing (-2)
Error (criu/sockets.c:436): sockets: Sockets (family 1 proto 0) are not collected
Error (criu/sk-unix.c:351): unix: Unix socket 5452475 not found
Error (criu/cr-dump.c:2111): Dumping FAILED.
In practice this rules out checkpointing nearly any real process: tmux, shells with a D-Bus or agent socket, and most daemons. Only socket-free processes work today.
I'm asking for CONFIG_UNIX_DIAG=m, which Debian and Ubuntu kernels already set. It adds one small module (net/unix/diag.c, about 330 lines) and doesn't change the built-in af_unix code. It is not loaded unless something requests it.
Evidence that this is all that is missing for unix sockets
I built net/unix/diag.c from rpi-6.18.y as an out-of-tree module against the stock 6.18.50 headers, with no other change, and loaded it. With it loaded, CRIU 4.1.1 works on the otherwise unmodified kernel:
- A process with a
socketpair: dumped, killed and restored, and it continued from where it was. - A detached tmux server (its listening unix socket, a pty and a child shell running a counter): dumped, killed and restored. The session was back in
tmux lsand the counter resumed.
The exports af_unix.c needs (unix_peer_get, unix_inq_len/unix_outq_len, and others) are already present in the stock kernel, so there are no source changes outside the new module.
Optional, lower priority
criu check --all also reports UFFD is not supported (CONFIG_USERFAULTFD not set) and Dirty tracking is OFF. These only affect lazy restore and incremental dumps, so basic checkpoint/restore doesn't need them. I'd leave them for a separate discussion.
Steps to reproduce the behaviour
sudo apt install criu
python3 -c 'import socket,time; a,b=socket.socketpair(); time.sleep(1e6)' &
sudo criu dump -t $! -D /tmp/d --shell-job # fails as above
# build and insmod unix_diag.ko from net/unix/diag.c, then repeat: it succeeds
Device (s)
Raspberry Pi 500 (this should apply to every 64-bit target that already has CHECKPOINT_RESTORE)
System
Raspberry Pi reference 2026-06-18
Linux pi500 6.18.50+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.18.50-1+rpt1 (2026-09-11) aarch64
vcgencmd version: f5e89631 (release) (embedded), 2026/08/12
CONFIG_CHECKPOINT_RESTORE=y
# CONFIG_UNIX_DIAG is not set
Additional context
Same request pattern as #5516 (CHECKPOINT_RESTORE), which pelwell added to the defconfig after measuring no performance cost. A module-only option should cost even less.
- Langage dominant
- C
- Étoiles
- 13.3k
- Forks
- 5.5k
- Merge moyen
- 1 j 2 h
- PR mergées (30 j)
- 24
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de raspberrypi/linux
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
raspberrypi/linux#7415 · 2 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace appOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
raspberrypi/linux#7399 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Documentation update requiredOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
raspberrypi/linux#7357 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
raspberrypi/linux#7054 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
raspberrypi/linux#7716 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de raspberrypi/linux
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
yunusemreyl/omen-space#337 ·
Les mainteneurs répondent en général sous 1 jour
-
dependency component: oneMKL module: dpclang
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
intel/torch-xpu-ops#5880 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Les mainteneurs répondent en général sous 1 jour
-
area/ci-build bug
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
DarkFlippers/qUnleashed#423 ·
Les mainteneurs répondent en général sous 1 jour