Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678812 - =sys-devel/gcc-8.2.0-r6 - kernel: traps: hlds_linux[6596] general protection ip:f7c825ba sp:ffbe8afc error:0 in libc-2.27.so
Summary: =sys-devel/gcc-8.2.0-r6 - kernel: traps: hlds_linux[6596] general protection ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-26 09:19 UTC by am1
Modified: 2019-05-08 12:41 UTC (History)
2 users (show)

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


Attachments
rehlds hlds_linux file (hlds_linux,64.79 KB, application/x-executable)
2019-02-26 17:23 UTC, am1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description am1 2019-02-26 09:19:23 UTC
After migrating from gcc-7.3.0-r3 to gcc-8.2.0-r6 and rebuilding libtool, @system and @world, my 3rd-party service can't be launched anymore.

Feb 24 20:41:14 localhost kernel: traps: hlds_linux[6596] general protection ip:f7c825ba sp:ffbe8afc error:0 in libc-2.27.so[f7bcb000+1de000]

Tried using sandbox-2.15 by unmasking (thread https://forums.gentoo.org/viewtopic-t-1090722-start-0.html) doesn't fix this issue with "general protection" at all.

Reverting changes back to gcc-7.3.0-r3 and rebuilding just libtool fix this problem, so this might be gcc related instead of sandbox?

Portage 2.3.51 (python 3.6.5-final-0, default/linux/amd64/17.1, gcc-7.3.0, glibc-2.27-r6, 4.14.83-gentoo x86_64)
=================================================================
System uname: Linux-4.14.83-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700_CPU_@_3.40GHz-with-gentoo-2.6
KiB Mem:    65647136 total,  19155900 free
KiB Swap:    4194296 total,   4194296 free
Timestamp of repository gentoo: Mon, 25 Feb 2019 20:15:01 +0000
Head commit of repository gentoo: a14d1f6bbf4700f6d40c06abaf01308928ddfd5c
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.15::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo, 8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://mirror.hetzner.de/gentoo/portage
priority: -1000
sync-rsync-verify-max-age: 24
sync-rsync-verify-jobs: 1
sync-rsync-extra-opts:
sync-rsync-verify-metamanifest: no
local
location: /usr/local/portage
masters: gentoo
priority: 0
Installed sets: @nginx-lua-mysql, @nginx-minify
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=skylake -O2 -pipe"
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/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=skylake -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 9 --load-average 7.2"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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=skylake -O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-march=skylake -O2 -pipe"
GENTOO_MIRRORS="http://mirror.hetzner.de/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTf-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US"
MAKEOPTS="-j9"
PKGDIR="/usr/local/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="acl amd64 bzip2 cli crypt cxx dnotify dri fortran gdbm glib iconv icu inotify ipv6 libnotify libtirpc multilib ncurses nptl openmp pam pcre readline seccomp ssl tcpd threads unicode xattr zlib" ABI_X86="64" 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="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="dummy" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" NGINX_MODULES_HTTP="access addition auth_basic auth_pam autoindex browser cache_purge charset degradation echo empty_gif fancyindex fastcgi geo geoip gzip gzip_static headers_more image_filter limit_conn limit_req lua map memcached perl proxy realip referer rewrite split_clients ssi sub upstream_ip_hash upstream_check upstream_hash upstream_ip_hash upstream_keepalive upstream_least_conn upstream_zone userid uwsgi" NGINX_MODULES_STREAM="access limit_conn" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="dummy" 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, INSTALL_MASK, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Tomáš Mózes 2019-02-26 11:24:33 UTC
Can you please provide more information on your 3rd-paty service? Doing a quick hlds_linux search gives me https://github.com/ValveSoftware/halflife, is that the case? 

Ideally how to reproduce so we can test on some other machine that works fine.
Comment 2 am1 2019-02-26 17:23:27 UTC
Created attachment 566600 [details]
rehlds hlds_linux file
Comment 3 am1 2019-02-26 17:29:34 UTC
Sure i will, but need some help, because it's the first time i filled a bug report here and i'm really nooby with this.

I attached the affected file but i'm not 100% sure it's the file itself than a depency behind.

You're right about, that hlds_linux is Valve Halflife 1 (Counter-Strike 1.6 Dedicated Server), but we're not using the old outdated sources. Some developers redeveloped this under the pseudonym "ReHLDS" - https://github.com/dreamstalker/rehlds

The package we're using you can find here http://nexus.rehlds.org/nexus/content/repositories/rehlds-dev/rehlds/rehlds/3.4.0.668-dev/ but this may not work at all, because some other files are missing as well. Not that easy to provide a working setup to test on other machines.

I can test things but need some briefing how to do, especially debugging!?
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-26 21:29:52 UTC
Thank you for the bug report!

> Tried using sandbox-2.15 by unmasking (thread https://forums.gentoo.org/viewtopic-t-1090722-start-0.html) doesn't fix this issue with "general protection" at all.

I think it's an unrelated bug. It caused gcc itself (or ld) to crash under sandbox. You have an external binary crash running outside sandbox.

Is it enough for you to start a binary to make it crash? Or you also need to connect clients to it?

Can you also provide a backtrace of the crash as described in https://wiki.gentoo.org/wiki/Debugging ?
You will need to build glibc (and perhaps libtool and other deps) with debugging enabled, enable core dumps and run core dump against 'gdb your-binary core.file'. It's OK if your binary has no symbols.
Comment 5 am1 2019-05-08 12:41:41 UTC
@Sergei Trofimovich

Sorry for the delay, but i wasn't able to reproduce via backtracing, because there are a huge plugins involved.

Anyway, this seems fixed with the release of =sys-devel/gcc-8.3.0-r1!

So we can close this bugreport without any further actions.

Thanks!