Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emerge grep diffutils segfaults at conftest in libc-2.33.so
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
phptrix
n00b
n00b


Joined: 22 Sep 2021
Posts: 1

PostPosted: Wed Sep 22, 2021 10:51 am    Post subject: Emerge grep diffutils segfaults at conftest in libc-2.33.so Reply with quote

Hello,

i just installed a fresh gentoo x86_64. The system works ok but during "emerge grep diffutils" syslog shows a segfault error 4 in libc-2.33.so:

Code:
Sep 22 12:00:53 xenthera kernel: conftest[8124]: segfault at 0 ip 00007ff5efc96441 sp 00007ffd4046e438 error 4 in libc-2.33.so[7ff5efb60000+143000]
Sep 22 12:00:53 xenthera kernel: Code: 48 29 f9 83 f9 3f 76 73 48 89 d1 f3 a4 c3 80 fa 10 73 17 80 fa 08 73 27 80 fa 04 73 33 80 fa 01 77 3b 72 05 0f b6 0e 88 0f c3 <c5> fa 6f 06 c5 fa 6f 4c 16 f0 c5 fa 7f 07 c5 fa 7f 4c 17 f0 c3 48

...
Code:
Sep 22 12:12:10 xenthera kernel: conftest[18156]: segfault at 987742c0 ip 00007efc8727191a sp 00007ffdf4161d78 error 4 in libc-2.33.so[7efc87143000+143000]
Sep 22 12:12:10 xenthera kernel: Code: 80 7e 10 00 0f 84 f9 fe ff ff e9 11 2d f5 ff 90 89 f8 31 d2 c5 c1 ef ff 09 f0 25 ff 0f 00 00 3d 80 0f 00 00 0f 8f 56 03 00 00 <c5> fe 6f 0f c5 f5 74 06 c5 fd da c1 c5 fd 74 c7 c5 fd d7 c8 85 c9


This errors appears each time I emerge either grep or diffutils or app-misc/screen (probably some other packages as well). Strange enough the programs work just fine and
emerge shows no errors, just the segfaults in syslog.

Code:
Portage 3.0.20 (python 3.9.6-final-0, default/linux/amd64/17.1, gcc-10.3.0, glibc-2.33-r1, 5.10.61-gentoo-x86_64 x86_64)
System uname: Linux-5.10.61-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i9-10850K_CPU_@_3.60GHz-with-glibc2.33


[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Wed Sep 22, 2021 3:21 pm    Post subject: Reply with quote

conftest runs during prebuild and the build will compensate for the error so most of the time it will just finish fine.

You may had a badly compiled libc. How this happened is up to the usual suspects. Full configure/build log of the package that triggered the failure may provide some clues, it may even be "normal"...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Fri Sep 24, 2021 11:11 am    Post subject: Reply with quote

can you provide the output of emerge --info?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
miljos
n00b
n00b


Joined: 25 Sep 2021
Posts: 3

PostPosted: Sat Sep 25, 2021 6:18 pm    Post subject: Reply with quote

hello i'm new gentoo user and recompile whole stage3-amd64-systemd-20210919T170549Z.tar.xz with following commands and got same segfaults but also in diffutils-3.8/conftest all other packages are fine.
This happen everytime i recompile one of the two.

Code:
emerge --ask --emptytree --usepkg=n @system
emerge --ask --emptytree --usepkg=n @world


Code:

Sep 25 14:53:28 gentoo audit[2479446]: ANOM_ABEND auid=1000 uid=250 gid=250 ses=2 subj==unconfined pid=2479446 comm="conftest" exe="/var/cache/portage/portage/sys-apps/groff-1.22.4/work/groff-1.22.4/conftest" sig=6 res=1
Sep 25 14:53:56 gentoo audit[2525763]: ANOM_ABEND auid=1000 uid=250 gid=250 ses=2 subj==unconfined pid=2525763 comm="conftest" exe="/var/cache/portage/portage/sys-apps/diffutils-3.8/work/diffutils-3.8/conftest" sig=11 res=1
Sep 25 14:53:56 gentoo kernel: conftest[2525763]: segfault at 0 ip 000074e5115d5b91 sp 00007ffe9a93b5c8 error 4 in libc-2.33.so[74e51149b000+148000]
Sep 25 14:53:56 gentoo kernel: Code: 48 29 f9 83 f9 3f 76 73 48 89 d1 f3 a4 c3 80 fa 10 73 17 80 fa 08 73 27 80 fa 04 73 33 80 fa 01 77 3b 72 05 0f b6 0e 88 0f c3 <c5> fa 6f 06 c5 fa 6f 4c 16 f0 c5 fa 7f 07 c5 fa 7f 4c 17 f0 c3 48


emerge --info

Code:

Portage 3.0.20 (python 3.9.6-final-0, default/linux/amd64/17.1/systemd, gcc-10.3.0, glibc-2.33-r1, 5.10.0-8-amd64 x86_64)
=================================================================
System uname: Linux-5.10.0-8-amd64-x86_64-AMD_Ryzen_7_3700X_8-Core_Processor-with-glibc2.33
KiB Mem:    32889724 total,   5571228 free
KiB Swap:     999420 total,    999164 free
Timestamp of repository gentoo: Fri, 24 Sep 2021 08:15:01 +0000
Head commit of repository gentoo: e69b9d450efba72de074989d38bd8ead78fa4081
sh bash 5.1_p8
ld GNU ld (Gentoo 2.36.1 p5) 2.36.1
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0-r2::gentoo
dev-lang/python:          3.9.6_p2::gentoo
dev-util/cmake:           3.20.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.4::gentoo
sys-devel/binutils:       2.36.1-r2::gentoo, 2.37_p1::gentoo
sys-devel/gcc:            10.3.0-r2::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.14::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r1::gentoo
Repositories:

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=znver2 -O2 -pipe -fstack-protector-strong"
CHOST="x86_64-pc-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="-march=znver2 -O2 -pipe -fstack-protector-strong"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--ask --jobs=8 --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=znver2 -O2 -pipe -fstack-protector-strong"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs 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="-march=znver2 -O2 -pipe -fstack-protector-strong"
GENTOO_MIRRORS="http://localmirror/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12"
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/cache/portage"
USE="acl amd64 audit bzip2 cli crypt dri fido2 filecaps fortran gdbm iconv libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl systemd tcpd udev unicode xattr zlib" ABI_X86="64" ADA_TARGET="gnat_2019" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="mmx mmxext sse sse2" 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-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS


sys-apps\:diffutils-3.8\:20210925-165646.log
https://pastebin.com/raw/F0Zvbv3u

sys-apps\:groff-1.22.4\:20210925-165646.log
https://pastebin.com/raw/6wFFUSUm
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Sat Sep 25, 2021 8:48 pm    Post subject: Reply with quote

hmm...cannot reproduce. Though the usual suspects is to blame funny CFLAGS which should be checked first, but likely glibc needs to be rebuilt along with the afflicted packages.

think need more detailed log... the configure.log which isn't saved when the build succeeds...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
miljos
n00b
n00b


Joined: 25 Sep 2021
Posts: 3

PostPosted: Sat Sep 25, 2021 8:56 pm    Post subject: Reply with quote

interesting i just simple recompile glibc alone and then groff again and the segfault is gone.

only audit message is there.
nothing changec except glibc recompile then groff.

i diff both groff logs but can't see any real differences.

groff-1.22.4 without segfault log after glibc recompile
https://pastebin.com/raw/6wFFUSUm


but diffutils segfault still there.

maybe "--jobs=8 --load-average=8" isn't a good idea if compile whole world/system?
Back to top
View user's profile Send private message
miljos
n00b
n00b


Joined: 25 Sep 2021
Posts: 3

PostPosted: Sat Sep 25, 2021 9:11 pm    Post subject: Reply with quote

eccerr0r wrote:
hmm...cannot reproduce. Though the usual suspects is to blame funny CFLAGS which should be checked first, but likely glibc needs to be rebuilt along with the afflicted packages.

think need more detailed log... the configure.log which isn't saved when the build succeeds...


okay i test glibc without "-fstack-protector-strong" and diffutils the segfault is gone!

diffutils with fstack-protector-strong works but glibc don't like it.

i though fstack-protector-strong is very common?

i would be very intersting if same solve the problem for phptrix


//edit
the glibc ebuild contain filter-flags '-fstack-protector*' my setting in make.conf don't work right?

this make the problem more complicated because sometimes it works sometimes not and has nothing to do with i setup COMMON_FLAGS="-fstack-protector-strong" or not.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5909

PostPosted: Sat Oct 02, 2021 11:07 am    Post subject: Reply with quote

look into the build log of glibc, see if the flag is there
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum