Bug 2172771 - [ppc64le] pandoc --version segfaults
Summary: [ppc64le] pandoc --version segfaults
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: ghc
Version: rawhide
Hardware: ppc64le
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2177568
TreeView+ depends on / blocked
 
Reported: 2023-02-23 04:34 UTC by Jens Petersen
Modified: 2024-02-28 05:32 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-13 15:46:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jens Petersen 2023-02-23 04:34:21 UTC
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.

Comment 1 Jens Petersen 2023-02-23 04:52:40 UTC
I wanted to test on eln too, but that buildroot seems broken currently.

Comment 2 Jens Petersen 2023-02-23 06:45:11 UTC
Same thing with pandoc-2.19.2-20.fc39.ppc64le

Comment 3 Jens Petersen 2023-02-23 11:39:21 UTC
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/

Comment 4 Jens Petersen 2023-02-23 13:33:02 UTC
No segfault when built with ghc9.0
https://copr.fedorainfracloud.org/coprs/petersen/pandoc-test-ppc64le/build/5560217/

Comment 5 Jens Petersen 2023-02-23 16:52:02 UTC
Reported to ghc upstream in https://gitlab.haskell.org/ghc/ghc/-/issues/23034

Comment 6 Elliott Sales de Andrade 2023-02-23 21:34:23 UTC
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.

Comment 7 Jens Petersen 2023-02-27 09:59:07 UTC
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).

Comment 8 Jens Petersen 2023-02-27 10:00:34 UTC
(Also as mentioned in the upstream ticket epel9 ghc9.2 is also affected.)

Comment 9 Fedora Update System 2023-03-13 15:44:10 UTC
FEDORA-2023-4295d28b2a has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-4295d28b2a

Comment 10 Fedora Update System 2023-03-13 15:46:48 UTC
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.

Comment 11 Jens Petersen 2023-03-13 16:36:18 UTC
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.)

Comment 12 Jens Petersen 2023-09-28 14:13:11 UTC
Happened again in F40 Rawhide today (ghc-9.4.5 and hslua-marshalling-2.3.0)

Comment 13 Jens Petersen 2023-09-29 06:45:29 UTC
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.

Comment 14 Jens Petersen 2023-09-29 07:09:48 UTC
Instead I am trying the more obvious thing: disabling LUA on ppc64le

Comment 15 Jens Petersen 2024-02-28 05:32:14 UTC
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


Note You need to log in before you can comment on or make changes to this bug.