Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 865937 - app-misc/spire-1.3.3 fails tests
Summary: app-misc/spire-1.3.3 fails tests
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-21 14:53 UTC by Agostino Sarubbo
Modified: 2024-03-17 07:43 UTC (History)
1 user (show)

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


Attachments
build.log.xz (build.log.xz,713.24 KB, application/x-xz)
2022-08-21 14:53 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-08-21 14:53:17 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-misc/spire-1.3.3 fails tests (lto).
Discovered on: amd64 (internal ref: lto_tinderbox)

NOTE:
This machine uses lto with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing

Here is a bit of explanation:

-Werror=lto-type-mismatch:
User to find possible runtime issues in packages. It likely means the package is unsafe to build & use with LTO.
For projects using the same identifier but with different types across different files, they must be fixed to be consistent across the codebase.

-Werror=odr:
Used to find possible runtime issues in packages. These bugs are a problem anyway but may be even worse when combined with LTO. C++ code must comply with the One Definition Rule (ODR) - see https://en.cppreference.com/w/cpp/language/definition#One_Definition_Rule.

-Werror=strict-aliasing:
Used to find possible runtime issues in packages. These bugs are a problem anyway but may be even worse when combined with LTO.

Workarounds:
- If upstream is friendly and still active, file a bug upstream. For emulators, codecs, games, or multimedia packages, it may be worth just applying a workaround instead, as upstreams sometimes aren't receptive to these bugs (VALID FOR ALL).
- Use the new 'filter-lto' from flag-o-matic.eclass as it's likely to be unsafe with LTO (VALID FOR lto-type-mismatch - odr).
- Fix it yourself if interested, of course (VALID FOR ALL).
- Append-flags -fno-strict-aliasing (VALID FOR strict-aliasing).
- Use memcpy() but a union is sometimes suitable too (VALID FOR strict-aliasing).
- -fstrict-aliasing is implied by -O2, so this must be addressed in some form (VALID FOR strict-aliasing).

See also: https://marc.info/?l=gentoo-dev&m=165639574126280&w=2
Comment 1 Agostino Sarubbo gentoo-dev 2022-08-21 14:53:24 UTC
Created attachment 800361 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Agostino Sarubbo gentoo-dev 2022-08-21 14:53:26 UTC
Error(s) that match a know pattern:


        	Error:      	Not equal: 
        Error: a SPIFFE ID is required
        Error: a parent ID is required
        Error: a parent ID is required if the node flag is not set
        Error: a positive TTL is required
        Error: a trust domain name is required
        Error: an entry ID is required
        Error: at least one selector is required
        Error: bundle endpoint URL is required
        Error: cannot parse bundle endpoint SPIFFE ID: scheme is missing or invalid
        Error: cannot parse bundle file: unable to parse bundle data: no PEM blocks
        Error: cannot read bundle file: open non-existent-path: no such file or directory
        Error: cannot use other flags to specify relationship fields when 'data' flag is set
        Error: connection error: desc = "transport: error while dialing: dial unix /does-not-exist.sock: connect: no such file or directory"
        Error: could not parse item 0: trust domain is required
        Error: endpoint SPIFFE ID is required if 'https_spiffe' endpoint profile is set
        Error: entry ID is required
        Error: error fetching entries: rpc error: code = Internal desc = internal server error
        Error: error fetching entry ID non-existent-id: rpc error: code = NotFound desc = no such registration entry
        Error: error listing federation relationship: rpc error: code = Internal desc = oh! no
        Error: error parsing SPIFFE ID "invalid-id": scheme is missing or invalid
        Error: error parsing parent ID "invalid-id": scheme is missing or invalid
        Error: error parsing selector "invalid-selector": selector "invalid-selector" must be formatted as type:value
        Error: error parsing selectors: selector "invalid-selector" must be formatted as type:value
        Error: error showing federation relationship: rpc error: code = Internal desc = oh! no
        Error: failed to create one or more entries
        Error: failed to create one or more federation relationships
        Error: failed to delete entry: entry not found
        Error: failed to delete federated bundle "domain1.test": some error
        Error: failed to delete federated bundle: rpc error: code = Internal desc = some error
        Error: failed to delete federation relationship "example.org": oh! no
        Error: failed to delete federation relationship: rpc error: code = Internal desc = oh! no
        Error: failed to parse JSON: invalid character '-' in numeric literal
        Error: failed to refresh bundle: rpc error: code = Internal desc = oh! no
        Error: failed to set federated bundle: failed to set
        Error: failed to set federated bundle: rpc error: code = Internal desc = some error
        Error: failed to update one or more entries
        Error: failed to update one or more federation relationships
        Error: id flag is required
        Error: id is required
        Error: invalid format: "invalid"
        Error: invalid format: "invalidformat"
        Error: match behavior "NO-MATCHER" unknown
        Error: node entries can not federate
        Error: open somePath: no such file or directory
        Error: request failed: rpc error: code = Unknown desc = server error
        Error: rpc error: code = Internal desc = internal server error
        Error: rpc error: code = Internal desc = some error
        Error: rpc error: code = Unknown desc = server-error
        Error: rpc error: code = Unknown desc = some error
        Error: selector "unix" must be formatted as type:value
        Error: the -entryID flag can't be combined with others
        Error: there is no federation relationship with trust domain "spiffe://example.org"
        Error: trust domain is required
        Error: unable to load bundle data: open /not/a/real/path/to/a/bundle: no such file or directory
        Error: unable to parse bundle data: no PEM blocks
        Error: unable to parse to spiffe bundle: spiffebundle: unable to parse JWKS: invalid character 'i' looking for beginning of value
        Error: unknown bundle endpoint profile type: "bad-type"
        Error: unsupported match behavior
        Error: unsupported mode "invalid"
FAIL
FAIL	github.com/spiffe/spire/pkg/server/datastore/sqlstore	12.797s
fatal: not a git repository (or any parent up to mount point /var/tmp)
        Error: connection error: desc = "transport: error while dialing: dial unix /does-not-exist.sock: connect: no such file or directory"
Comment 3 Eli Schwartz 2024-03-17 07:43:35 UTC
No evidence whatsoever that the test failures are related to LTO.

Furthermore, the ebuild restricts the tests, which is a good sign that the package maintainer believes it isn't practical to run them and expect them to pass.