[Bug]: Linux startup crash when Mesa's GLX is forced (static libstdc++ in libskiko)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 91/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
apps/multiplatform/build.gradle.kts から始め、skiko-awt-runtime-linux-x64 の依存関係解決を確認します。Issue で提案されたバージョンの上書きを適用し、skiko-awt は 0.9.24 のままにしてから、該当するディストリビューションをビルドします。完了の基準は、Linux アプリが __GLX_VENDOR_LIBRARY_NAME=mesa 付きで起動し、ロケールによる中断や SkSL の失敗が発生しないことです。
索引モデルが issue の本文から書いたものです。
説明
Is there an existing issue for this?
- I have searched the existing issues
Platform
Linux
OS version
Fedora 44, KDE Plasma 6 Wayland. Hybrid GPU: AMD Radeon 680M and NVIDIA RTX 3050 (driver 620.73.04). Mesa 26.2.7, glibc 2.43.
App version
7.1.4 AppImage, 7.1.5 AppImage, 7.1.5 Flatpak.
Current Behavior
The app aborts during startup when the session prefers Mesa's GLX vendor. Hybrid laptops use this to keep the dGPU powered down:
export __GLX_VENDOR_LIBRARY_NAME=mesa
- 7.1.4 AppImage (skiko 0.9.4.2):
free(): invalid size, SIGABRT. - 7.1.5 AppImage and Flatpak (skiko 0.9.24): 129 SkSL compiler errors, then
SkSLModuleLoader.cpp:157: fatal error: "Unable to load module sksl_shared".
Without the variable, or with __GLX_VENDOR_LIBRARY_NAME=nvidia, both versions start.
Expected Behavior
The app starts with Mesa's GLX vendor pinned.
Steps To Reproduce
- On a hybrid GPU system, set
__GLX_VENDOR_LIBRARY_NAME=mesain the session, for example in~/.config/environment.d/50-battery-gpu.conf. - Start the 7.1.4 or 7.1.5 AppImage, or the 7.1.5 Flatpak.
- The process aborts before the main window is usable.
- Workarounds that start it:
LD_PRELOAD=/usr/lib64/libstdc++.so.6 <app>, or unset the variable, or set it tonvidia.
Relevant log output
7.1.4 AppImage:
free(): invalid size
...
#4 malloc_printerr
#5 malloc_printerr_tail
#6 std::locale::_Impl::_M_install_facet(...)
#7 std::locale::_Impl::_Impl(unsigned long)
#8 std::locale::_S_initialize_once()
#13 std::ios_base::Init::Init()
#14 _GLOBAL__sub_I_StdVectorDecoder.cc
#21 _dl_open(.../libskiko-linux-x64.so)
7.1.5 AppImage and Flatpak:
error: 1: floating-point value is too large: 1.
...3 b;a.yz*=.01;if(a.y+a.z>=1.)b=(a.y/(a.y+a.z)).xxx;else{b=$css_hsl_to_srgb(half3(a.x,100.,50.));b*=(1.-a.y)-a.z;b+=a.y;}return b;}
129 errors
../../src/sksl/SkSLModuleLoader.cpp:157: fatal error: "Unable to load module sksl_shared"
Root cause
libskiko-linux-x64.so in 0.9.4.2 and 0.9.24 statically links libstdc++ and exports its symbols. readelf -d has no NEEDED libstdc++.so.6 entry.
With __GLX_VENDOR_LIBRARY_NAME=mesa, glvnd loads Mesa's GLX stack before libskiko:
calling init: /lib64/libstdc++.so.6
calling init: /lib64/libLLVM.so.22.1
calling init: /lib64/libgallium-26.2.7.so
calling init: /lib64/libGLX_mesa.so.0
calling init: .../libskiko-linux-x64.so
The gdb trace shows locale ids coming from both copies. The crashing call uses std::numpunct<char>::id from libskiko at index 33. The classic locale's facet arrays are static storage, created with placement new in libstdc++-v3/src/c++11/locale_init.cc:495-496. _M_install_facet in libstdc++-v3/src/c++98/locale.cc:364-365 grows the array and calls delete[] on the static facet_vec and cache_vec, which glibc rejects.
0.9.24 no longer aborts at that delete[], but the same mixed runtime produces the SkSL failure above.
Upstream fix
skiko fixed the root cause by linking libstdc++ dynamically on Linux:
97472ddee061581089bd073c83e5299159e40522 2025-11-24
Link libstdc++ dynamically on linux
https://github.com/JetBrains/skiko/pull/1133
https://github.com/JetBrains/skiko/commit/97472ddee061581089bd073c83e5299159e40522
First tags: v0.9.37.1, v0.9.37.3, v0.9.37.4. The 0.9.37.4 native library has NEEDED libstdc++.so.6; the 0.9.24 library does not.
SimpleX 7.1.5 pins skiko 0.9.24, which predates the fix. A full bump to 0.9.37.4 breaks Compose 1.8.2 (NoSuchMethodError: SkiaLayerProperties.<init>). The native library alone is compatible: keeping the app's 0.9.24 Java jar and replacing only libskiko-linux-x64.so with the 0.9.37.4 native library starts both 7.1.4 and 7.1.5 with the Mesa variable, in a 10 second startup test.
Suggested change in apps/multiplatform/build.gradle.kts: force only skiko-awt-runtime-linux-x64 to 0.9.37.4, and keep skiko-awt at 0.9.24 for the font fix from https://github.com/simplex-chat/simplex-chat/pull/8288.
if (requested.name == "skiko-awt-runtime-linux-x64" &&
(requested.version == "0.9.4.2" || requested.version == "0.9.24")) {
useVersion("0.9.37.4")
}
The AppImage packager can do the same by copying the 0.9.37.4 libskiko-linux-x64.so over the one from createDistributable. The Flatpak extracts the same AppImage, so it inherits the fix.
Related
- https://github.com/simplex-chat/simplex-chat/issues/6540
- https://github.com/simplex-chat/simplex-chat/issues/6324
- https://github.com/simplex-chat/simplex-chat/issues/7119
They are the bitmap PCF font crash in SkTypeface_fontconfig::onOpenStream, fixed by https://github.com/simplex-chat/simplex-chat/pull/8288. That is a different stack from this report.
Minor
On KDE, com.jthemedetecor.GnomeThemeDetector throws at line 119 because the gsettings output is empty. It is harmless and appears in successful runs too.
Exception in thread "GTK Theme Detector Thread" java.lang.NullPointerException: Cannot invoke "String.split(String)" because "readLine" is null
at com.jthemedetecor.GnomeThemeDetector$DetectorThread.run(GnomeThemeDetector.java:119)
rc=124
- 主要言語
- Haskell
- スター
- 19.8k
- フォーク
- 1.3k
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 233
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
simplex-chat/simplex-chat のほかの issue
-
bug desktop
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
simplex-chat/simplex-chat#8291 ·
メンテナーはふだん 1 日以内に返信
-
enhancement terminal
難易度 1/5 1〜3時間 初心者へのやさしさ 66/100
simplex-chat/simplex-chat#8043 ·
メンテナーはふだん 1 日以内に返信
-
enhancement triage
難易度 1/5 1時間未満 初心者へのやさしさ 77/100
simplex-chat/simplex-chat#7781 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
simplex-chat/simplex-chat#7714 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
simplex-chat/simplex-chat#7649 ·
メンテナーはふだん 1 日以内に返信
simplex-chat/simplex-chat の issue をすべて見る
似ている issue
-
area:client bug priority-low
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
compiler-explorer/compiler-explorer#9710 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
http-semantics-0.5.0オープンfailure: bounds
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
commercialhaskell/stackage#8187 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100