Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 784923

Summary: sys-libs/glibc-2.36-r6 installs pre-stripped files (false positive, see bug 793770)
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED OBSOLETE    
Severity: normal CC: fturco, gentoo, gentoo, pacho
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=830213
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 793770    
Bug Blocks:    
Attachments: build.log.xz

Description Agostino Sarubbo gentoo-dev 2021-04-22 06:35:20 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sys-libs/glibc-2.33 installs pre-stripped files.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2021-04-22 06:35:25 UTC
Created attachment 701583 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2021-04-22 07:44:08 UTC
Happens here as well.

"""
 * QA Notice: Pre-stripped files found:
 * /usr/lib64/crtn.o
 * /usr/lib/crtn.o
"""

Not immediately clear why, but these are .o files. Not .so files. Probably our stripping detection fails at them.

Pre-strip detection happens at bin/estrip site around scanelf calls: https://gitweb.gentoo.org/proj/portage.git/tree/bin/estrip#n329

Might be binutils-2.36 related.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-01 22:05:52 UTC
Confirmed it's a portage's false positive and is triggered by binutils-2.36. The whole file has no symbols:

$ cat ../sysdeps/x86_64/crtn.S

        .section .init,"ax",@progbits
        addq $8, %rsp
        ret

        .section .fini,"ax",@progbits
        addq $8, %rsp
        ret

Executable reproducer:

$ x86_64-pc-linux-gnu-gcc -O2 -Wl,--defsym=__gentoo_check_ldflags__=0 ../sysdeps/x86_64/crtn.S -c -o crtn-2.36.o # -B/usr/x86_64-pc-linux-gnu/binutils-bin/2.35.2/
$ x86_64-pc-linux-gnu-gcc -O2 -Wl,--defsym=__gentoo_check_ldflags__=0 ../sysdeps/x86_64/crtn.S -c -o crtn-2.35.o   -B/usr/x86_64-pc-linux-gnu/binutils-bin/2.35.2/

$ scanelf -yqRBF '#k%F' -k '!.symtab' crtn-2.35.o crtn-2.36.o
crtn-2.36.o

$ diff -U0 <(h readelf -W -S crtn-2.35.o) <(h readelf -W -S crtn-2.36.o)
--- /dev/fd/63  2021-06-01 22:59:09.056572177 +0100
+++ /dev/fd/62  2021-06-01 22:59:09.056572177 +0100
@@ -1 +1 @@
-There are 9 section headers, starting at offset 0x120:
+There are 8 section headers, starting at offset 0xc0:
@@ -11,3 +11,2 @@
-  [ 6] .symtab           SYMTAB          0000000000000000 000050 000090 18      7   6  8
-  [ 7] .strtab           STRTAB          0000000000000000 0000e0 000001 00      0   0  1
-  [ 8] .shstrtab         STRTAB          0000000000000000 0000e1 000038 00      0   0  1
+  [ 6] .note.gnu.property NOTE            0000000000000000 000050 000030 00   A  0   0  8
+  [ 7] .shstrtab         STRTAB          0000000000000000 000080 00003b 00      0   0  1

Let's peek at 2.35's symtab:

$ readelf -W --symbols crtn-2.35.o

Symbol table '.symtab' contains 6 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 0000000000000000     0 SECTION LOCAL  DEFAULT    1
     2: 0000000000000000     0 SECTION LOCAL  DEFAULT    2
     3: 0000000000000000     0 SECTION LOCAL  DEFAULT    3
     4: 0000000000000000     0 SECTION LOCAL  DEFAULT    4
     5: 0000000000000000     0 SECTION LOCAL  DEFAULT    5

$ readelf -W --symbols crtn-2.36.o
<empty>

None of symbols look useful. I think it's reasonable to expect that for simple files .symtab might be absent.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-01 22:12:17 UTC
Filed bug #784923 against portage.
Comment 5 Agostino Sarubbo gentoo-dev 2021-09-26 07:38:36 UTC
ci has reproduced this issue with version 2.33-r7 - Updating summary.
Comment 6 Agostino Sarubbo gentoo-dev 2021-11-13 22:50:08 UTC
ci has reproduced this issue with version 2.34-r1 - Updating summary.
Comment 7 Agostino Sarubbo gentoo-dev 2021-11-15 08:49:41 UTC
ci has reproduced this issue with version 2.34-r2 - Updating summary.
Comment 8 Agostino Sarubbo gentoo-dev 2021-11-29 10:48:14 UTC
ci has reproduced this issue with version 2.34-r3 - Updating summary.
Comment 9 Agostino Sarubbo gentoo-dev 2021-12-19 22:04:41 UTC
ci has reproduced this issue with version 2.34-r4 - Updating summary.
Comment 10 Agostino Sarubbo gentoo-dev 2022-01-13 07:55:35 UTC
ci has reproduced this issue with version 2.34-r6 - Updating summary.
Comment 11 Agostino Sarubbo gentoo-dev 2022-01-25 21:11:18 UTC
ci has reproduced this issue with version 2.34-r7 - Updating summary.
Comment 12 Agostino Sarubbo gentoo-dev 2022-02-06 08:05:52 UTC
ci has reproduced this issue with version 2.35 - Updating summary.
Comment 13 Agostino Sarubbo gentoo-dev 2022-03-28 06:46:23 UTC
ci has reproduced this issue with version 2.35-r1 - Updating summary.
Comment 14 Agostino Sarubbo gentoo-dev 2022-04-01 06:40:04 UTC
ci has reproduced this issue with version 2.35-r2 - Updating summary.
Comment 15 Agostino Sarubbo gentoo-dev 2022-04-22 15:02:50 UTC
ci has reproduced this issue with version 2.35-r3 - Updating summary.
Comment 16 Agostino Sarubbo gentoo-dev 2022-04-25 05:54:26 UTC
ci has reproduced this issue with version 2.35-r4 - Updating summary.
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-25 16:04:19 UTC
*** Bug 840806 has been marked as a duplicate of this bug. ***
Comment 18 Agostino Sarubbo gentoo-dev 2022-05-18 10:10:40 UTC
ci has reproduced this issue with version 2.35-r5 - Updating summary.
Comment 19 Agostino Sarubbo gentoo-dev 2022-06-07 06:19:34 UTC
ci has reproduced this issue with version 2.35-r7 - Updating summary.
Comment 20 Agostino Sarubbo gentoo-dev 2022-07-06 05:49:45 UTC
ci has reproduced this issue with version 2.35-r8 - Updating summary.
Comment 21 Agostino Sarubbo gentoo-dev 2022-09-19 06:38:46 UTC
ci has reproduced this issue with version 2.35-r10 - Updating summary.
Comment 22 Agostino Sarubbo gentoo-dev 2022-09-22 09:19:36 UTC
ci has reproduced this issue with version 2.36-r3 - Updating summary.
Comment 23 Agostino Sarubbo gentoo-dev 2022-10-02 19:08:11 UTC
ci has reproduced this issue with version 2.36-r4 - Updating summary.
Comment 24 Agostino Sarubbo gentoo-dev 2022-10-16 12:44:14 UTC
ci has reproduced this issue with version 2.36-r5 - Updating summary.
Comment 25 Agostino Sarubbo gentoo-dev 2022-11-27 18:47:23 UTC
ci has reproduced this issue with version 2.36-r6 - Updating summary.
Comment 26 Andreas K. Hüttel archtester gentoo-dev 2023-05-08 21:48:16 UTC
Looks like this disappeared.