Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832138 - estrip debugedit ewarn output lines mixed up
Summary: estrip debugedit ewarn output lines mixed up
Status: IN_PROGRESS
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 953745
Blocks: 933986
  Show dependency tree
 
Reported: 2022-01-27 02:07 UTC by Ken Rushia
Modified: 2025-06-05 03:07 UTC (History)
3 users (show)

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


Attachments
More examples in this /var/log/portage/elog/summary.log (summary.log,113.86 KB, text/x-log)
2022-01-27 02:10 UTC, Ken Rushia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Rushia 2022-01-27 02:07:22 UTC
There are two ewarns from estrip pertaining to lack of debugedit that somehow spew out strangely; instead of the first ewarn followed by the second.

Found with a fresh install where I set FEATURES="installsources" but forgot to emerge dev-util/debugedit.

Reproducible: Always

Steps to Reproduce:
1. Make sure debugedit and rpm are NOT installed
2. Add installsources to FEATURES
3. emerge something (dev-util/debugedit for example)
Actual Results:  
 * Messages for package dev-util/debugedit-5.0:

 * FEATURES=installsources is enabled but the debugedit binary could not be
 * FEATURES=installsources is enabled but the debugedit binary could not be
 * found. This feature will not work unless debugedit is installed!
 * found. This feature will not work unless debugedit is installed!


Expected Results:  
 * Messages for package dev-util/debugedit-5.0:

 * FEATURES=installsources is enabled but the debugedit binary could not be
 * found. This feature will not work unless debugedit is installed!


(chroot) Jiggabyte / # emerge --info
Portage 3.0.30 (python 3.9.9-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-11.2.0, glibc-2.33-r7, 4.9.29-gentoo x86_64)
=================================================================
System uname: Linux-4.9.29-gentoo-x86_64-AMD_FX-tm-8320_Eight-Core_Processor-with-glibc2.33
KiB Mem:    20533348 total,   3416952 free
KiB Swap:   32766972 total,  32766972 free
Timestamp of repository gentoo: Wed, 26 Jan 2022 21:30:01 +0000
Head commit of repository gentoo: a33c30c98934ffe72d81a55c38816ae0c91e30c9
sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p0) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p8::gentoo
dev-lang/perl:             5.34.0-r6::gentoo
dev-lang/python:           3.9.9-r1::gentoo, 3.10.0_p1-r1::gentoo
dev-lang/rust-bin:         1.58.1::gentoo
dev-util/cmake:            3.21.4::gentoo
dev-util/meson:            0.60.3::gentoo
sys-apps/baselayout:       2.7-r3::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.25::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.4::gentoo
sys-devel/binutils:        2.37_p1::gentoo
sys-devel/binutils-config: 5.4::gentoo
sys-devel/gcc:             11.2.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/llvm:            13.0.0::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.33-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=2 --load-average=8"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live compressdebug config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles installsources ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-backup unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j 5 -l 4"
PKGDIR="/var/cache/binpkgs"
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="X a52 aac acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg kde kipi kwallet lastfm lcms libglvnd libnotify libtirpc mad mng moodbar mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf plasma png policykit postgres ppds qml qt5 readline scanner sdl seccomp semantic-desktop spell split-usr sqlite ssl startup-notification svg tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2020" 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" CPU_FLAGS_X86="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" 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" L10N="en en-US" 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_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" 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, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, 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 Ken Rushia 2022-01-27 02:10:24 UTC
Created attachment 763709 [details]
More examples in this /var/log/portage/elog/summary.log
Comment 2 Larry the Git Cow gentoo-dev 2025-06-04 19:57:14 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=b96d1cd7c30d1bb8eebc47cdd5dda36fcbe10c4e

commit b96d1cd7c30d1bb8eebc47cdd5dda36fcbe10c4e
Author:     Kerin Millar <kfm@plushkava.net>
AuthorDate: 2025-06-04 19:10:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-06-04 19:57:06 +0000

    estrip: reduce the length of the warnings issued by ewarn
    
    Ensure that the horizontal length of all warnings exceeds no more than
    80 characters in length. The fact that 3 characters are lost to ewarn
    has been taken into account.
    
    Reduce the vertical length of a few warnings by having them span no more
    than one line. Consider the following warning as a case in point.
    
     * FEATURES=installsources is enabled but the debugedit binary could not be
     * found. This feature will not work unless debugedit is installed!
    
    This warning has been changed to:
    
     * FEATURES=installsources requires the debugedit binary, which was not found!
    
    I submit that the new message conveys the same information perfectly
    adequately, and that it is neither more difficult to read, nor more
    difficult to fathom. On the contrary, I would say that it renders the
    warning more cogent, especially where multiple warnings are being
    displayed in succession (compounded further by instructing portage to
    install multiple packages in a single pass).
    
    Bug: https://bugs.gentoo.org/832138
    Signed-off-by: Kerin Millar <kfm@plushkava.net>
    Signed-off-by: Sam James <sam@gentoo.org>

 bin/estrip | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=3ad2af53976a71bd1d0c56f226f68479548f3a5e

commit 3ad2af53976a71bd1d0c56f226f68479548f3a5e
Author:     Kerin Millar <kfm@plushkava.net>
AuthorDate: 2025-06-04 17:01:14 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-06-04 19:57:05 +0000

    estrip: obviate a race condition causing duplicate warnings
    
    The estrip utility forks itself so as to achieve a degree of
    parallelism. Unfortunately, it is also predisposed to raising warnings
    deep into the function call stack. Although a given worker process makes
    a point of never issuing the same type of warning more than once, it
    remains unaware of the activities of another. This gives rise to a race
    condition in which ewarn() may be invoked in parallel, causing redundant
    warnings whose lines are unpredictably interleaved.
    
    * FEATURES=installsources is enabled but the debugedit binary could not be
    * FEATURES=installsources is enabled but the debugedit binary could not be
    * found. This feature will not work unless debugedit is installed!
    * found. This feature will not work unless debugedit is installed!
    
    Work around this issue by writing out the warnings to files whose names
    differ only by incorporating the checksum of the warning. In order to
    obviate the race condition, a temporary file is written to, after which
    mv(1) is used to atomically replace the existing file, if any. These
    warnings are later collected and conveyed through the invocation of the
    ewarn() function, just before estrip exits.
    
    By no means do I consider this to be an ideal solution but it is, at
    least, both a coherent and effective one; not to mention that it can
    potentially be improved upon later.
    
    Bug: https://bugs.gentoo.org/832138
    Signed-off-by: Kerin Millar <kfm@plushkava.net>
    Signed-off-by: Sam James <sam@gentoo.org>

 bin/estrip | 46 ++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 40 insertions(+), 6 deletions(-)
Comment 3 kfm 2025-06-05 02:45:10 UTC
Though this bug was filed against estrip, the attachment also shows that "bin/install-qa-check.d/90gcc-warnings" does not de-deduplicate its messages correctly. That should be an easy fix.
Comment 4 Larry the Git Cow gentoo-dev 2025-06-05 03:07:44 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=5a4698360bf370fbacf9553208f359b660ce5a66

commit 5a4698360bf370fbacf9553208f359b660ce5a66
Author:     Kerin Millar <kfm@plushkava.net>
AuthorDate: 2025-06-05 02:59:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-06-05 03:07:41 +0000

    90gcc-warnings: de-deduplicate non-adjacent warnings
    
    Presently, the 90gcc-warnings QA check uses uniq(1) to de-duplicate the
    collected warnings. In doing so, it requires for duplicate lines to be
    adjacent to one another in order to be effective. However, this will not
    necessarily be the case. Instead, use awk(1) to de-duplicate the
    warnings while preserving their original order.
    
    Bug: https://bugs.gentoo.org/832138
    Signed-off-by: Kerin Millar <kfm@plushkava.net>
    Signed-off-by: Sam James <sam@gentoo.org>

 bin/install-qa-check.d/90gcc-warnings | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)