Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]: Proton Python 的内部 fd 闭环

Open
#462 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@LaurenIsACoder is already working on this.

Since Sep 3, 2026.

Assessment

This issue has not been assessed yet.

Description

bug
Bug Description / 错误描述

启动 Magicraft(AppID 2103140)时,Proton 的 x86_64 Python 尚未进入 Wine,进程卡在关闭文件描述符的循环中。宿主侧跟踪反复观察到:

    getdents64(3, ...)
    fcntl(4, F_DUPFD_CLOEXEC, 0) = 5
    close(4)
    ...
    fcntl(5, F_DUPFD_CLOEXEC, 0) = 4
    close(5)

LAT 为 prctl_mm_exe_fd 保留的身份 fd 会被 Python 的 close_fds 扫描到。guest_exe_identity_relocate() 随后把它复制到另一个 fd;Python 再次扫描并关闭新 fd,形成 4 与 5 的无限迁移。

Environment Information / 环境信息

OS: [e.g., Loongnix, etc.]
操作系统: Debian 13

Kernel Version: [e.g., 5.4.0, etc.]
Linux 内核版本: Linux debian 6.12.107+deb13-loong64

GCC Version: [e.g., 9.3.0, etc.]
GCC 版本: 14.2.0

GLIBC Version: [e.g., 2.31, etc.]
GLIBC 版本: 2.41

LAT Version / Commit Hash: [e.g., 1.6.0, abc1234, etc.]
LAT 版本号 / 提交 Hash: 310b34e2425ea325b1654f3e562f0eb2649a667b

Steps to Reproduce / 重现步骤

以 LAT x86_64 启动 Proton 运行时的 Python,并由它创建子进程

import subprocess
subprocess.run(["/bin/true"], check=True)

单独运行 Python 正常;加入 subprocess.run() 就稳定卡住

Expected Behavior / 预期行为

以 LAT x86_64 启动 Proton 运行时的 Python,并由它创建子进程,能够正常返回。

Actual Behavior / 实际行为

No response

Screenshots or Logs / 截图或日志

No response

Severity / 严重性

Medium / 中

Additional Information / 附加信息

No response

Dominant language
C
Stars
246
Forks
64
Avg merge
2d 1h
Merged PRs (30d)
19

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lat-opensource/lat

All issues in lat-opensource/lat

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.