Bug 1594966 - Illegal instruction on some CPUs
Summary: Illegal instruction on some CPUs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cjdns
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stuart D Gathman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-25 21:16 UTC by Stuart D Gathman
Modified: 2018-08-09 16:33 UTC (History)
1 user (show)

Fixed In Version: cjdns-20.2-4.fc28 cjdns-20.2-4.el6 cjdns-20.2-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-30 02:26:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stuart D Gathman 2018-06-25 21:16:16 UTC
Description of problem:
cjdns.service: Main process exited, code=dumped, status=4/ILL

Version-Release number of selected component (if applicable):
cjdns-20.2-2.fc27.x86_64

How reproducible:
CPU dependent

Steps to Reproduce:
1. build SRPM on Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz
2. install and run resulting rpms on Intel(R) Xeon(R) CPU X3440  @ 2.53GHz
3.

Actual results:
Illegal insn core dump

Expected results:
Normal operation

Additional info:
Other combinations of build and install CPUs also fail.  The package always works when rebuilt on the CPU where it will run.

Apparently, the embedded cnacl library tries to do some CPU dependent optimizations by default during compile.

Comment 1 Stuart D Gathman 2018-06-30 23:23:51 UTC
I'm hopeful that removing the -march=native from the node_build will resolve this.  The bundled cnacl also chooses a "plan", many of which will crash on other CPUs.  I'm guessing amd64 is a portable plan for x64_64, but not sure.  I'm pretty sure the amd64_AVX plan is not portable.

Workaround for those running into this problem: rebuild SRPM on the target system (or one with a similar CPU).

Comment 2 Stuart D Gathman 2018-07-14 16:00:10 UTC
Changing -march=native to -mtune=generic is part of the issue.  Another problem is the "plan" chosen by the embedded cnacl build system.  The official Fedora build ran on an AVX processor for the x86_64 build, and the plan was:

System is [amd64_AVX]
Using premade plan at [node_build/plans/amd64_AVX_plan.json]

After talking with upstream, I'm pretty confident that solving both these problems will result in portable binaries - at least for x86_64.

Comment 3 Fedora Update System 2018-07-19 03:52:51 UTC
cjdns-20.2-4.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-6f3beea73f

Comment 4 Fedora Update System 2018-07-19 03:52:58 UTC
cjdns-20.2-4.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-b20343e9da

Comment 5 Fedora Update System 2018-07-19 03:53:03 UTC
cjdns-20.2-4.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-095a53435e

Comment 6 Fedora Update System 2018-07-19 18:05:03 UTC
cjdns-20.2-4.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-095a53435e

Comment 7 Fedora Update System 2018-07-19 18:25:22 UTC
cjdns-20.2-4.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-6f3beea73f

Comment 8 Fedora Update System 2018-07-19 20:21:22 UTC
cjdns-20.2-4.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-b20343e9da

Comment 9 Fedora Update System 2018-07-30 02:26:58 UTC
cjdns-20.2-4.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2018-08-09 15:28:21 UTC
cjdns-20.2-4.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2018-08-09 16:33:47 UTC
cjdns-20.2-4.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


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