Enable CONFIG_UNIX_DIAG (=m) so CRIU can checkpoint processes that use unix sockets
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 63/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c, linux
調査の方向性
まず、CONFIG_CHECKPOINT_RESTOREをすでに有効にしているRaspberry Pi 64ビットターゲットのカーネル設定ファイルを読み、近接するUnixソケットオプションの設定を確認します。該当するターゲットでCONFIG_UNIX_DIAGをモジュールとして有効にします。カーネルをビルドし、モジュールが利用可能で、CRIUがUnixソケットを保持するプロセスをダンプおよび復元できることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- C
- スター
- 13.3k
- フォーク
- 5.5k
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 24
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
raspberrypi/linux のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
raspberrypi/linux#7415 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace appオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
raspberrypi/linux#7399 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
raspberrypi/linux#7357 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
raspberrypi/linux#7054 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
raspberrypi/linux#7716 ·
メンテナーはふだん 1 日以内に返信
raspberrypi/linux の issue をすべて見る
似ている issue
-
dependency component: oneMKL module: dpclang
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
intel/torch-xpu-ops#5880 ·
メンテナーはふだん 2 日以内に返信
-
area/ci-build bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
DarkFlippers/qUnleashed#423 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
CVE-2026-111497オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
fink/fink-distributions#1322 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
openvehicles/Open-Vehicle-Monitoring-System-3#1563 ·
メンテナーはふだん 2 日以内に返信