Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 507368 - net-dialup/ppp: pppd SIGSEGV in when hostname dns is dead
Summary: net-dialup/ppp: pppd SIGSEGV in when hostname dns is dead
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-11 06:06 UTC by Xuefer
Modified: 2022-06-29 06:52 UTC (History)
1 user (show)

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 Xuefer 2014-04-11 06:06:25 UTC
** to reproduce:
hostname is set to "dev" (any name would do, i think)
remove "127.0.0.1 dev" and anything relative to "dev" from /etc/hosts
shutdown bind/pdnsd or any name service
/etc/resolv.conf using only "nameserver 127.0.0.1" and "search lan."
# /etc/init.d/net.ppp0 restart
crash

** to get gdb backtrace
emerge debugedit, emerge pppd/tdb/glibc with splitdebug installsources
mv /usr/sbin/pppd /usr/sbin/pppd-
create /usr/sbin/pppd with follow wrapper script
#!/bin/sh
exec gdbserver 127.0.0.1:1029 pppd- "$@"

then /etc/init.d/net.ppp0 restart
in another console: gdb pppd-, target remote 127.0.0.1:1029, continue

Program received signal SIGSEGV, Segmentation fault.
0x00007f371a6fa810 in find_nestlock (tdb=0x6b5f90, offset=4) at ../common/lock.c:249
249                     if (tdb->lockrecs[i].off == offset) {
(gdb) bt
#0  0x00007f371a6fa810 in find_nestlock (tdb=0x6b5f90, offset=4) at ../common/lock.c:249
#1  0x00007f371a6fbbb3 in tdb_have_extra_locks (tdb=0x6b5f90) at ../common/lock.c:825
#2  0x00007f371a6fb0ee in tdb_allrecord_check (tdb=0x6b5f90, ltype=0, flags=TDB_LOCK_WAIT, upgradable=false) at ../common/lock.c:502
#3  0x00007f371a6fb2a3 in tdb_allrecord_lock (tdb=0x6b5f90, ltype=0, flags=TDB_LOCK_WAIT, upgradable=false) at ../common/lock.c:556
#4  0x00007f371a6fb698 in tdb_lockall_read (tdb=0x6b5f90) at ../common/lock.c:686
#5  0x00007f371a6f6c97 in tdb_check (tdb=0x6b5f90, check=0x0, private_data=0x0) at ../common/check.c:342
#6  0x00007f371b1fcc6c in gencache_init () at lib/gencache.c:74
#7  gencache_init () at lib/gencache.c:57
#8  0x00007f371b1fd5bd in gencache_parse (keystr=keystr@entry=0x6b5ea0 "WINS_SRV_DEAD/127.0.0.1,0.0.0.0", parser=parser@entry=0x7f371b1fcb70 <gencache_get_data_blob_parser>,
    private_data=private_data@entry=0x7fff41eb1e30) at lib/gencache.c:342
#9  0x00007f371b1fdd99 in gencache_get_data_blob (keystr=keystr@entry=0x6b5ea0 "WINS_SRV_DEAD/127.0.0.1,0.0.0.0", blob=blob@entry=0x7fff41eb1e80, timeout=timeout@entry=0x0,
    was_expired=was_expired@entry=0x0) at lib/gencache.c:410
#10 0x00007f371b1fde95 in gencache_get (keystr=keystr@entry=0x6b5ea0 "WINS_SRV_DEAD/127.0.0.1,0.0.0.0", value=value@entry=0x0, ptimeout=ptimeout@entry=0x0)
    at lib/gencache.c:601
#11 0x00007f371b1e116a in wins_srv_is_dead (wins_ip=..., wins_ip@entry=..., src_ip=..., src_ip@entry=...) at lib/wins_srv.c:104
#12 0x00007f371b232b33 in resolve_wins (name=name@entry=0x7fff41eb2150 "dev", name_type=name_type@entry=0, return_iplist=return_iplist@entry=0x7fff41eb20c0,
    return_count=return_count@entry=0x7fff41eb20bc) at libsmb/namequery.c:1666
#13 0x00007f371b19104d in lookup_byname_backend (count=0x7fff41eb20bc, name=0x7fff41eb2150 "dev") at ../nsswitch/wins.c:73
#14 _nss_wins_gethostbyname_r (hostname=<optimized out>, he=0x7f371c8f89e0 <resbuf.11757>, buffer=0x6aef10 "2t\b\221", buflen=1024, h_errnop=<optimized out>)
    at ../nsswitch/wins.c:300
#15 0x00007f371c653935 in gethostbyname_r () from /lib64/libc.so.6
#16 0x00007f371c6531dd in gethostbyname () from /lib64/libc.so.6
#17 0x0000000000418e80 in ip_check_options () at ipcp.c:1759
#18 0x000000000040af61 in main (argc=39, argv=0x7fff41eb24d8) at main.c:414

(gdb) p tdb->lockrecs
$1 = (struct tdb_lock_type *) 0x0
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-04-11 06:24:38 UTC
Which version of ppp did you test?

Can you please add your "emerge --info ppp" output to this bug?
Comment 2 Xuefer 2014-04-15 02:36:30 UTC
# emerge --info ppp tdb
Portage 2.2.8-r1 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.17, 3.13.6-hardened-r3 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.13.6-hardened-r3-x86_64-Intel-R-_Celeron-R-_CPU_E3300_@_2.50GHz-with-gentoo-2.2
KiB Mem:     2054888 total,   1683040 free
KiB Swap:    3911820 total,   3911820 free
Timestamp of tree: Wed, 09 Apr 2014 05:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.3.3
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo sunrise gentoo-zh jmesmon divkitpro
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -fomit-frame-pointer -pipe -funroll-all-loops -ftracer -funit-at-a-time -fpeel-loops -funswitch-loops"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -fomit-frame-pointer -pipe -funroll-all-loops -ftracer -funit-at-a-time -fpeel-loops -funswitch-loops"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=" http://mirrors.sohu.com/gentoo/ http://mirrors.163.com/gentoo/ "
LANG="zh_CN.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--progress -4"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/gentoo-zh /var/lib/layman/jmesmon /usr/local/portage/devkitpro"
SYNC="rsync://rsync2.cn.gentoo.org/gentoo-portage"
USE="acl acpi amd64 async bash-completion berkdb bzip2 caps cjk clamdtop cli cracklib crypt cscope cxx device-mapper dlz dri extras fam fontconfig fortran ftp gd gdbm hpn hwdb iconv icu idn ipv6 jpeg logrotate lzma mmx modules multilib multislot mysql ncurses nls nptl nvidia openmp openrc pam pcre png ppds pulseaudio python readline rrdcgi samba scsi session sqlite sqlite3 sse sse2 ssl tcpd threads tiff tordns transmitter truetype ubuntu unicode urandom vim-syntax 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" APACHE2_MPMS="event" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="lvm syslog device-mapper" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="zh_CN zh en_US en" LIRC_DEVICES="serial" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="nouveau" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON

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

net-dialup/ppp-2.4.5-r3 was built with the following:
USE="ipv6 pam -activefilter -atm -dhcp -eap-tls -gtk -radius" ABI_X86="64"
CFLAGS="-O2 -march=core2 -fomit-frame-pointer -pipe -funroll-all-loops -ftracer -funit-at-a-time -fpeel-loops -funswitch-loops -O0 -ggdb"


sys-libs/tdb-1.2.11 was built with the following:
USE="python" ABI_X86="64"
CFLAGS="-O2 -march=core2 -fomit-frame-pointer -pipe -funroll-all-loops -ftracer -funit-at-a-time -fpeel-loops -funswitch-loops -O0 -ggdb"
Comment 3 Pacho Ramos gentoo-dev 2015-01-07 12:25:18 UTC
What does occur with 2.4.7?
Comment 4 I am 2015-04-28 10:39:06 UTC
(In reply to Pacho Ramos from comment #3)
> What does occur with 2.4.7?

the same, segfaults all the time