Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 724614 - sys-devel/gdb-9.1 crashes with "sect_index_text not initialized"
Summary: sys-devel/gdb-9.1 crashes with "sect_index_text not initialized"
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceware.org/PR25678
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-23 06:05 UTC by Ervin Peters
Modified: 2020-09-19 18:44 UTC (History)
3 users (show)

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


Attachments
build.log sys-devel/gdb-9.1 (gdb-9.1:20200523-172446.log.bz2,44.83 KB, application/x-bzip)
2020-05-23 17:42 UTC, Ervin Peters
Details
0001-PR-symtab-25678-Set-entry-point-when-text-segment-is.patch (0001-PR-symtab-25678-Set-entry-point-when-text-segment-is.patch,775 bytes, patch)
2020-05-27 08:11 UTC, Sergei Trofimovich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ervin Peters 2020-05-23 06:05:06 UTC
Trying to get google earth up and running, I startet it via gdb and got:

(gdb) file googleearth-bin 
Reading symbols from googleearth-bin...
(No debugging symbols found in googleearth-bin)
(gdb) run
Starting program: /opt/googleearth/googleearth-bin 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Detaching after fork from child process 56877]
[New Thread 0x7fffe87a3700 (LWP 56878)]
[New Thread 0x7fffe781c700 (LWP 56879)]
/var/tmp/portage/sys-devel/gdb-9.1/work/gdb-9.1/gdb/symfile.c:886: internal-error: sect_index_text not initialized



Reproducible: Always

Steps to Reproduce:
1. start gdb
2. run something big without a .text section and >2 Sepments (see upstream bug) or googleearth-bin
3. 
Actual Results:  
crash

Expected Results:  
be able to debug

Upstream I found related to this issue:

https://sourceware.org/bugzilla/show_bug.cgi?id=25678

which leads to an explanation and offers something to patch.
Comment 1 Ervin Peters 2020-05-23 06:07:09 UTC
peters@muli /opt/googleearth $ emerge --info gdb
Portage 2.3.99 (python 3.7.7-final-0, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-9.3.0, glibc-2.30-r8, 5.4.38-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.4.38-gentoo-x86_64-Intel-R-_Core-TM-_i5-6600K_CPU_@_3.50GHz-with-gentoo-2.6
KiB Mem:    16287520 total,   8082048 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Sat, 23 May 2020 04:45:01 +0000
Head commit of repository gentoo: e39ae99eb0fae30e6014a2804a089e20b41baccd
sh bash 5.0_p17
ld GNU ld (Gentoo 2.33.1 p2) 2.33.1
app-shells/bash:          5.0_p17::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.18::gentoo, 3.6.10-r2::gentoo, 3.7.7-r2::gentoo, 3.8.2-r2::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.33.1-r1::gentoo
sys-devel/gcc:            9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r8::gentoo
Repositories:

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

dotnet
    location: /var/lib/layman/dotnet
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://woodstok.ervnet.xl/gentoo-portage
    priority: 500
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

muli
    location: /usr/local/portage
    masters: gentoo
    priority: 1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=skylake -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=skylake -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
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 -O3 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs collision-protect 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 sign split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=skylake -O3 -pipe"
GENTOO_MIRRORS="ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo http://www.ibiblio.org/pub/Linux/distributions/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0"
LINGUAS="de en en_GB ru"
MAKEOPTS="-j4"
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"
USE="3d 3ds 64bit X Xaw3d a52 aac ace acl acpi addns aften aim alsa amd64 amr animgif apache2 apng applet archive asf aspell assistant audio auto-completion bash-completion bdf berkdb bluetooth branding broadway btrfs builder bzip2 cairo cblas-external cdda cdparanoia cdr charset chm cjk cli collada colord context contrib corefonts crypt css cups curl darcs dbi dbus devhelp dia djvu dmx doc dri dri3 drm dts dv dvd dvdnav dvdr dvi dynamicplugin eds emboss emf enca encode equalizer escreen evo examples exif extensions extra extras fastcgi fat fbcon ffmpeg flac flash fontconfig fontforge fonts foomaticdb fortran fping ftp fuse gcj gd gdbm geoip geolocation georeferencer geos gif gimp git glade gles gles1 gnome gnome-keyring gnome-online-accounts gnome-shell gpac gphoto2 gpm gps graphics graphviz grass grub gstreamer gtk gtk-doc gtk3 gui gzip hdri hfs highlight html humanities hwaccel ibam icons iconv icq icu ide ieee1394 imagemagick imap infinality inkjar inotify inspector introspection ios ipv6 irc ithreads jadetex java javascript jbig joystick jpeg jpeg2k kerberos kpathsea lame lasi latex lcms ldap libnotify libsecret libssh2 libtirpc libwww live lm_sensors logrotate lqr lto lua luatex lzo mad mapnik mapserver mdb mdnsresponder-compat menuorg mercurial metric midi mikmod mime minizip mjpeg mms mng mod mozdom mp3 mp4 mpeg mpi mplayer msn mssql mtp multilib music mysql mysqli nautilus ncurses network network-cron networkmanager nfs nfsv4 nls nntp nocd nptl nsplugin ntfs ntfsprogs ntlm odk offensive ofx ogg ogm openexr opengl openmp openvg oscar osdmenu pam pango pcf pch pcre pdf perl pgf pixmaps plotutils plugins png pnm polar policykit posix postgres postscript ppds psf pstricks publishers pulseaudio qt5 rar raw rdp readline regex register2 reiserfs romio samba sasl scanner science screen scripts sdl seccomp sensord server sftp shorten simplexml sip slp smartcard smp snmp soap sockets sound soup source sourceview speex spell split-usr sql sqlite sqlite3 ssl startup-notification stream subtitles subversion svg sylpheed syslog systemd szip tcpd templates tex tex4ht tga theora thesaurus threads thumbnail thunderbird tidy tiff timidity tinfo tk tools tracker transcode truetype udev udisks unicode unzip upower usb utils uxa v4l vaapi valgrind vcd vdpau vdr vhosts visio vorbis wav webchannel webkit winbind wineappdb wma wmf wxwidgets x264 xattr xcb xcf xcomposite xetex xface xfs xft xml xmlrpc xorgmodule xpm xscreensaver xslt xterm xv xvid xvmc yaepg yahoo youtube ytnef zip zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="HDA-INTEL" APACHE2_MODULES="modules_unixd actions access_compat alias auth_basic auth_digest authn_anon authn_core authn_dbd authn_dbm authn_file authz_core authz_dbm authz_dbd authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif slotmem_shm so socache_shmcb speling status unique_id userdir usertrack vhost_alias asis cgi cgid" APACHE2_MPMS="worker" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="evdev joystick libinput" KERNEL="linux" L10N="de en en-GB ru zh-CN" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" QEMU_SOFTMMU_TARGETS="aarch64 armel i386 mips64el mipsel x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="intel i965" 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, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-devel/gdb-9.1::gentoo was built with the following:
USE="client nls python server xml -lzma -multitarget -source-highlight -test -vanilla -xxhash" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_7 -python3_6 -python3_8"
FEATURES="preserve-libs pid-sandbox sign ebuild-locks unmerge-logs distlocks binpkg-dostrip userfetch fixlafiles split-log unknown-features-warn ipc-sandbox xattr config-protect-if-modified sfperms merge-sync network-sandbox usersandbox news unmerge-orphans parallel-fetch binpkg-logs qa-unresolved-soname-deps collision-protect protect-owned sandbox assume-digests usersync split-elog multilib-strict binpkg-docompress userpriv strict"
Comment 2 Jonas Stein gentoo-dev 2020-05-23 11:38:58 UTC
Thank you for the report. We need to have all information at hand before ticket assignment. Sometimes we see precursors in the compiler warnings. That is why I ask you to 
* attach the logs 
as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket

Please attach a small example file which leads to a crash.
Please reopen this ticket (Status:UNCONFIRMED) afterwards.
Comment 3 Ervin Peters 2020-05-23 17:42:59 UTC
Created attachment 641228 [details]
build.log sys-devel/gdb-9.1

Rebuild build.log attached.

btw: The crash doesn't disappear if I reduce from -o3 to -o2
Comment 4 Sergei Trofimovich gentoo-dev 2020-05-27 08:11:59 UTC
Created attachment 642002 [details, diff]
0001-PR-symtab-25678-Set-entry-point-when-text-segment-is.patch

Try 0001-PR-symtab-25678-Set-entry-point-when-text-segment-is.patch. You can drop it to /etc/portage/patches/sys-devel/gdb/ and rebuild gdb to see if it helps.
Comment 5 Ervin Peters 2020-06-01 08:55:17 UTC
(In reply to Sergei Trofimovich from comment #4)
> 0001-PR-symtab-25678-Set-entry-point-when-text-segment-is.patch
> drop it to /etc/portage/patches/sys-devel/gdb/ 

This patch seems to fix that error.

Since this is a user patch, I leave the bug open.
Comment 6 Sergei Trofimovich gentoo-dev 2020-06-04 18:33:01 UTC
I would prefer pulling this patch after upstream does.