Bug 2057737 - annocheck failing to identify some Rust exectuables as Rust executables on some architectures during Fedora updates
Summary: annocheck failing to identify some Rust exectuables as Rust executables on so...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: annobin
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-23 23:55 UTC by mulhern
Modified: 2022-11-28 19:40 UTC (History)
5 users (show)

Fixed In Version: annobin-10.55.fc37
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-03 23:58:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description mulhern 2022-02-23 23:55:10 UTC
Description of problem:

annocheck failing to identify some Rust executables as Rust executables on some architectures

Version-Release number of selected component (if applicable):

This information is not available to me. It was the version of annocheck that was run as part of the tests for the a particular release of stratisd.

See: https://osci-jenkins-1.ci.fedoraproject.org/job/fedora-ci/job/rpminspect-pipeline/job/master/77082/testReport/(root)/tests/_annocheck/.


How reproducible:

It is not always the same. In https://osci-jenkins-1.ci.fedoraproject.org/job/fedora-ci/job/rpminspect-pipeline/job/master/76782/testReport/(root)/tests/_annocheck/, it was the same set of executables, but only three architectures.

But it seems to occur in some form on f35, f36, and f37.


Steps to Reproduce:
1. Go through gating in Fedora OR
2. Observe previous instances on bodhi: https://bodhi.fedoraproject.org/updates/?packages=stratisd
3.

Actual results:

See instance of this problem here:
https://osci-jenkins-1.ci.fedoraproject.org/job/fedora-ci/job/rpminspect-pipeline/job/master/77082/testReport/(root)/tests/_annocheck/

This is detected by the INFO message: "Written in a language other than C/C++/Go/Rust".

All the executables checked in the example are Rust executables. Two Rust executables do not receive that message in each instance, six do. The two Rust executables that do not get that message are:
- stratis-setup-generator
- stratis-clevis-setup-generator
Both of these executables are hard links to stratis-str-cmp.

The list of executables that have that message are:
- stratis-str-cmp
- stratis-base32-decode (hard link to stratis-str-cmp)
- stratis-predict-usage (hard link to stratis-str-cmp)
- stratisd-min
- stratisd
- stratis-min

The important difference has got to be something to do with the debuginfo file being used by annocheck: For the six that aren't identified as Rust executables, the debug info file is: stratisd-debuginfo-3.0.4-1.fc35, for the ones that are identified as Rust executables the debug info file is stratisd-dracut-debuginfo-3.0.4-1.fc35 because these are included in the dracut subpackage of stratisd.

The arches where identification fails are: armv7hl, i686, x86_64, s390x. The arches where it appears to succeed are aarch64 and ppc64le.

It is unclear to me whether this behavior is caused by rpm macros, the Rust toolchain, or annocheck itself.


Expected results:

All the executables are Rust executables, they should be identified as such.

Additional info:

Comment 1 mulhern 2022-02-23 23:59:02 UTC
I was redirected here after posting the bug initially to https://pagure.io/fedora-ci/general/issue/321, and then to https://github.com/rpminspect/rpminspect/issues/641. As stated in the bug description, I'm not convinced that annocheck is the root cause of the problem, although I'm sure that it is involved.

Comment 2 Nick Clifton 2022-02-28 11:48:53 UTC
This problem is that annocheck was built on a system that did not know about Rust.  (More specifically the definition of the DW_LANG_Rust value was missing from the /usr/include/dwarf.h header file).

I have a fix for this which I am testing now...

Comment 3 Nick Clifton 2022-02-28 12:04:03 UTC
Fixed in annobin-10.55.fc37

Comment 4 mulhern 2022-03-21 15:40:33 UTC
Thanks. The version of annocheck being run in Fedora gating tests is 10.53, as of today; we will try to confirm the fix when that is updated.

Comment 5 mulhern 2022-04-02 00:49:59 UTC
Fedora has bumped to 10.58 and we're no longer seeing the error message "Written in a language other than C/C++/Go/Rust" for any of our Rust executables.

Comment 6 mulhern 2022-04-03 23:58:13 UTC
I would like to close this as I believe it is fixed now.


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