Mount point creation fails on NFS with EROFS
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c, linux
調査の方向性
bubblewrap.c の ensure_node_at() から始め、そのディレクトリ作成処理を、Issue が NFS の EROFS を処理するとしている utils.c の ensure_dir() と比較してください。既存の fstatat() の結果が mkdirat() にどう影響すべきか、またファイルの場合にも同様の処理が必要かを確認してください。読み取り専用 NFS 上の既存ディレクトリによってマウントポイントの作成が失敗しなくなれば完了です。Issue には NFS での再現手順の詳細がありますが、テストについては記載されていません。
索引モデルが issue の本文から書いたものです。
説明
Problem
When the Flatpak are on NFS, starting a flatpak fails after each reboot with errors such as:
bwrap: Can't mkdir parents for /app/share/runtime/locale: Read-only file system
bwrap: Can't mkdir parents for /usr/lib/x86_64-linux-gnu/GL: Read-only file system
The failing path changes from run to run and the directories do exist. Walking the tree once (find ... or ls) makes the flatpak start until the next reboot.
Cause
On NFS, mkdir() on an existing directory that this client has not looked up can return EROFS instead of EEXIST when the mount is read-only.
utils.c already handles this: ensure_dir() calls stat() first, with a comment saying mkdir can fail with EROFS instead of EEXIST on some filesystems such as NFS, and ensure_file() has a similar comment. But ensure_node_at() in bubblewrap.c creates directories with mkdirat(parent_fd, name, ...) and only tolerates EEXIST, without a stat.
Suggested fix
In ensure_node_at(), for the directory case, check for an existing directory with fstatat(parent_fd, name, ...) before calling mkdirat() as ensure_dir() does and maybe do the same for the file case.
Additional info
bwrap version: 0.13.1
Distro/kernel: Debian 13, 6.12.48+deb13-amd64 (also reproduced on 7.1.6)
Kernel bug report:
https://lore.kernel.org/linux-nfs/[email protected]/T/#t
Debian bug report:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1153147
- 主要言語
- C
- スター
- 9.6k
- フォーク
- 418
- 平均マージ
- 4日 8時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
containers/bubblewrap のほかの issue
-
--userns-block-fd can hang when given a closed descriptor対応中かも @sarankumar1325 が 15 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
containers/bubblewrap#826 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
README: writable --bind paths are not isolated from hardlinks created outside the sandbox対応中かも @sairex53 が 45 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
containers/bubblewrap#813 · コメント 3 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bubblewrap manpage is desynced from source code対応中かも @huong8373tt-beep が 25 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
containers/bubblewrap#767 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Related project comparisons in README.md are outdated再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
containers/bubblewrap#743 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
containers/bubblewrap#298 · コメント 4 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
containers/bubblewrap の issue をすべて見る
似ている issue
-
bug severity: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AlessandroSangiuliano/Uros#1014 ·
-
severity: low
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
luainkernel/lunatik#2727 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 6 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bot-triaged module: cuda module: memory usage module: pybind module: tensor creation triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pytorch/pytorch#206707 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信