Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554422 - net-misc/dhcpcd-6.9.1 /run/dhcpcd/resolv.conf.enp2s0.ipv4ll: No such file or directory , /etc/resolv.conf is empty
Summary: net-misc/dhcpcd-6.9.1 /run/dhcpcd/resolv.conf.enp2s0.ipv4ll: No such file or ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords: PATCH
: 556810 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-10 08:27 UTC by jospezial
Modified: 2016-02-04 17:24 UTC (History)
10 users (show)

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


Attachments
/etc/dhcpcd.conf (dhcpcd.conf,1.34 KB, text/plain)
2015-07-10 20:18 UTC, jospezial
Details
log of 50-ntp.conf (50-ntp_conf.log,8.10 KB, text/plain)
2015-07-20 16:45 UTC, Casper Ti. Vector
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2015-07-10 08:27:08 UTC
rc default logging started at Fri Jul 10 09:52:33 2015

 * Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...
 [ ok ]
 * Starting syslog-ng ...
 [ ok ]
 * Starting acpid ...
 [ ok ]
 * Starting D-BUS system messagebus ...
 [ ok ]
 * Starting ConsoleKit daemon ...
 [ ok ]
 * Bringing up interface enp2s0
 *   config_enp2s0 not specified; defaulting to DHCP
 *   dhcp ...
 *     Running dhcpcd ...
enp2s0: adding address fe80::b17b:2b24:8e48:f95c
enp2s0: waiting for carrier
enp2s0: carrier acquired
DUID 00:01:00:01:19:a5:22:1d:00:00:00:00
enp2s0: IAID a6:34:78:5d
enp2s0: rebinding lease of 192.168.1.240
enp2s0: soliciting an IPv6 router
enp2s0: leased 192.168.1.240 for infinity
enp2s0: adding route to 192.168.1.0/24
enp2s0: adding default route via 192.168.1.1
forked to background, child pid 1421
cat: /run/dhcpcd/resolv.conf.enp2s0.ipv4ll: No such file or directory
 [ ok ]
 *     received address 192.168.1.240/24
 [ ok ]
 * Mounting network filesystems ...
 [ ok ]
 * Setting up lightdm ...
 [ ok ]
 * Restoring Mixer Levels ...
 [ ok ]
 * Starting cupsd ...
 [ ok ]
 * Starting linux_logo ...
 *   Creating /etc/issue ...
 [ ok ]
 * Setting clock via the NTP client 'ntpdate' ...
Exiting, name server cannot be used: Temporary failure in name resolution (-3) * Failed to set clock
 [ !! ]
 * ERROR: ntp-client failed to start
 * Starting sshd ...
 [ ok ]
 * Starting vixie-cron ...
 [ ok ]
 * Loading zram module...
 [ ok ]
 * Swap->zram0
 [ ok ]
 * Starting local ...
 [ ok ]




ls -ltR /run/dhcpcd*
-rw-r--r-- 1 root root  5 10. Jul 09:52 /run/dhcpcd-enp2s0.pid

/run/dhcpcd:
insgesamt 0
drwxr-xr-x 2 root root 60 10. Jul 09:52 resolv.conf
drwxr-xr-x 2 root root 40 10. Jul 09:52 ntp.conf

/run/dhcpcd/resolv.conf:
insgesamt 4
-rw-r--r-- 1 root root 62 10. Jul 09:52 enp2s0.dhcp

/run/dhcpcd/ntp.conf:
insgesamt 0
 
bastellinux ~ # cat /run/dhcpcd/resolv.conf/enp2s0.dhcp 
# Generated by dhcpcd from enp2s0.dhcp
nameserver 192.168.1.1



bastellinux ~ # cat /etc/resolv.conf 
bastellinux ~ # dhcpcd -4 enp2s0          
DUID 00:01:00:01:19:a5:22:1d:00:00:00:00
enp2s0: IAID a6:34:78:5d
enp2s0: rebinding lease of 192.168.1.240
enp2s0: leased 192.168.1.240 for infinity
enp2s0: adding route to 192.168.1.0/24
enp2s0: adding default route via 192.168.1.1
forked to background, child pid 2099
bastellinux ~ # cat /etc/resolv.conf 
# Generated by dhcpcd from enp2s0.dhcp
# /etc/resolv.conf.head can replace this line
nameserver 192.168.1.1
# /etc/resolv.conf.tail can replace this line
bastellinux ~ # ls -ltR /run/dhcpcd*
-rw-r--r-- 1 root root  5 10. Jul 10:05 /run/dhcpcd-enp2s0-4.pid
-rw-r--r-- 1 root root  5 10. Jul 09:52 /run/dhcpcd-enp2s0.pid

/run/dhcpcd:
insgesamt 0
drwxr-xr-x 2 root root 60 10. Jul 10:05 resolv.conf
drwxr-xr-x 2 root root 40 10. Jul 09:52 ntp.conf

/run/dhcpcd/resolv.conf:
insgesamt 4
-rw-r--r-- 1 root root 62 10. Jul 10:05 enp2s0.dhcp

/run/dhcpcd/ntp.conf:
insgesamt 0



emerge --info dhcpcd openrc
Portage 2.2.20 (python 3.3.5-final-0, default/linux/amd64/13.0, gcc-5.1.0, glibc-2.20-r2, 4.2.0-rc1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.2.0-rc1-x86_64-AMD_Athlon-tm-_II_X2_240_Processor-with-gentoo-2.2
KiB Mem:     4047512 total,   2956684 free
KiB Swap:   11010040 total,  11010040 free
Timestamp of repository gentoo: Thu, 09 Jul 2015 17:15:01 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25 p1.2) 2.25
ccache version 3.2.2 [enabled]
app-shells/bash:          4.3_p39::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2-r1::gentoo
dev-lang/python:          2.7.10::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo
dev-util/ccache:          3.2.2::gentoo
dev-util/cmake:           3.2.3::gentoo
dev-util/pkgconfig:       0.28-r3::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25-r1::gentoo
sys-devel/gcc:            5.1.0::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

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

overlay_jl
    location: /usr/local/portage
    masters: gentoo
    priority: 0

betagarden
    location: /var/lib/layman/betagarden
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/betagarden.git
    masters: gentoo
    priority: 50

gamerlay
    location: /var/lib/layman/gamerlay
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/gamerlay.git
    masters: gentoo
    priority: 50

kde
    location: /var/lib/layman/kde
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/kde.git
    masters: gentoo
    priority: 50

qt
    location: /var/lib/layman/qt
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/qt.git
    masters: gentoo
    priority: 50

wine-overlay
    location: /var/lib/layman/wine-overlay
    sync-type: laymansync
    sync-uri: git://github.com/NP-Hardass/wine-overlay.git
    masters: gentoo
    priority: 50

Installed sets: @kde-applications-live, @kde-frameworks-live, @kde-plasma-live
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-write=y --keep-going --quiet-build=y"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks 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="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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"
PORTAGE_TMPDIR="/var/tmp"
USE="3dnow 3dnowext 64bit X Xaw3d a52 aac aacplus aacs aalib accessibility ace acl acpi activefilter aften alsa amd64 ap apm apng archive arping audacious audiofile automount bazaar bdplus berkdb binary-drivers bluetooth bluray boost bzip2 bzr cairo canusb ccache cdda cddb cdio cdparanoia cdr cdrdao cdrom cgi charconv chm chroot cjk clang cli client colordiff colors compress consolekit corefonts cpio cracklib crypt css cue cups curl curlwrappers cvs cxx daemon dbus declarative device-mapper dga dhcp doom doomsday dos download-subs dri dri3 dts dump dv dvb dvd dvdnav eap eap-sim eap-tls ebook egl emerald emoticon enca encode enscript equalizer evdev exif extensions extras faac faad fam farstream fat fax fbcon fdformat ffmpeg fftw firefox flac fluidsynth fontconfig foomaticdb fortran freedoom ftp fuse g3dvl gadu gallium gbm gd gdbm geoip gif gimp git glamor glut gme gnutls gpg gphoto2 gpm graphite gsm gstreamer gtk gtk3 gtkstyle gudev gui gzip hddtemp hdf hdf5 heretic hexen hid highlight hpcups hpijs http hwdb iconv icq icu id3tag idn imagemagick introspection ios ipc ipod ipv6 jack java javascript jit jpeg jpeg2k kate keymap ladspa lame lcms legacy-systray lensfun libass libcanberra libinput libkms libnotify libsamplerate libssh2 libtiger libv4l libwww live llvm-shared-libs lm_sensors logrotate lua lzma lzo mad madwifi magic man matroska md5sum meanwhile mercurial metalink midi mikmod mime minizip mixer mjpeg mmap mms mmx mmxext mng mobi mod modplug modules mono mouse mozilla mp3 mp4 mpeg mpeg2 mplayer mtp multilib multimedia multislot musepack musicbrainz nano-syntax ncat ncurses ndiff network nfs nfsidmap nfsv4 nfsv41 nls nmap-update nokia normalize nowlistening nping nptl nsplugin ntfs ntfsprogs ntp nvidia nvram obex ocr ogg ogm openal opencl opengl openmax openmp openssl oscar osdmenu otr p2p pam pango panorama parport parse-clocks pcap pci pcre pcre16 pdf pipes plugins pm-utils png policykit postproc postscript ppds printsupport privacy projectm pulseaudio pvr python python3 qalculate qml qt5 quicktime r600-llvm-compiler radio rar raw rdesktop readline recording redeyes reiser4 reiserfs remote-access replaygain rpm rtc rtmp rtsp rubberband s3tc sbsms scanner schroedinger scripttools sdl secure-delete sensord session sftp sha512 shorten shout skins slang smi sndfile snowberry sockets sound soundtouch sox speex spell sql sqlite sqlite3 sse sse2 ssh ssl startup-notification statistics stk stream subtitles subversion svg swat symlink sync-plugin-portage syslog system-jsoncpp szip taglib tcpd texteffect tftp tftpd theora threads thumbnail tiff timidity tracepath traceroute translator truetype twolame udev udisks unicode upower urlpicpreview usb v4l v4l2 vaapi vamp vcd vcdx vdpau video videos virtualbox vlm vnc vorbis vpx vroot vst wad wav wavpack webgl webkit webm webp webpresence widgets wifi winbind winpopup wmf wps wxwidgets x264 x265 xa xattr xcb xcomposite xfs xine xinerama xinetd xkb xml xmp xorg xosd xpm xrandr xscreensaver xv xvid xvmc yahoo zenmap zip zlib zvbi" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" 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" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_3" PYTHON_TARGETS="python2_7 python3_3 python3_4" RUBY_TARGETS="ruby19 ruby20 ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="fbdev vesa svga vga radeon modesetting r100 r200 r300 r600" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

net-misc/dhcpcd-6.9.1::gentoo was built with the following:
USE="embedded ipv6 udev" ABI_X86="64"


sys-apps/openrc-0.17::gentoo was built with the following:
USE="ncurses netifrc pam unicode -audit -debug -newnet (-prefix) (-selinux) -static-libs -tools" ABI_X86="64"
Comment 1 jospezial 2015-07-10 12:55:03 UTC
Very strange. This boot it worked.
I did not change anything.
I will keep an eye on that.
Comment 2 Roy Marples 2015-07-10 19:21:37 UTC
> cat: /run/dhcpcd/resolv.conf.enp2s0.ipv4ll: No such file or directory

That is the error I am very interested in fixing.
It implies an error in 20-resolv.conf but damned if I can see it!
Comment 3 Roy Marples 2015-07-10 19:24:36 UTC
Can you attach your /etc/dhcpcd.conf as well please?
Comment 4 jospezial 2015-07-10 20:18:30 UTC
Created attachment 406480 [details]
/etc/dhcpcd.conf

/etc/dhcpcd.conf is the default one from net-misc/dhcpcd-6.9.1 .

It fails sporadic every few boots. Even without the error message in rc.log now.

"dhcpcd -4 enp2s0" seems to work always.
Comment 5 Roy Marples 2015-07-10 20:54:44 UTC
Could you try this patch please?

http://roy.marples.name/projects/dhcpcd/vpatch?from=bba0ca7ae99aeae9&to=2a1546e5869468f1
Comment 6 Jouni Rinne 2015-07-11 08:51:17 UTC
I was also hit by this with dhcpcd-6.9.1, random failures of name resolution.
Comment 7 jospezial 2015-07-11 19:48:43 UTC
(In reply to Roy Marples from comment #5)
> Could you try this patch please?
> 
> http://roy.marples.name/projects/dhcpcd/
> vpatch?from=bba0ca7ae99aeae9&to=2a1546e5869468f1

I copied the patch to /etc/portage/patches/net-misc/dhcpcd/

rebuilt dhcpcd (patch applied)

Had no fails the last 10 boots.


Jouni could you please test that too?
Comment 8 Jouni Rinne 2015-07-12 18:56:05 UTC
The patched version worked fine on four successive reboots, so I suppose the patch did its job!
Comment 9 Casper Ti. Vector 2015-07-20 16:34:01 UTC
My machine is also affected by this problem, except that the victim is emptied `/etc/ntpd.conf'; Roy's IPv4LL patch seems to resolve it successfully.  I think that those who have deployed recent versions of dhcpcd need to check that their `resolv.conf', `ntp.conf' (and anything else which could be similarly affected) are still in desirable states.

Though this seems to be already fixed upstream, there does not seem to be a deeper explanation, so I post my result of investigation for potential reference:

It seems that the problem originated from a race condition on hooks triggered by IPv4LL:  I hacked the `dhcpcd-run-hooks' script to add `set -x' and stdout/stderr redirection to a log file solely for the `50-ntp.conf' hook, and found the log (see following attachment; in particular note the lines following line 135) showing two interleaving IPv4LL sessions (line 135 and line 153) of that hook.  In summary, the culprit seems to be file manipulation requiring but not checking atomicity.
Comment 10 Casper Ti. Vector 2015-07-20 16:45:42 UTC
Created attachment 407282 [details]
log of 50-ntp.conf

Above-mentioned line numbers should be replaced with 135 and 165, because I accidentally deleted the original log and thus need to reproduce the log with the same steps.
Comment 11 jospezial 2015-07-21 01:05:27 UTC
(In reply to Casper Ti. Vector from comment #10)
> Created attachment 407282 [details]
> log of 50-ntp.conf
> 
> Above-mentioned line numbers should be replaced with 135 and 165, because I
> accidentally deleted the original log and thus need to reproduce the log
> with the same steps.

Please change the type of the attachment to plain text.
Comment 12 Casper Ti. Vector 2015-07-21 01:33:55 UTC
Comment on attachment 407282 [details]
log of 50-ntp.conf

Done; sorry for the inconvenience.
Comment 13 Amadeusz Żołnowski (RETIRED) gentoo-dev 2015-08-08 15:25:35 UTC
*** Bug 556810 has been marked as a duplicate of this bug. ***
Comment 14 Roy Marples 2015-08-21 10:49:03 UTC
dhcpcd-6.9.2 has been released which should now fix this issue.