Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 608614 - sys-devel/gdb-7.12.1: assertion failure(s) with follow-fork-mode child
Summary: sys-devel/gdb-7.12.1: assertion failure(s) with follow-fork-mode child
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://sourceware.org/bugzilla/show_...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-08 10:12 UTC by Mateusz Lenik
Modified: 2017-02-09 18:48 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Lenik 2017-02-08 10:12:58 UTC
GDB assertions fail when debugging with follow-fork-mode=child, when I continue the debugging session, GDB will report other assertions failing.
emerge --info and eselect ruby list output below.

Steps to reproduce:

$ emerge ruby rake gdb
$ touch Rakefile # needs to exist
$ gdb --args ruby -S rake -T
GNU gdb (Gentoo 7.12.1 vanilla) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ruby...Reading symbols from /usr/lib64/debug//usr/bin/ruby23.debug...done.
done.
(gdb) set follow-fork-mode child
(gdb) r
Starting program: /usr/bin/ruby -S rake -T
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff7ff6700 (LWP 26921)]
[New process 26922]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
./nat/x86-linux-dregs.c:146: internal-error: void x86_linux_update_debug_registers(lwp_info*): Assertion `lwp_is_stopped (lwp)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y

This is a bug, please report it.  For instructions, see:
<https://bugs.gentoo.org/>.

./nat/x86-linux-dregs.c:146: internal-error: void x86_linux_update_debug_registers(lwp_info*): Assertion `lwp_is_stopped (lwp)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n


$ eselect ruby list
Available Ruby profiles:
  [1]   ruby21 (with Rubygems)
  [2]   ruby23 (with Rubygems) *
  [3]   ruby24 (with Rubygems)
$ emerge --info ruby rake gdb
Portage 2.3.3 (python 3.4.5-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.23-r3, 4.9.7-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-6600U_CPU_@_2.60GHz-with-gentoo-2.3
KiB Mem:    16340588 total,   5849372 free
KiB Swap:   33554428 total,  33546876 free
Timestamp of repository gentoo: Wed, 08 Feb 2017 06:30:01 +0000
sh bash 4.4_p11
ld GNU ld (Gentoo 2.27 p1.0) 2.27
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p11::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.23.2::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.9::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

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

mlen
    location: /var/lib/mlen-overlay
    sync-type: git
    sync-uri: https://github.com/mlen/gentoo-overlay.git
    masters: gentoo

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=broadwell -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=broadwell -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5 -l5"
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 aac aacplus acl alsa amd64 audit berkdb bzip2 caps cli consolekit cracklib crypt cryptsetup cups cxx dbus dri dri3 dvd faac flac fortran gdbm geoclue geoloc geolocation gif gnome-keyring gtk gtk3 gtkstyle hidpi hotwording iconv icu idn infinality introspection iproute2 ipv6 jpeg kerberos libedit libnotify llvm lvm mbim mmx modemmanager modules mp3 mpeg multilib ncurses networkmanager nls nptl offensive ogg opengl openmp opus oss pam pch pcre pm-utils png policykit pulseaudio python qt5 readline samba seccomp session sound sse sse2 ssl startup-notification tcpd theora tiff truetype udev udisks unicode unwind v4l vaapi vim vim-syntax virt-network vorbis vpx webp widgets x264 xattr xft xinerama zlib zsh-completion" 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="kexi words flow plan sheets stage tables krita karbon braindump author" 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 isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="synaptics evdev" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 i386 arm" QEMU_USER_TARGETS="x86_64 i386 arm" RUBY_TARGETS="ruby21 ruby23 ruby24" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

dev-lang/ruby-2.1.10::gentoo was built with the following:
USE="berkdb gdbm ipv6 ncurses rdoc readline ssl -debug -doc -examples -rubytests -socks5 -tk -xemacs" ABI_X86="64"
CFLAGS="-march=broadwell -O2 -pipe -ggdb -fno-strict-aliasing"
CXXFLAGS="-march=broadwell -O2 -pipe -ggdb -fno-strict-aliasing"


dev-lang/ruby-2.3.3-r1::gentoo was built with the following:
USE="berkdb gdbm ipv6 ncurses rdoc readline ssl -debug -doc -examples -jemalloc -libressl -rubytests -socks5 -tk -xemacs" ABI_X86="64"
CFLAGS="-march=broadwell -O2 -pipe -ggdb -fno-strict-aliasing"
CXXFLAGS="-march=broadwell -O2 -pipe -ggdb -fno-strict-aliasing"


dev-lang/ruby-2.4.0::gentoo was built with the following:
USE="berkdb gdbm ipv6 rdoc ssl -debug -doc -examples -jemalloc -libressl -rubytests -socks5 -tk -xemacs" ABI_X86="64"
CFLAGS="-march=broadwell -O2 -pipe -ggdb -fno-strict-aliasing"
CXXFLAGS="-march=broadwell -O2 -pipe -ggdb -fno-strict-aliasing"


dev-ruby/rake-12.0.0::gentoo was built with the following:
USE="-doc -test" ABI_X86="64" RUBY_TARGETS="ruby21 ruby23 ruby24 -ruby20 -ruby22"


sys-devel/gdb-7.12.1::gentoo was built with the following:
USE="client lzma multitarget nls python server xml -test -vanilla" ABI_X86="64" PYTHON_SINGLE_TARGET="python2_7 -python3_4 -python3_5" PYTHON_TARGETS="python2_7 python3_4 -python3_5"
Comment 1 SpanKY gentoo-dev 2017-02-09 15:10:59 UTC
have you tried some older versions ?
Comment 2 Mateusz Lenik 2017-02-09 17:14:47 UTC
I did it right now, 7.10.1 is the last version that is not affected by this bug.
Comment 3 Mateusz Lenik 2017-02-09 17:28:32 UTC
Asked a friend who uses other distro to try to reproduce this bug and it turns out it is reproducible. I'll report this to the upstream. Log for the record.

$ gdb --args /data/rbenv/versions/2.3.2/bin/ruby -S /data/rbenv/versions/2.3.2/bin/rake -T
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /data/rbenv/versions/2.3.2/bin/ruby...done.
(gdb) set follow-fork-mode child
(gdb) r
Starting program: /data/rbenv/versions/2.3.2/bin/ruby -S /data/rbenv/versions/2.3.2/bin/rake -T
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff7ff7700 (LWP 19786)]
warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.3-compliant syntax, but you are running 2.3.2.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
[New process 19803]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
./nat/x86-linux-dregs.c:146: internal-error: void x86_linux_update_debug_registers(lwp_info*): Assertion `lwp_is_stopped (lwp)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)
Comment 4 Mateusz Lenik 2017-02-09 18:13:46 UTC
It was already reported to upstream: https://sourceware.org/bugzilla/show_bug.cgi?id=21051
Comment 5 SpanKY gentoo-dev 2017-02-09 18:48:05 UTC
thanks.  if a patch comes out, we can grab it, but we prob won't do any active development ourselves on this.