Description of problem: pandoc --version segfaults on ppc64le Version-Release number of selected component (if applicable): pandoc-2.19.2-19.fc38 How reproducible: 100% Steps to Reproduce: 1. run `pandoc -v` inside a build on ppc64le Actual results: + pandoc -v /var/tmp/rpm-tmp.C99aks: line 43: 31 Segmentation fault (core dumped) pandoc -v Expected results: no error or segfault Additional info: This started with the recent move to ghc-9.2 I suspect this might actually be a ghc bug.
I wanted to test on eln too, but that buildroot seems broken currently.
Same thing with pandoc-2.19.2-20.fc39.ppc64le
I built pandoc-2.19.2 with ghc9.4 in copr and then pandoc -v also segfaulted: https://copr.fedorainfracloud.org/coprs/petersen/pandoc-test-ppc64le/build/5560008/
No segfault when built with ghc9.0 https://copr.fedorainfracloud.org/coprs/petersen/pandoc-test-ppc64le/build/5560217/
Reported to ghc upstream in https://gitlab.haskell.org/ghc/ghc/-/issues/23034
The backtrace is not great, but looks like: (gdb) bt #0 0x0000000017e436e8 in lua_type () #1 0x0000000017e3b428 in ghczuwrapperZC1ZCluazm2zi2zi1zmKRmEomuYCwNASKOuLK7fDIZCLuaziPrimaryZCluazutype () #2 0x0000000017df7ca8 in hsluazmmarshallingzm2zi2zi1zmCyWh4OZZgxoeJYv9YK7F33ZZ_HsLuaziMarshallingziPeekers_zdwtoByteString_entry () #3 0x000000001bf29710 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) Maybe something to do with FFI.
Thanks, indeed it seems to be crashing the hslua version code of the --version output function. Apparently it affects all minor versions of ghc-9.2 (and 9.4 I suppose).
(Also as mentioned in the upstream ticket epel9 ghc9.2 is also affected.)
FEDORA-2023-4295d28b2a has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-4295d28b2a
FEDORA-2023-4295d28b2a has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.
I intend to leave this open until a fix is available for ghc. (I accidentally quoted this bug instead of the pandoc one in the workaround changelog.)
Happened again in F40 Rawhide today (ghc-9.4.5 and hslua-marshalling-2.3.0)
Actually looks more serious now with pandoc 3: in particular hslua-cli seems to crash even if I disable the version output (well in itself not surprising) but then now there is no workaround... At this rate I might have to push pandoc lua broken for ppc64le.
Instead I am trying the more obvious thing: disabling LUA on ppc64le
Still happens as of pandoc-3.1.3-28.fc41 and pandoc-cli-0.1.1.1-28.fc41 built with ghc-9.4.5-140.fc41