[BUG] vrmonitor segfaults in QSslCertificate at startup: bundled Qt 5.5 picks up system OpenSSL 3 via libssl.so (workaround inside)
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- linux
调研方向
Start by reproducing the crash with SteamVR's bundled Qt libraries and system OpenSSL, then compare library resolution with OpenSSL 1.0 available from LegacySteamRuntime. The issue names bin/linux64/qt/lib and identifies vrmonitor's startup network request and QSslCertificate::fromPath() as investigation entry points. Done means vrmonitor no longer crashes when parsing certificates on current distributions without relying on the manual workaround.
由索引模型根据 Issue 内容生成。
描述
Summary
Since the Steam client update 1794424036, vrmonitor segfaults about 1 s after SteamVR starts, and vrserver then shuts everything down ("Lost master process … Quitting all immediately"). SteamVR itself was not updated (still 2.18.4); the crash started with the client update.
SteamVR's bundled Qt (bin/linux64/qt/lib, Qt 5.5.0) loads OpenSSL at runtime by its unversioned name (libssl.so / libcrypto.so). It was built against OpenSSL 1.0 (it needs SSLeay, SSL_library_init, sk_num, CRYPTO_num_locks, …). On a current distro, libssl.so resolves to OpenSSL 3 (it comes from openssl-devel / libssl-dev). Qt logs cannot resolve … for those functions (the same warnings as #745), and then calls them anyway the first time it parses a certificate, which crashes. In my case that happens on the first QNetworkAccessManager::get at startup (shown while waiting for a wireless headset).
With OpenSSL 1.1 it crashes the same way. With OpenSSL 1.0 it works.
Environment
- Distro: Nobara Linux 44 (Fedora 44 base), kernel 7.2, KDE Plasma
- OpenSSL: 3.5.9 (
openssl-develinstalled, so/usr/lib64/libssl.so→libssl.so.3) - Steam client: 1794424036 (native, not Flatpak)
- SteamVR: 2.18.4 (stable), vrlink 0.5.8 (Steam Frame)
- GPU: AMD (Mesa 26.2)
Stack (coredumpctl)
#0 libQt5Network.so.5 + 0x1003c1
#1 libQt5Network.so.5 + 0xf1537
#2 libQt5Network.so.5 + 0xf2042
#3 QSslCertificate::fromData(QByteArray const&, QSsl::EncodingFormat)
#4 QSslCertificate::fromPath(QString const&, QSsl::EncodingFormat, QRegExp::PatternSyntax)
#7 QSslCertificate::QSslCertificate(QByteArray const&, QSsl::EncodingFormat)
#8 QSslConfiguration::QSslConfiguration()
#11 QNetworkAccessManager::createRequest(...)
#12 QNetworkAccessManager::get(QNetworkRequest const&)
#13 vrmonitor + 0x24e05f
Reproduce outside SteamVR
Loading SteamVR's libQt5Network.so.5 and calling QSslCertificate::fromPath() on any single certificate (for example any certificate from /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem) segfaults with the system OpenSSL 3 and with OpenSSL 1.1. It parses all of them fine when OpenSSL 1.0 is found first.
Workaround
Give SteamVR's Qt the OpenSSL 1.0 that Steam already ships in the Legacy Steam Runtime (install "Steam Linux Runtime" / LegacySteamRuntime if it's missing). qt/lib is on vrmonitor's LD_LIBRARY_PATH, ahead of the system libraries:
L=~/.local/share/Steam/steamapps/common/LegacySteamRuntime/steam-runtime/lib/x86_64-linux-gnu
cd ~/.local/share/Steam/steamapps/common/SteamVR/bin/linux64/qt/lib
cp -L "$L/libssl.so.1.0.0" "$L/libcrypto.so.1.0.0" .
ln -sf libssl.so.1.0.0 libssl.so
ln -sf libcrypto.so.1.0.0 libcrypto.so
A SteamVR update or a file verification may remove these files; run the commands again if so. To undo, delete the four entries.
Suggested fix
Ship the OpenSSL that the bundled Qt was built for in qt/lib (or load it by its versioned name), so vrmonitor never picks up the system's unversioned libssl.so. A Qt build that has OpenSSL linked in, or a newer Qt, would avoid the problem entirely.
- 主要语言
- Shell
- 星标
- 1.2k
- 派生
- 58
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ValveSoftware/SteamVR-for-Linux 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
ValveSoftware/SteamVR-for-Linux#981 · 4 条评论 · 1 个 reaction ·
-
bug
难度 4/5 3-5 天 新手友好度 38/100
ValveSoftware/SteamVR-for-Linux#1097 ·
-
bug
难度 4/5 3-5 天 新手友好度 35/100
ValveSoftware/SteamVR-for-Linux#1095 · 2 条评论 ·
-
bug
难度 4/5 3-5 天 新手友好度 45/100
ValveSoftware/SteamVR-for-Linux#1094 ·
-
难度 4/5 3-5 天 新手友好度 35/100
ValveSoftware/SteamVR-for-Linux#1093 ·
查看 ValveSoftware/SteamVR-for-Linux 的全部 Issue
相似的 Issue
-
area: build-and-ci guard-red-main S3: minor
难度 2/5 1-3 小时 新手友好度 72/100
manaflow-ai/cmux#65616 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
achisolomon/software-factory#300 · 1 条评论 ·
-
难度 2/5 半天 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 78/100
flathub/cc.arduino.IDE2#168 ·