Skip to content

steam-runtime-launcher-service: forwarded fd >= 1024 silently lost (steam-runtime-supervisor: cannot open /proc/self/fd/N) #865

Open

Description

@igno2k

Your system information

  • Steam Runtime Version: steamrt3c client runtime 3c.0.20260824.257593 (pressure-vessel 0.20260824.0), Steam client 1792618285 (steamdeck_stable channel, "Use experimental SteamRT3 Steam Client" enabled)
  • Distribution (e.g. Ubuntu 18.04): Bazzite 44 (Stable F44.20261026, bazzite-deck image), Fedora Atomic based; reproduced on two machines (desktop and Lenovo Legion Go 2)
  • Link to your full system information (Help -> Steam Runtime Diagnostics) in a Gist: can provide on request
  • Have you checked for system updates?: Yes
  • What compatibility tool are you using?: None (native Linux executable added as a non-Steam shortcut)
  • What versions are listed in steamapps/common/SteamLinuxRuntime/VERSIONS.txt? depot 1.0.20261021.266054, scripts 0.20261007.0
  • What versions are listed in steamapps/common/SteamLinuxRuntime_soldier/VERSIONS.txt? depot 2.0.20261021.266042, pressure-vessel 0.20261007.0
  • What versions are listed in steamapps/common/SteamLinuxRuntime_sniper/VERSIONS.txt? depot 3.0.20261021.266025, pressure-vessel 0.20261007.0
  • What versions are listed in steamapps/common/SteamLinuxRuntime_4/VERSIONS.txt? depot 4.0.20261021.265997, pressure-vessel 0.20261007.0

Please describe your issue in as much detail as possible:

With the steamrt3c 64-bit client, non-Steam shortcuts (and presumably games) fail to launch
once the fd number Steam passes as --forward-fd=N / --edit-env-fd=N is 1024 or higher.
steam-runtime-supervisor reports Failed to open file "/proc/self/fd/N": No such file or directory and exits immediately. Every launch with N < 1024 works; after a Steam restart
launches work again until Steam's fd numbers pass 1023.

Expected: the shortcut launches every time. Actual: once Steam's forwarded fd number is 1024 or higher, every launch fails before the game starts, until Steam is restarted.

Root cause (steam-runtime-tools v0.20260824.0, unchanged on main a41efe20)

  • bin/launcher-service.c:1654 calls _srt_set_compatible_resource_limits (0), which sets
    soft RLIMIT_NOFILE to 1024 (steam-runtime-tools/utils.c:1268-1269, MR !353).
  • bin/launch-client.c:1364 sends the requested target fd number N unchanged.
  • bin/launcher-service.c:525-527 stores it as fd_map[i].to/final, and
    child_setup_func (:414-433) does dup2 (fd_map[i].from, fd_map[i].to); close (fd_map[i].from); without checking the result. In the child the soft limit is 1024, so
    dup2 to N >= 1024 fails with EBADF, the source fd is closed, and the program is executed
    without fd N.
  • steam-runtime-tools/env-overlay.c:869-871 then opens /proc/self/fd/N -> ENOENT.
    This became reachable with --edit-env-fd (13be3db7, 2026-08-07), since the client now
    forwards an fd on every launch.

Suggested fix

In child_setup_func, temporarily raise the soft RLIMIT_NOFILE to cover the highest target
fd (capped at the hard limit), perform the dup2 calls with error checking (fail the launch
loudly instead of continuing), then restore the soft limit to 1024 before exec; existing
fds above the limit stay valid. Optionally have the client pass a low fd number.

Workaround

Restart Steam; or raise the running service's soft limit with
prlimit --pid <srt-launcher-service pid> --nofile=65536: (we saw N up to 3545, so 4096 is not enough in long sessions). Games then inherit soft 65536 instead of 1024.

Steps for reproducing this issue:

  1. Keep Steam running long enough (or open many fds) that console_log.txt shows
    steam-runtime-launch-client ... --forward-fd=N with N >= 1024.
  2. Launch any non-Steam shortcut.
  3. Journal: steam-runtime-supervisor[PID]: E: Failed to open file "/proc/self/fd/N": No such file or directory. Observed N: 1026..3545 (40 failures); all N <= 1017 succeed.

Activity

  1. smcv commented on Nov 2, 2026

    @smcv
    Contributor

    Thanks for reporting this, hopefully we can avoid this by temporarily raising the soft limit as you suggest.

    Keep Steam running long enough (or open many fds) that console_log.txt shows steam-runtime-launch-client ... --forward-fd=N with N >= 1024

    If this can happen when Steam continues to run for a long time, then that probably indicates a fd leak somewhere, which is a separate issue (it would be for https://github.com/ValveSoftware/steam-for-linux/ rather than here).

    Games then inherit soft 65536 instead of 1024

    As a note, this is going to break games that use select() (see https://0pointer.net/blog/file-descriptor-limits.html) or do O(n) iteration through every possible fd (Java is known to do this). Ideally they shouldn't do that, but I'm sure that many do.

  2. smcv commented on Nov 2, 2026

    @smcv
    Contributor

    Optionally have the client pass a low fd number

    This is outside the Steam Runtime's control, only the Steam Client gets to choose this.

  3. smcv commented on Nov 2, 2026

    @smcv
    Contributor

    perform the dup2 calls with error checking (fail the launch loudly instead of continuing)

    Unfortunately, the child_setup_func needs to be async-signal-safe (because it runs after fork() in a multi-threaded process), so most of the reasonable ways to report an error are not possible in that context.

  4. smcv commented on Nov 4, 2026

    @smcv
    Contributor

    Keep Steam running long enough (or open many fds) that console_log.txt shows steam-runtime-launch-client ... --forward-fd=N with N >= 1024

    that probably indicates a fd leak somewhere, which is a separate issue

    Some fd leaks in the Steam Client were found and fixed, which should be in a future beta (might already be fixed in the 2026-11-03 beta, I'm not sure). This should avoid the symptom by not using such high fds.

    raise the soft RLIMIT_NOFILE to cover the highest target fd

    The next version of steam-runtime-launcher-service will avoid lowering the RLIMIT_NOFILE that it inherited from the Steam Client, which has a similar practical effect. This is not in Steam Client betas yet, but should arrive in a future beta.

    There is also a more comprehensive change in the queue for how RLIMIT_NOFILE is handled, which will be merged when it's an appropriate time for larger changes.

  5. smcv commented on Nov 9, 2026

    @smcv
    Contributor

    The next version of steam-runtime-launcher-service will avoid lowering the RLIMIT_NOFILE that it inherited from the Steam Client, which has a similar practical effect. This is not in Steam Client betas yet, but should arrive in a future beta.

    This was included in public beta 1794079253 (2026-11-07) or earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions