Can't start container when automounts exist, with misleading error message about userns

未关闭
#766 10 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
linux, shell

调研方向

从 steam-runtime-check-requirements 的输出以及 Steam 自动启动期间的 bwrap 失败开始。使用 systemd NFS 自动挂载和重启后的 KDE Plasma 自动启动来重现问题,然后跟踪挂载错误如何变成 user-namespace 消息。完成的标准是妥善处理与 NFS 相关的失败,或报告实际原因,而不是误导性的要求消息。

由索引模型根据 Issue 内容生成。

描述

Your system information
  • Steam client version (build number): 1751405894
  • Distribution: Gentoo Linux x86_64 23.0
  • Opted into Steam client beta?: Yes/No
  • Have you checked for system updates?: Yes
  • Steam Logs: steam-logs.tar.gz
  • GPU: NVIDIA GeForce RTX 3080 Ti
Please describe your issue in as much detail as possible:

After some update to Plasma, the desktop seems to launch much faster and earlier. It looks like the network is not fully initialized, thus NFS automounts fail to mount if apps try to access it early. Steam's bwrap most likely trips over this:

# systemctl --user status app-steam\\[email protected]
● app-steam\[email protected] - Steam Autostart
     Loaded: loaded (/home/kakra/.config/autostart/steam-silent.desktop; generated)
     Active: active (running) since Sat 2025-07-05 13:58:38 CEST; 8min ago
 Invocation: 7841310b1c754a10a0c4be1e758e0334
       Docs: man:systemd-xdg-autostart-generator(8)
   Main PID: 4722 (bash)
      Tasks: 14 (limit: 37865)
        CPU: 3.173s
     CGroup: /user.slice/user-1000.slice/[email protected]/app.slice/app-steam\[email protected]
             ├─4722 bash /home/kakra/.local/share/Steam/steam.sh -srt-logger-opened -no-cef-sandbox -silent
             ├─4780 /home/kakra/.local/share/Steam/ubuntu12_32/steam-runtime/usr/libexec/steam-runtime-tools-0/srt-logger --sh-syntax --rotate=8388608 --log-directory /home/kakra/.local/share/Steam/logs --filename console-linux.txt --log-fd=7 --j>
             └─5131 /bin/zenity --error "--text=Steam now requires user namespaces to be enabled.\n\nThis requirement is the same as for Flatpak, which has more detailed\ninformation available:\nhttps://github.com/flatpak/flatpak/wiki/User-namesp>

Jul 05 13:58:38 jupiter steam-runtime-steam-remote[4747]: steam-runtime-steam-remote: Steam is not running: No such device or address
Jul 05 13:58:38 jupiter steam[4780]: steam.sh[4722]: Running Steam on gentoo 13.0 64-bit
Jul 05 13:58:38 jupiter steam[4780]: steam.sh[4722]: STEAM_RUNTIME is enabled by the user
Jul 05 13:58:38 jupiter steam[4780]: setup.sh[4835]: Steam runtime environment up-to-date!
Jul 05 13:58:44 jupiter steam[4780]: steam.sh[4722]: Log already open
Jul 05 13:58:45 jupiter steam[4780]: steam-runtime-check-requirements[5043]: W: Child process exited with code 1: bwrap: Can't bind mount /oldroot/ on /newroot/: Unable to apply mount flags: remount "/newroot/srv/laniakea/git": Operation not perm>
Jul 05 13:58:45 jupiter steam[4780]: steam.sh[4722]: Error: Steam now requires user namespaces to be enabled.
Jul 05 13:58:45 jupiter steam[4780]: This requirement is the same as for Flatpak, which has more detailed
Jul 05 13:58:45 jupiter steam[4780]: information available:
Jul 05 13:58:45 jupiter steam[4780]: https://github.com/flatpak/flatpak/wiki/User-namespace-requirements

The following prominent message is shown on the desktop:
Image

Just clicking "OK" and running the Steam client again successfully launches it.

I think Steam should wait for network being available before working with NFS mountpoints - or maybe ignore them (although some users may need access to NFS mounts from within games).

At the very least, the error message is just wrong and misleading. The client doesn't properly detect the real error.

Steps for reproducing this issue:
  1. Setup NFS mounts (via systemd automounts)
  2. Configure the desktop for autologin
  3. Configure Steam to autolaunch in KDE Plasma
  4. Reboot
Additional information
# grep nfs /etc/fstab
laniakea-nfs:/volume1/backups           /srv/laniakea/backups   nfs     noauto,noatime,x-systemd.automount,nfsvers=4,x-systemd.idle-timeout=3600
laniakea-nfs:/volume1/casync            /srv/laniakea/casync    nfs     noauto,noatime,x-systemd.automount,nfsvers=4,x-systemd.idle-timeout=3600
laniakea-nfs:/volume1/git               /srv/laniakea/git       nfs     noauto,noatime,x-systemd.automount,nfsvers=4,x-systemd.idle-timeout=3600
laniakea-nfs:/volume1/video             /srv/laniakea/video     nfs     noauto,noatime,x-systemd.automount,nfsvers=4,x-systemd.idle-timeout=3600
laniakea-nfs:/volume1/music             /srv/laniakea/music     nfs     noauto,noatime,x-systemd.automount,nfsvers=4,x-systemd.idle-timeout=3600

My system does not use NetworkManager because it slows down boot considerably for me.

主要语言
Shell
星标
1.5k
派生
98
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ValveSoftware/steam-runtime 的其他 Issue

查看 ValveSoftware/steam-runtime 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。