Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 910183 - app-text/pandoc-bin: illegal hardware instruction
Summary: app-text/pandoc-bin: illegal hardware instruction
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Maciej Barć
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-07-10 09:19 UTC by Jonas Frei
Modified: 2023-07-25 08:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Frei 2023-07-10 09:19:01 UTC
I installed app-text/pandoc-bin on my VM. When I use the following command, I get the following error:

Command:
pandoc --pdf-engine=lualatex -H <preamble-file.tex> <input-file.md> -o <output-file.pdf>

Error:
[1]    19126 illegal hardware instruction

Here some additional information:

Arch: x86_64
Using QEMU on a Windows Host

Output of `resolve-march-native`:
-march=nocona -madx -mbmi -mbmi2 -mclflushopt -mfsgsbase -mrdseed -msahf -mxsave -mxsavec -mxsaveopt -mxsaves --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=12288
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-10 09:23:14 UTC
It's built by upstream rather than us, so likely need to report there.

Could you use gdb to find the bad instruction?

Do any older versions work?
Comment 2 Jonas Frei 2023-07-10 10:21:19 UTC
I tried ~amd64 and stable.

Probably not useful, but here is the gdb output:

```
Starting program: /usr/bin/pandoc --pdf-engine=lualatex -H preamble.tex dokumentation_cockpit.md -o dokumentation_cockpit.pdf
[New LWP 13421]
[New LWP 13422]
[New LWP 13423]
[New LWP 13424]

Thread 1 "pandoc" received signal SIGILL, Illegal instruction.
0x0000000006413259 in ?? ()
```
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-10 10:22:50 UTC
Do you get anything useful with 'x/i $pc'?
Comment 4 Jonas Frei 2023-07-10 10:25:01 UTC
(gdb) x/i $pc
=> 0x6407fdc:   vpxor  %xmm5,%xmm5,%xmm5
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-10 10:28:00 UTC
Thanks. According to https://www.felixcloutier.com/x86/pxor, that's AVX.

I can't immediately see where they build their binaries. Could you report this upstream & link it here, noting that the binary appears to be using AVX which isn't available on all 64-bit x86 CPUs?
Comment 6 Jonas Frei 2023-07-10 10:45:32 UTC
Upstream issue: https://github.com/jgm/pandoc/issues/8947
Comment 7 Jonas Frei 2023-07-17 06:28:46 UTC
After a lot of testing and upstream being very helpful, we found out that this seems to be a regression introduced with pandoc-3. The issue does not occur with pandoc-2 release binaries.

I was thinking if it could be worth adding the latest 2- release (2.19.2) to the tree? Also, what I think is a bit strange: For app-text/pandoc `pandoc-3` is not available whereas for app-text/pandoc-bin there are only `pandoc-3` releases.
Comment 8 Maciej Barć gentoo-dev 2023-07-17 07:13:38 UTC
(In reply to Jonas Frei from comment #7)

> Also, what I think is a bit strange: For app-text/pandoc
> `pandoc-3` is not available whereas for app-text/pandoc-bin there are only
> `pandoc-3` releases.

I think from-source pandoc is harder to package (I do not take care of it).
Comment 9 Jonas Frei 2023-07-17 10:31:55 UTC
Would you accept a PR adding the latest version 2 release to pandoc-bin? This would allow users having the same issue to downgrade and mask version 3. And once the issue is solved upstream we could remove version 2?
Comment 10 Maciej Barć gentoo-dev 2023-07-17 10:37:49 UTC
(In reply to Jonas Frei from comment #9)
> Would you accept a PR adding the latest version 2 release to pandoc-bin?
> This would allow users having the same issue to downgrade and mask version
> 3. And once the issue is solved upstream we could remove version 2?

Sure!
Comment 11 Larry the Git Cow gentoo-dev 2023-07-18 10:26:58 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c75aad68023e261e3a6546300e46b4ae05dba033

commit c75aad68023e261e3a6546300e46b4ae05dba033
Author:     Jonas Frei <freijon@pm.me>
AuthorDate: 2023-07-17 18:38:37 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2023-07-18 10:26:55 +0000

    app-text/pandoc-bin: add 2.19.2
    
    Bug: https://bugs.gentoo.org/910183
    Signed-off-by: Jonas Frei <freijon@pm.me>
    Closes: https://github.com/gentoo/gentoo/pull/31932
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 app-text/pandoc-bin/Manifest                 |  2 ++
 app-text/pandoc-bin/pandoc-bin-2.19.2.ebuild | 52 ++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)
Comment 12 Jonas Frei 2023-07-25 04:57:32 UTC
Upstream fixed the issue with the 3.1.6 release. Thank you for the support to give them the relevant information! Version 2.19.2 can be removed from the tree if you don't want it anymore.
Comment 13 Larry the Git Cow gentoo-dev 2023-07-25 08:56:19 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5fb945bc84f2eeb5c358cb97fb4796d4a9ea586

commit e5fb945bc84f2eeb5c358cb97fb4796d4a9ea586
Author:     Maciej Barć <xgqt@gentoo.org>
AuthorDate: 2023-07-25 08:55:17 +0000
Commit:     Maciej Barć <xgqt@gentoo.org>
CommitDate: 2023-07-25 08:55:17 +0000

    app-text/pandoc-bin: drop old 2.19.2
    
    Bug: https://bugs.gentoo.org/910183
    Signed-off-by: Maciej Barć <xgqt@gentoo.org>

 app-text/pandoc-bin/Manifest                 |  2 --
 app-text/pandoc-bin/pandoc-bin-2.19.2.ebuild | 52 ----------------------------
 2 files changed, 54 deletions(-)