Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 590214 - net-dns/bind-9.10.3_p4 with gentoo-sources-4.{7,8,9}.x doesn't start due to: could not listen on UDP socket: out of memory
Summary: net-dns/bind-9.10.3_p4 with gentoo-sources-4.{7,8,9}.x doesn't start due to: ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christian Ruppert (idl0r)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-01 13:58 UTC by Marcin Mirosław
Modified: 2020-02-23 13:36 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 Marcin Mirosław 2016-08-01 13:58:32 UTC
I've got problem with named, it doesn't start on kernel-4.7.x. I tested on gentoo-sources-4.7.0 and on kernel-git, taken directly from git repository.
Named throws:
2016-08-01T15:50:29.275059+02:00 jowisz named[15735]: starting BIND 9.10.3-P4 <id:ebd72b3> -u named
2016-08-01T15:50:29.275162+02:00 jowisz named[15735]: built with '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--with-libtool' '--enable-full-report' '--without-readline' '--enable-linux-caps' '--disable-fetchlimit' '--disable-filter-aaaa' '--disable-fixed-rrset' '--enable-ipv6' '--disable-rpz-nsdname' '--disable-rpz-nsip' '--disable-seccomp' '--enable-sit' '--enable-threads' '--without-dlz-bdb' '--without-dlopen' '--without-dlz-filesystem' '--without-dlz-stub' '--without-gost' '--without-gssapi' '--with-idn' '--with-libjson' '--without-dlz-ldap' '--without-dlz-mysql' '--without-dlz-odbc' '--without-dlz-postgres' '--without-python' '--with-ecdsa' '--with-openssl=/usr' '--with-libxml2' '--with-randomdev=/dev/urandom' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-O2 -pipe -march=corei7 -mtune=native -fno-unwind-tables -fno-asynchronous-unwind-tables -fuse-linker-plugin -s -ftracer -fuse-ld=gold -fvar-tracking-assignments' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,--sort-common'
2016-08-01T15:50:29.275200+02:00 jowisz named[15735]: ----------------------------------------------------
2016-08-01T15:50:29.275230+02:00 jowisz named[15735]: BIND 9 is maintained by Internet Systems Consortium,
2016-08-01T15:50:29.275271+02:00 jowisz named[15735]: Inc. (ISC), a non-profit 501(c)(3) public-benefit 
2016-08-01T15:50:29.275293+02:00 jowisz named[15735]: corporation.  Support and training for BIND 9 are 
2016-08-01T15:50:29.275310+02:00 jowisz named[15735]: available at https://www.isc.org/support
2016-08-01T15:50:29.275336+02:00 jowisz named[15735]: ----------------------------------------------------
2016-08-01T15:50:29.275380+02:00 jowisz named[15735]: adjusted limit on open files from 4096 to 1048576
2016-08-01T15:50:29.275403+02:00 jowisz named[15735]: found 4 CPUs, using 4 worker threads
2016-08-01T15:50:29.275421+02:00 jowisz named[15735]: using 2 UDP listeners per interface
2016-08-01T15:50:29.275859+02:00 jowisz named[15735]: using up to 4096 sockets
2016-08-01T15:50:29.287005+02:00 jowisz named[15735]: loading configuration from '/etc/bind/named.conf'
2016-08-01T15:50:29.289029+02:00 jowisz named[15735]: reading built-in trusted keys from file '/etc/bind/bind.keys'
2016-08-01T15:50:29.290055+02:00 jowisz named[15735]: statistics channel listening on 127.0.0.1#8053
2016-08-01T15:50:29.290337+02:00 jowisz named[15735]: using default UDP/IPv4 port range: [1024, 65535]
2016-08-01T15:50:29.290567+02:00 jowisz named[15735]: using default UDP/IPv6 port range: [1024, 65535]
2016-08-01T15:50:29.290857+02:00 jowisz named[15735]: listening on IPv4 interface eth0, 81.4.122.249#53
2016-08-01T15:50:29.290937+02:00 jowisz named[15735]: could not listen on UDP socket: out of memory
2016-08-01T15:50:29.290990+02:00 jowisz named[15735]: creating IPv4 interface eth0 failed; interface ignored
2016-08-01T15:50:29.291057+02:00 jowisz named[15735]: not listening on any interfaces
2016-08-01T15:50:29.291229+02:00 jowisz named[15735]: generating session key for dynamic DNS
2016-08-01T15:50:29.291414+02:00 jowisz named[15735]: sizing zone task pool based on 69 zones
2016-08-01T15:50:29.291562+02:00 jowisz named[15735]: dns_master_load: out of memory
2016-08-01T15:50:29.291627+02:00 jowisz named[15735]: could not configure root hints from 'named.cache': out of memory
2016-08-01T15:50:29.291947+02:00 jowisz named[15735]: additionally listening on IPv4 interface eth0, 81.4.122.249#53
2016-08-01T15:50:29.292011+02:00 jowisz named[15735]: could not listen on UDP socket: out of memory
2016-08-01T15:50:29.292046+02:00 jowisz named[15735]: creating IPv4 interface eth0 failed; interface ignored
2016-08-01T15:50:29.292130+02:00 jowisz named[15735]: loading configuration: out of memory
2016-08-01T15:50:29.292166+02:00 jowisz named[15735]: exiting (due to fatal error)
2016-08-01T15:50:29.293544+02:00 jowisz /etc/init.d/named[15733]: start-stop-daemon: failed to start `/usr/sbin/named'
2016-08-01T15:50:29.297112+02:00 jowisz /etc/init.d/named[15702]: ERROR: named failed to start

Strace shows:
[pid  3429] gettimeofday({1470059801, 636800}, NULL) = 0
[pid  3429] gettimeofday({1470059801, 636868}, NULL) = 0
[pid  3429] sendto(3, "<29>Aug  1 15:56:41 named[3410]:"..., 79, MSG_NOSIGNAL, NULL, 0) = 79
[pid  3429] mprotect(0x7f4628051000, 8192, PROT_READ|PROT_WRITE) = -1 ENOMEM (Cannot allocate memory)
[pid  3429] mmap(NULL, 134217728, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x7f4620000000
[pid  3429] munmap(0x7f4624000000, 67108864) = 0
[pid  3429] mprotect(0x7f4620000000, 143360, PROT_READ|PROT_WRITE) = -1 ENOMEM (Cannot allocate memory)
[pid  3429] munmap(0x7f4620000000, 67108864) = 0
[pid  3429] mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
[pid  3429] mprotect(0x7f4628051000, 8192, PROT_READ|PROT_WRITE) = -1 ENOMEM (Cannot allocate memory)
[pid  3429] mmap(0x7f4624000000, 67108864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x7f4624000000
[pid  3429] mprotect(0x7f4624000000, 143360, PROT_READ|PROT_WRITE) = -1 ENOMEM (Cannot allocate memory)
[pid  3429] munmap(0x7f4624000000, 67108864) = 0
[pid  3429] open("/proc/sys/net/ipv4/ip_local_port_range", O_RDONLY) = 8
[pid  3429] fstat(8, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
[pid  3429] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
[pid  3429] read(8, "8", 1)             = 1
[pid  3429] read(8, "", 1)              = 0
[pid  3429] close(8)                    = 0

On older kernel (e.g. 4.6.x) named works.



Reproducible: Always




# emerge --info bind                                                                                                                                                                       [30/3916]
Portage 2.2.28 (python 3.4.3-final-0, hardened/linux/amd64/no-multilib, gcc-4.9.3, glibc-2.22-r4, 4.7.0+ x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.7.0+-x86_64-Intel-R-_Xeon-R-_CPU_E5-2630_v2_@_2.60GHz-with-gentoo-2.2
KiB Mem:     1022544 total,     36456 free
KiB Swap:    1023996 total,    679224 free
Timestamp of repository gentoo: Mon, 01 Aug 2016 07:30:01 +0000
sh bash 4.3_p42-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.2.4 [enabled]
app-shells/bash:          4.3_p42-r1::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.6.1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.19.1::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

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

Installed sets: @masscheck, @nagios-plugins, @sheepdog
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=corei7 -mtune=native    -fno-unwind-tables -fno-asynchronous-unwind-tables -fuse-linker-plugin -s    -ftracer    -fuse-ld=gold -fvar-tracking-assignments"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=corei7 -mtune=native    -fno-unwind-tables -fno-asynchronous-unwind-tables -fuse-linker-plugin -s    -ftracer    -fuse-ld=gold -fvar-tracking-assignments"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe -march=corei7 -mtune=native    -fno-unwind-tables -fno-asynchronous-unwind-tables -fuse-linker-plugin -s    -ftracer    -fuse-ld=gold -fvar-tracking-assignments"
FEATURES="assume-digests binpkg-logs ccache cgroup collision-protect compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=corei7 -mtune=native    -fno-unwind-tables -fno-asynchronous-unwind-tables -fuse-linker-plugin -s    -ftracer    -fuse-ld=gold -fvar-tracking-assignments"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pl_PL.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-O"
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 aio amd64 apache2 bash-completion bzip2 caps cli cracklib crypt cxx dri hardened iconv idn ipv6 justify lto mmx mmxext modules nano-syntax ncurses nls nptl openmp pax_kernel pcre pie readline seccomp session smp sse sse2 ssl ssp threads unicode urandom vhosts vim-syntax xattr xtpax zlib" ABI_X86="64" APACHE2_MODULES="alias auth_basic authn_alias authn_anon auth_digest authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cgi dav dav_fs dav_lock dir env expires ext_filter filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif status unique_id usertrack vhost_alias" APACHE2_MPMS="itk" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="apache aggregation bind cgroups conntrack contextswitch cpu curl curl_json df disk dns email entropy ethstat exec filecount interface iptables irq lvm match_regex mysql netlink load memory network nginx notify_email ntpd openvpn ping postgresql processes protocols rrdcached rrdtool snmp statsd swap syslog tail tail_csv tcpconns unixsock uptime vmem" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4 sse4.1 ssse3" ELIBC="glibc" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" NGINX_MODULES_HTTP="access browser charset gzip map limit_zone proxy rewrite spdy stub_status gzip_static" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" USERLAND="GNU" XTABLES_ADDONS="fuzzy geoip lscan psd sysrq tarpit"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON

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

net-dns/bind-9.10.3_p4::gentoo was built with the following:
USE="caps idn ipv6 json sit ssl threads urandom xml -berkdb -dlz -doc -fetchlimit -filter-aaaa -fixed-rrset -geoip -gost -gssapi -ldap (-libressl) -mysql -nslint -odbc -postgres -python -rpz (-seccomp) (-selinux) -static-libs" PYTHON_TARGETS="python2_7 python3_4 -python3_3"
Comment 1 Christian Ruppert (idl0r) gentoo-dev 2016-08-28 10:28:19 UTC
Does it work with 9.10.4_p2?
Comment 2 Marcin Mirosław 2016-08-28 12:56:03 UTC
No, there is no change.
Comment 3 Marcin Mirosław 2016-09-03 19:25:19 UTC
I found what caused this behaviour. In dmesg I found one important line:
[   14.769969] mmap: named (2234): VmData 27308032 exceed data ulimit 2097152. Update limits or use boot option  .

This is due to commit:
https://patchwork.kernel.org/patch/8921281/

but I don't know how to fix it in different way than using `cat 1 > /sys/module/kernel/parameters/ignore_rlimit_data`
Comment 4 Marcin Mirosław 2018-10-15 19:04:12 UTC
ping
Comment 5 Marcin Mirosław 2020-02-23 13:36:18 UTC
The best way to resolve bugs:
Status: 	RESOLVED OBSOLETE