Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903923 - app-arch/zstd-1.5.6: test failures on hppa
Summary: app-arch/zstd-1.5.6: test failures on hppa
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: HPPA Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PullRequest, TESTFAILURE
Depends on:
Blocks:
 
Reported: 2023-04-06 18:31 UTC by Rolf Eike Beer
Modified: 2025-02-19 22:03 UTC (History)
2 users (show)

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


Attachments
build.log (app-arch_zstd-1.5.4-r3_use_SsN12,84.16 KB, application/octet-stream)
2023-04-06 18:31 UTC, Rolf Eike Beer
Details
build.log and emerge --info (file_903923.txt,149.63 KB, text/plain)
2024-05-31 20:44 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Eike Beer archtester 2023-04-06 18:31:48 UTC
Created attachment 859636 [details]
build.log

Summary of Failures:

 1/10 zstd:fast / test-zstd-fast      FAIL             25.10s   exit status 1
 4/10 zstd / test-longmatch           TIMEOUT          36.14s   killed by signal 15 SIGTERM

Portage 3.0.44 (python 3.10.10-final-0, default/linux/hppa/17.0, gcc-11, glibc-2.36-r5, 5.16.15-gentoo-parisc64 parisc64)
=================================================================
System uname: Linux-5.16.15-gentoo-parisc64-parisc64-PA8800_-Mako-with-glibc2.36
KiB Mem:     8228184 total,   4774772 free
KiB Swap:    4194300 total,   4190312 free
Timestamp of repository gentoo: Thu, 06 Apr 2023 02:15:01 +0000
Head commit of repository gentoo: efa5d29f7b4c6686f19a181e0a05cd6f790f237b
sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.39 p5) 2.39.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-lang/perl:             5.36.0-r1::gentoo
dev-lang/python:           3.9.16_p3::gentoo, 3.10.10_p2::gentoo, 3.11.2_p2::gentoo
dev-util/cmake:            3.25.2::gentoo
dev-util/meson:            1.0.1::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.46::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r4::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             11.3.1_p20221209::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r5::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no

ACCEPT_KEYWORDS="hppa"
ACCEPT_LICENSE="@FREE"
CBUILD="hppa2.0-unknown-linux-gnu"
CFLAGS="-O2 -pipe -march=2.0"
CHOST="hppa2.0-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=2.0"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS=""
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS=""
GENTOO_MIRRORS="ftp://castor.sf-tec.de/ ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEFLAGS="-j 4 -l 4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="acl big-endian bzip2 cli crypt fortran gdbm hppa iconv ipv6 libglvnd ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl unicode xattr zlib" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby30" USERLAND="GNU" VIDEO_CARDS="fbdev dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-07 04:14:53 UTC
/var/tmp/portage/app-arch/zstd-1.5.4-r3/work/zstd-1.5.4/build/meson-.hppa/meson-logs/testlog.txt too please
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-07 05:05:22 UTC
I think this is the check for an executable stack failing because it doesn't want one, but it's unavoidable on HPPA for now.
Comment 3 matoro archtester 2024-05-31 20:44:55 UTC
Created attachment 894757 [details]
build.log and emerge --info

This is still an issue on 1.5.6.  However, I looked at the upstream issue we raised ( https://github.com/facebook/zstd/issues/3605 ), where it was asked if Debian had the same problem.  So I took a look at the latest debian build ( https://buildd.debian.org/status/fetch.php?pkg=libzstd&arch=hppa&ver=1.5.5%2Bdfsg2-2&stamp=1694969773&raw=1 ) and saw that they are passing the test.  After investigating further I found the following:  they appear to be using the cmake build system rather than the meson one.

And, inside the cmake infra, they explicitly add noexecstack flags:  https://github.com/facebook/zstd/blob/dev/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake#L77-L82

Specifically these are "-z noexecstack" and "-Wa,--noexecstack".  Out of curiosity I tried adding these with append-flags.  The assembler reported that it did not know the "--noexecstack" flag but after removing that and just using "-z noexecstack" it worked and actually passed the test.

I don't really understand why this works though, if our toolchain supposedly requires an executable stack.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-31 20:48:03 UTC
> I don't really understand why this works though, if our toolchain supposedly
> requires an executable stack.

It doesn't anymore, but we haven't yet removed the markers in binutils for compat. We need to agree a plan with Helge and Dave on that. The plan last we spoke was for me to test (which I've been doing nad it's been going ok) removing them locally.

I just need to:
a) complete the testing;
b) pass on the news.

Please nag me to finish it :)
Comment 5 matoro archtester 2024-05-31 20:49:32 UTC
(In reply to Sam James from comment #4)
> > I don't really understand why this works though, if our toolchain supposedly
> > requires an executable stack.
> 
> It doesn't anymore, but we haven't yet removed the markers in binutils for
> compat. We need to agree a plan with Helge and Dave on that. The plan last
> we spoke was for me to test (which I've been doing nad it's been going ok)
> removing them locally.
> 
> I just need to:
> a) complete the testing;
> b) pass on the news.
> 
> Please nag me to finish it :)

OK, for this bug should we append-flags to replicate the cmake quirk?  It should be a no-op on systems which already default to noexecstack right?
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-31 20:55:56 UTC
Yeah, it should be fine. The only requirement is a modernish kernel version (iirc 2019+, so only "modernish" in other distro terms.) for hppa
Comment 7 Larry the Git Cow gentoo-dev 2024-06-01 01:28:14 UTC
The bug has been closed via the following commit(s):

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

commit 4ddd3cf09facddf495121af16b2f1151ed882568
Author:     Matoro Mahri <matoro_gentoo@matoro.tk>
AuthorDate: 2024-05-31 23:17:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-06-01 01:27:55 +0000

    app-arch/zstd: enforce non-executable stack
    
    Including on platforms which have it disabled by default, namely hppa.
    
    Closes: https://bugs.gentoo.org/903923
    Bug: https://bugs.gentoo.org/930880
    Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
    Closes: https://github.com/gentoo/gentoo/pull/36936
    Signed-off-by: Sam James <sam@gentoo.org>

 app-arch/zstd/zstd-1.5.6.ebuild | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
Comment 8 Larry the Git Cow gentoo-dev 2024-06-16 07:36:17 UTC
The bug has been referenced in the following commit(s):

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

commit 8bfcabf96671e1d25c60c5b54f06078269a005b2
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2024-06-16 07:33:43 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2024-06-16 07:33:43 +0000

    app-arch/zstd-1.5.6: unbreak build on non-ELF platforms
    
    Basically unbreak the build on any platform where the linker/assembler
    doesn't grok the noexecstack arguments.
    
    Use test-flags-CCLD to invoke the linker/assembler after the compiler so
    the linker/assembler flags actually get tested, instead of just ignored
    by the compiler (which just passes them on).
    
    Bug: https://bugs.gentoo.org/903923
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 app-arch/zstd/zstd-1.5.6.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 9 Larry the Git Cow gentoo-dev 2025-02-19 22:03:20 UTC
The bug has been referenced in the following commit(s):

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

commit 90b422d5d85f278d71181d142f5b26863f6e1700
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-02-19 22:02:08 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-19 22:02:44 +0000

    app-arch/zstd: add 1.5.7
    
    The execstack issue is now fixed upstream, so drop the workaround.
    
    Bug: https://bugs.gentoo.org/903923
    Signed-off-by: Sam James <sam@gentoo.org>

 app-arch/zstd/Manifest          |  1 +
 app-arch/zstd/zstd-1.5.7.ebuild | 71 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+)