Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 645774 - sys-kernel/gentoo-sources-4.9.78 - /bin/sh: line 1: 23989 Segmentation fault ./tools/objtool/objtool check "fs/ext4/extents_status.o" make[2]: *** [scripts/Makefile.build:294: fs/ext4/extents_status.o] Error 139
Summary: sys-kernel/gentoo-sources-4.9.78 - /bin/sh: line 1: 23989 Segmentation fault ...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-26 02:05 UTC by Corbin
Modified: 2018-07-24 18:55 UTC (History)
0 users

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


Attachments
logs_and_info_sorted.zip (logs_and_info_sorted.zip,103.14 KB, application/zip)
2018-01-26 02:05 UTC, Corbin
Details
kernel 4.9.79 logs and info (kernel 4.9.79 logs and info.zip,104.96 KB, application/zip)
2018-02-02 15:29 UTC, Corbin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Corbin 2018-01-26 02:05:52 UTC
Created attachment 516740 [details]
logs_and_info_sorted.zip

Package :
sys-kernel/gentoo-sources-4.9.78:4.9.78::gentoo  USE="experimental symlink -build

emerge --info
Portage 2.3.19 (python 3.5.4-final-0, default/linux/amd64/17.0/desktop, gcc-6.4.0, glibc-2.25-r9, 4.9.78-gentoo-AMD-FX9590 x86_64)
=================================================================
System uname: Linux-4.9.78-gentoo-AMD-FX9590-x86_64-AMD_FX-tm-9590_Eight-Core_Processor-with-gentoo-2.4.1
KiB Mem:    32922680 total,  30686940 free
KiB Swap:   32767996 total,  32767996 free
Timestamp of repository gentoo: Thu, 25 Jan 2018 00:45:01 +0000
Head commit of repository gentoo: 7d49cff47ebb1ce75290b99982310e7e935b3831
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.3::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.9::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 

testing
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=bdver2 -O2 -pipe --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=2048 -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/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=bdver2 -O2 -pipe --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=2048 -fstack-protector-strong"
DISTDIR="/usr/portage/distfiles/"
FCFLAGS="-march=bdver2 -O2 -pipe --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=2048 -fstack-protector-strong"
FEATURES="assume-digests binpkg-logs cgroup clean-logs compress-build-logs compress-index compressdebug config-protect-if-modified distlocks downgrade-backup ebuild-locks fail-clean fixlafiles ipc-sandbox merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog split-log splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=bdver2 -O2 -pipe --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=2048 -fstack-protector-strong"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US"
MAKEOPTS="-j9"
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/"
USE="X a52 aac aalib acl acpi alsa amd64 audiofile audit bash-completion berkdb branding bzip2 cairo caps cdda cddb cdparanoia cdr cli colord cracklib crypt cups cvs cxx dbm dbus dga dri dts dvd dvdr emboss encode enscript evdev exif expat fam fbcon ffmpeg flac flatfile fontconfig foomaticdb fortran ftp gdbm geoip gif glamor gmp gnome-keyring gnutls gpm graphicsmagick graphviz gsl gtk gzip hardened iconv icu idn imap introspection ipv6 jbig jpeg jpeg2k lame lcms libass libcaca libcanberra libffi libnotify libsamplerate lzma lzo mad matroska mime mng modplug modules mp3 mp4 mpeg mplayer multilib musepack musicbrainz ncurses nls nptl nsplugin offensive ogg openal opengl openmp pam pango pcntl pcre pdf pie png posix ppds qt3support qt5 readline recode sdl seccomp session sharedmem smp sndfile sockets sound sox spell sqlite ssl startup-notification static-libs svg symlink syslog sysvipc taglib tcl tcpd theora threads tidy tiff tk truetype udev unicode usb vdpau vorbis wavpack wayland webp wmf wxwidgets x264 xattr xcb xcomposite xface xft xinerama xml xmp xpm xscreensaver xv xvid zlib" ABI_X86="64 32" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2 sse4a fma fma4 avx clfush fxsr nx pclmul cx16 popcnt aes xsave f16c abm ibs lwp sahf xop tce pat tbm bmi1 mtrr" ELIBC="glibc" GRUB_PLATFORMS="pc multiboot" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="US" OFFICE_IMPLEMENTATION="libreoffice" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" USERLAND="GNU" VIDEO_CARDS="amdgpu i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Error :
  CC      fs/ext4/migrate.o
  CC      fs/ext4/mballoc.o
  CC      fs/ext4/block_validity.o
  CC      fs/ext4/move_extent.o
  CC      fs/ext4/mmp.o
  CC      fs/ext4/indirect.o
  CC      fs/ext4/extents_status.o
/bin/sh: line 1: 23989 Segmentation fault      ./tools/objtool/objtool check "fs/ext4/extents_status.o"
make[2]: *** [scripts/Makefile.build:294: fs/ext4/extents_status.o] Error 139
make[1]: *** [scripts/Makefile.build:544: fs/ext4] Error 2
make: *** [Makefile:995: fs] Error 2

Triggered by selecting CPU = AMD Piledriver
Fixed by selecting CPU = K-8 or Generic x86_64

Attached zip file has included :
.config ( both builds )
gcc build output ( both builds )
list of versions / USE flags of tool chain used.
dmesg
lspci -k output
cat /proc/cpuinfo
Comment 1 Corbin 2018-02-02 15:29:44 UTC
Created attachment 517556 [details]
kernel 4.9.79 logs and info
Comment 2 nobody 2018-02-02 17:37:21 UTC
If you use ld-gold switch back to ld-bfd
But i'm sure the kind of work objtool "seems to try doing" will hit many users with reptoline or other tweak in the code itself that make objtool miserably failing.

If you seek infos, you can read https://forums.gentoo.org/viewtopic-t-1075862.html which is for now, only a thread that tells you to use ld-fdb and that objtool is, well, not that stable.
But i hope the thread will be update with good infos you could use for yourself, when they'll be out.
Comment 3 callmewhatyoulike 2018-02-04 20:32:40 UTC
I'm just an end-user but I can confirm this. Starting from 4.14.14 until 4.15.1 (today) I got a big heap of objtool errors until it eventually segfaults. Everything worked fine so far (until and incl. 4.14.13). (AMD FX machine, possibly also others, didn't try them yet)
I can provide additional info if needed. I did not yet try to switch things in the kernel config.
Comment 4 Corbin 2018-02-04 21:09:33 UTC
(In reply to callmewhatyoulike from comment #3)
> I'm just an end-user but I can confirm this. Starting from 4.14.14 until
> 4.15.1 (today) I got a big heap of objtool errors until it eventually
> segfaults. Everything worked fine so far (until and incl. 4.14.13). (AMD FX
> machine, possibly also others, didn't try them yet)
> I can provide additional info if needed. I did not yet try to switch things
> in the kernel config.

Follow this link :
https://forums.gentoo.org/viewtopic-t-1075862.html

Its a workaround until the patches are ?correct? / ?complete?.
Comment 5 Mike Pagano gentoo-dev 2018-07-23 23:02:45 UTC
Have you upgraded to gcc 7.3, yet?  If so, do you experience this with gcc 7.3.X ?
Comment 6 Corbin 2018-07-24 18:55:58 UTC
(In reply to Mike Pagano from comment #5)
> Have you upgraded to gcc 7.3, yet?  If so, do you experience this with gcc
> 7.3.X ?

Unfortunately yes.

Using sys-devel/gcc-7.3.0-r3, kernel(s) 4.9.x && 4.14.x

In kernels 4.9.x, killing 'metadata' got rid of the errors.
[ ] Compile-time stack metadata validation 

In kernels 4.14.x 'retpolines' requires the use of 'metadata'.
[*] Avoid speculative indirect branches in kernel
-*- Compile-time stack metadata validation

The only way to get the kernel to compile with 4.14.x && retpolines is to set the CPU to 'Generic x86_64'.

If I remove 'retpolines && metadata', then set the CPU to AMD Piledriver, it compiles.