Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148011 - baselayout-1.12.5 deferred net depends start out of order
Summary: baselayout-1.12.5 deferred net depends start out of order
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-17 20:13 UTC by Arthur Hagen
Modified: 2006-11-06 06:43 UTC (History)
0 users

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


Attachments
order services correctly (restart.patch,416 bytes, patch)
2006-09-19 04:30 UTC, Roy Marples (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Hagen 2006-09-17 20:13:52 UTC
emerge --info:
Portage 2.1.1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.4-r3, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 mobile AMD Athlon(tm) 4 2400+
Gentoo Base System version 1.12.5
Last Sync: Sun, 17 Sep 2006 20:50:01 +0000
ccache version 2.3 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=athlon-4 -momit-leaf-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-Os -march=athlon-4 -momit-leaf-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://gentoo.osuosl.org/ http://gentoo.mirrors.tds.net/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS=""
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://tree.broomstick.com/gentoo-portage"
USE="x86 3dnow X aac acl alsa apache2 audiofile berkdb bitmap-fonts bzip2 caps cdr cli crypt cups dlloader dri dvd eds elibc_glibc emboss encode esd foomaticdb gdbm gif gnome gpm gstreamer gtk gtk2 imlib input_devices_keyboard input_devices_mouse input_devices_synaptics ipv6 isdnlog jpeg kernel_linux lcms libg++ libwww logrotate mad mbox mikmod mmap mmx motif mp3 mpeg ncurses nfs nis nls nntp nptl nptlonly offensive ogg opengl oss pam pcre perl pic png posix pppd python qt3 qt4 quicktime readline reflection sdl seamonkey session sndfile spell spl sse ssl tcpd threads tiff truetype truetype-fonts type1-fonts udev userland_GNU video_cards_radeon vorbis xml xmms xorg xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Problem:
deferred net services are started out of order, causing services which depend on a certain order to fail.

Example:
* Starting wlan0
*   Starting wpa_supplicant on wlan0 ...
*   Starting wpa_cli on wlan0 ...
*     Backgrounding
* WARNING:  ntp-client is scheduled to start when net.wlan0 has started
* Starting portmap ...
* WARNING:  ypbind is scheduled to start when net.wlan0 has started
* Starting automounter ...
/net
* Setting up gdm ...
...

The problem with the above is that autofs starts before ypbind has finished, causing the NIS maps to not be used.

Expected result:
* Starting automounter ...
/home /var/backup /net
...

/etc/init.d/autofs contains "use ypbind" and thus should not be started before ypbind has completed.

Further information:
/etc/conf.d/rc has RC_PARALLEL_STARTUP="no" and RC_NET_STRICT_CHECKING="yes".
/etc/nsswitch.conf has "automount: nis files"

Workaround for this specific manifestation of the problem:
1: Add specific yp entries to /etc/autofs/auto.master -- this will cause autofs to retry instead of skipping checking the auto.master from nis.  The downside is that this will be specific to one YP network.
2: Manual restart of /etc/init.d/autofs after boot sequence has completed.  This will pick up the NIS maps that were missed the first time around.

While this problem is most readily apparent with ypbind/autofs, I believe it can affect all network services that depend on a certain order.
Comment 1 Roy Marples (RETIRED) gentoo-dev 2006-09-19 04:30:35 UTC
Created attachment 97392 [details, diff]
order services correctly

Please try the attached patch to /sbin/runscript.sh
Comment 2 Arthur Hagen 2006-09-19 09:01:38 UTC
Tried the patch to runscript.sh.
The result was that ypbind now didn't start at all.
I still see the "WARNING:  ypbind is scheduled to start when net.wlan0 has started.", but ypbind now doesn't start, and yet the services using ypbind starts.
Comment 3 Arthur Hagen 2006-09-19 09:14:00 UTC
Strike last comment.  I had fatfingered the patch.

However, it doesn't solve the problem -- autofs still starts before ypbind, despite autofs having "use ypbind" in the depend() section.

From the process list (which also shows the startup order):

 6244 ?        00:00:00 wpa_supplicant
 6255 ?        00:00:00 wpa_cli
 6506 ?        00:00:00 portmap
 6772 ?        00:00:00 automount
 7360 ?        00:00:00 dhcpcd
 7695 ?        00:00:00 ypbind

Comment 4 Roy Marples (RETIRED) gentoo-dev 2006-11-06 06:42:03 UTC
Fixed in 1.12.6
Comment 5 Roy Marples (RETIRED) gentoo-dev 2006-11-06 06:43:37 UTC
(In reply to comment #3)
> However, it doesn't solve the problem -- autofs still starts before ypbind,
> despite autofs having "use ypbind" in the depend() section.

Well, that's a different bug.
If 1.12.6 fails to fix, then please test the 1.13 alpha's currently in portage as that should fix. If not, open a new bug :)