Commit 27e1ec9
committed
M9.R.38.3: skip nix-store Qt6 dirs in launcher Qt plugin/QML walk
ROOT CAUSE (G2 install ``munmap_chunk(): invalid pointer`` SIGABRT
before Phase 1):
The reproos-installer-launcher.sh walks ``/nix/store/*/lib`` and
adds every dir containing ``qt-6/plugins`` to QT_PLUGIN_PATH +
QT_QPA_PLATFORM_PLUGIN_PATH, every dir containing ``qt-6/qml`` to
QML2_IMPORT_PATH. The de-rootfs nix-store mirror ships:
/nix/store/zp6r9bxds...-qtbase-6.10.1/lib/qt-6/plugins/
pulled in as a transitive of layer-shell-qt-6.5.3 (in the DE
closure). But the installer is COMPILED + RPATH'd against:
/opt/repro/.../qt6-base/.repro/output/install/usr/lib/ (Qt 6.8.1)
When Qt 6.8.1 binary loads a Qt 6.10.1 ``libqoffscreen.so`` plugin
under QT_QPA_PLATFORM=offscreen, the C++ ABI mismatch corrupts the
heap during plugin init and glibc's ``munmap_chunk()`` detects the
bad pointer + raises SIGABRT.
WHY M9.R.37 DIDN'T HIT THIS:
The M9.R.37 18:47 install used the installer binary built at 21:28
(this was before MY 00:11 rebuild that this commit unblocks). At
the M9.R.37 build time the de-rootfs nix-store mirror layout may
have been different -- the Qt 6.10.1 path wasn't yet pulled in as
a layer-shell-qt transitive, OR a subsequent rebuild promoted the
6.10.1 path into the closure. Either way, NOW it's in the mirror
and the launcher's wholesale ``qt-6/plugins`` discovery picks it
up.
FIX:
1. Skip ANY ``/nix/store/*-qt*-*/lib`` dir in the LD_LIBRARY_PATH /
QT_PLUGIN_PATH walk (qtbase, qtdeclarative, qt5compat, layer-
shell-qt, kquickcharts, qtquickcontrols*, qttools, qtwayland --
the full Plasma 6 transitive Qt6 closure). None of those
versions are guaranteed ABI-compatible with the installer's
build-time Qt 6.8.1.
2. AFTER the nix-store walk completes, explicitly add the
reprobuild-side qt6-base + qt6-declarative + qt6-quickcontrols2
+ qt6-tools plugin/qml dirs. These are the EXACT 6.8.1 install
trees the installer's RPATH points at, so the plugin ABI
matches the linked Qt6Core/Gui/Qml ABI.
EVIDENCE:
G2 install attempt #1 (clean, 00:27) -> INSTALLER_RC=134, munmap
G2 install attempt #2 (diag, 00:35) -> same crash, strace tail
shows munmap_chunk right
after locale C->C.UTF-8
message
G2 install attempt #3 (37.7-only, 01:09) -> same crash, confirming
the regression isn't
in M9.R.37.8's cpp
delta
Host run of the same binary outside QEMU -- no crash, Phase 1
reaches the ``repro hardware probe`` spawn. This rules out the
binary itself + isolates the regression to the live-ISO-mounted
nix-store mirror's Qt 6.10.1 path being picked up by the launcher's
qt-6/plugins discovery.
The fix preserves M9.R.37.5's surgical-LD_LIBRARY_PATH approach +
extends the same surgical principle to QT_PLUGIN_PATH +
QML2_IMPORT_PATH: only Qt6 prefixes that match the installer's
build-time Qt version are wired in.1 parent 291c83d commit 27e1ec9
1 file changed
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
647 | 670 | | |
648 | 671 | | |
649 | 672 | | |
| |||
682 | 705 | | |
683 | 706 | | |
684 | 707 | | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
685 | 726 | | |
686 | 727 | | |
687 | 728 | | |
| |||
0 commit comments