Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48303 - baselayout: weird messages "RC_DEPEND_TREE ..."
Summary: baselayout: weird messages "RC_DEPEND_TREE ..."
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: 2004-04-19 02:52 UTC by Boris Fersing (RETIRED)
Modified: 2005-11-20 03:02 UTC (History)
6 users (show)

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


Attachments
Corrupt /var/lib/init.d/deptree (deptree,30.16 KB, text/plain)
2004-06-17 08:32 UTC, Andy Dalton
Details
Patch using a temporary file (gendepends.patch,1.03 KB, patch)
2005-02-23 09:14 UTC, Stefan Hoefer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Fersing (RETIRED) gentoo-dev 2004-04-19 02:52:13 UTC
At boot i get some weird messages : RC_DEPEND_TREE[number]= ... or RC_DEPEND_TREE[number+number]= ...

Sometimes when i get this messages at boot, my system works 'fine' and sometimes it doesn't; this is like a random !

I found that unplugging my pcmcia wifi card during the boot fixes the problem, but i never had that before with the wifi card plugged in !

I dont have the whole error message because i get it during the boot !

Reproducible: Sometimes
Steps to Reproduce:
1. Boot the system
2.
3.

Actual Results:  
....
RC_DEPEND_TREE[132+10]=1075883249
                                                                                
RC_DEPEND_TREE[143]=local
RC_DEPEND_TREE[143+2]=
RC_DEPEND_TREE[143+3]=bootsplash
RC_DEPEND_TREE[143+4]=
RC_DEPEND_TREE[143+5]=
RC_DEPEND_TREE[143+6]=
RC_DEPEND_TREE[143+7]=acpid alsasound bitlbeed bootmisc canna checkfs checkroot
clock consolefont cpufreqd crypto-loop cupsd dictd distccd domainname esound fam
famd fetchmail foldingathome gkrellmd gpm hdparm hostname hotplug i8k iptables
keymaps localmount mldonkey modules named net.eth0 net.eth1 net.lo netmount nfs
nfsmount nscd ntp-client ntp286+8")
/sbin/rc: line 1062: syslog-ng



emerge info :
Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.5)
=================================================================
System uname: 2.6.5 i686 Mobile Intel(R) Pentium(R) 4     CPU 3.06GHz
Gentoo Base System version 1.4.9
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS=" -g -pipe -march=pentium4 -mcpu=pentium4 -mfpmath=sse,387 -O2
-frename-registers -fomit-frame-pointer -ffast-math -fforce-addr"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/bind
/var/qmail/control"CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS=" -g -pipe -march=pentium4 -mcpu=pentium4 -mfpmath=sse,387 -O2
-frename-registers -fomit-frame-pointer -ffast-math -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror http://www.ibiblio.org/gentoo"
MAKEOPTS="-j4"
PKGDIR="/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.fr.gentoo.org/gentoo-portage"
USE="3ds X X509 aalib acpi acpi4linux alsa ardour-ksi avi berkdb bonobo canna
cdr chroot cjk crypt cscope dga directfb dv dvb dvd encode esd evo faad fam
fbcon fbdev ffmpeg fftw flac flash freetype gb gd gdbm gif gnome gphoto2 gpm
gstreamer gtk gtk2 gtkhtml guile imagemagick imap imlib jabber java javascript
jbig jpeg libwww mad matroska mikmod mldonkeypango motif mozilla moznoirc
moznomail mozsvg mpeg mpeg4 msn music ncurses nls objc ocaml offensive oggvorbis
openal opengl openssh oscar oss pam pcmcia pdflib perl php png pnp python
quicktime readline rogue ruby samba sdl slang spell sse ssl svg svga tcltk tcpd
tetex tiff transcode truetype unicode usb videos x86 xfs xine xinerama xml2 xmms
xosd xv xvid yahoo zlib"


rc-status :

Runlevel: default
  local                                                                        
                  [ started ]
  net.eth0                                                                     
                  [ started ]
  sshd                                                                         
                  [ started ]
  syslog-ng                                                                    
                  [ started ]
  pcmcia                                                                       
                  [ started ]
  net.eth1                                                                     
                  [ started ]
  xinetd                                                                       
                  [ started ]
  domainname                                                                   
                  [ started ]
  bootsplash                                                                   
                  [ started ]
  gpm                                                                          
                  [ started ]
  canna                                                                        
                  [ started ]
  xdm                                                                          
                  [ started ]
Comment 1 Ivar Ylvisaker 2004-04-28 02:22:50 UTC
I have a similar problem.  It appeared after I did a world update last weekend.

I investigated and found that /var/lib/init.d/deptree is corrupted.  Here are two examples:

RC_DEPEND_TREE[154+9]=
RC_DEPEND_TREE[154+10]="1082752405"

RC_DEPEND_TREE[165]="slurpd"
RC_DEPEND_TREE[16rc_type_ineed=2
rc_type_needsme=3
rc_type_iuse=4
rc_type_usesme=5
rc_type_ibefore=6
rc_type_iafter=7
rc_type_broken=8

....

RC_DEPEND_TREE[319]="checkfs"
RC_DEPEND_TREE[319+2]="checkroot modules"
RC_DEPEND_TREE[319+3]="localmount"
RC_DEPEND_TREE[319+4]=
RC_DEPEND_TREE[319+5]=
RC_DEPEND_TRE5+2]="net"
RC_DEPEND_TREE[165+3]=
RC_DEPEND_TREE[165+4]=
RC_DEPEND_TREE[165+5]=
RC_DEPEND_TREE[165+6]="local

Further investigation showed that /sbin/depscan.sh, which creates deptree, is being called twice at almost the same time.  One call is associated with root, the other with /etc/hotplug.  I don't know more than this at present.

Bug 47111 refers to a similar problem except that depcache was affected rather than deptree.

Some information about my system:

Portage 2.0.50-r6 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.5-gentoo)
=================================================================
System uname: 2.6.5-gentoo i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.4.10
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"

I am using baselayout-1.8.12

Comment 2 Ivar Ylvisaker 2004-04-30 11:34:40 UTC
Still further investigation revealed that the second depscan.sh was triggered by an ethernet module -- sk98lin in my system -- that I had put in /etc/modules.autoload.d/kernel-2.X.  I deleted the module from there and put it in /etc/conf.d/local.start (as modprobe sk98lin).  On my system, scripts in the latter location are executed after the scripts in the former location.

Things now seem to be working properly.

I suspect that this will not be a satisfactory solution for many people because it requires that they understand the obscure problems that can occur in the booting process.  A better solution might be to have depscan.sh check to see if there are any files in the /var/lib/init.d directory.  If there are, then another depscan.sh process has already started generating the files.  For those who want to run depscan.sh manually, depscan could print out a message saying that files exist in the /var/lib/init.d directory and they need to be deleted before new files can be generated. 
Comment 3 Ivar Ylvisaker 2004-05-01 01:20:51 UTC
I had to insert a "sleep 1" command between "modprobe sk98lin" and "ifconfig eth0 192.168.XXX.XXX" in /etc/conf.d/local.start.  Without it, ifconfig would use 192.168.0.2 as the eth0 address rather than 192.168.XXX.XXX.
Comment 4 YB 2004-05-09 13:08:51 UTC
I added the following hack to /sbin/functions.sh
#-------------------------
get_lock () {
        local filename="$1";
        if [ -z $filename ]; then
                echo "Empty file" > 2
        fi
        filename=/tmp/$filename
        touch $filename
        /bin/ln $filename $filename.lk 2>/dev/null # try to grab the lock
        while [ $? -ne 0 ] # failed...
        do
         sleep 1  # wait a while and try again.
         /bin/ln $filename $filename.lk 2>/dev/null
        done
}
                                                                                
rel_lock () {
        local filename="$1";
        filename=/tmp/$filename
        if [ -z $filename ]; then
                echo "empty file" > 2
        fi
        /bin/rm $filename.lk
}
#---------------------
And then added the following to /sbin/depscan.sh:10
get_lock .depscan #Get lock
And /sbin/depscan.sh:55
rel_lock .depscan #release lock
Comment 5 Boris Fersing (RETIRED) gentoo-dev 2004-05-10 13:42:44 UTC
it looks like kernel 2.6.6 and baselayout 1.9.1 fixed that for me !
Comment 6 Forest Wilkinson 2004-06-04 09:41:09 UTC
This problem recently showed up on my system as well, starting with an emerge -u world.

baselayout-1.9.4
gentoo-sources-2.4.25-r3
Comment 7 Forest Wilkinson 2004-06-04 11:23:13 UTC
Corroboration:  

My system also has the corrupt /var/lib/init.d/deptree, as mentioned by Ivar Ylvisaker in comments 1 and 2.  Commenting out my tulip ethernet driver from /etc/modules.autoload got rid of the RC_DEPEND_TREE messages at boot, so I'm thinking my system is behaving as his did.

I wonder, is this triggered only by certain ethernet drivers when compiled as modules, or perhaps just more common on certain hardware (like my dual CPU system)?

As a workaround, I rebuilt my kernel with the tulip ethernet driver linked directly in (rather than as a module), and removed tulip from /etc/modules.autoload.  This solved my problem, but it seems to me that the problem shouldn't exist in the first place.

Thanks to Ivar Ylvisaker for posting the information I needed.
Comment 8 Andy Dalton 2004-06-17 08:32:01 UTC
Created attachment 33428 [details]
Corrupt /var/lib/init.d/deptree
Comment 9 Andy Dalton 2004-06-17 08:41:26 UTC
I too an having the same problem with a corrupt /var/lib/init.d/deptree at boot time and have attached the corrupt file.  I'm including this just in case it adds any additional information you may find useful.

Portage 2.0.50-r8 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.4.25-gentoo-r4)
=================================================================
System uname: 2.4.25-gentoo-r4 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -Os -fforce-addr -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -Os -fforce-addr -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X apm arts avi berkdb cdr crypt cscope cups encode esd foomaticdb gdbm gif gpm gtk gtk2 imlib java jpeg kde libg++ libwww lirc mad mbox mikmod mmx motif mpeg mpeg3 ncurses nls offensive oggvorbis opengl oss pam pcmcia pdflib perl png pnp python qt quicktime readline sdl slang spell ssl svga tcltk tcpd tetex threads truetype trusted usb x86 xml2 xmms xv zlib"


I'm using:  sys-apps/baselayout-1.9.4-r2
            sys-kernel/gentoo-sources-2.4.25-r4

And here's the state of what gets started at boot time:
               aumix |      default
            bootmisc | boot
             checkfs | boot
           checkroot | boot
               clock | boot
         consolefont | boot
         crypto-loop |
               cupsd |
          domainname |
              esound |
                 fam |
                famd |
            gkrellmd |
                 gpm |      default
              hdparm |      default
            hostname | boot
             hotplug |      default
             ifplugd |
            iptables |
             keymaps | boot
               lircd |
                lisa |
               local |      default nonetwork
          localmount | boot
             modules | boot
            net.eth0 |      default
              net.lo | boot
            netmount |      default
                nscd |
          ntp-client |      default
                ntpd |      default
             numlock |
              pcmcia |
             portmap |
             reslisa |
           rmnologin | boot
              rsyncd |
               samba |
              serial | boot
           shorewall |      default
                sshd |
              switch |
           synclient |
            sysklogd | boot
             urandom | boot
          vixie-cron |      default
             winbind |
                 xdm |      default
                 xfs |
              xinetd |      default


Please let me know if there's any additional information I can provide that you can use to solve this problem.
Comment 10 Ivar Ylvisaker 2004-06-18 22:55:18 UTC
Yesterday, I upgraded to the 2.6.7 kernel (skipping 2.6.6).  When I start my ethernet module from the /etc/modules.autoload.d directory, the RC_DEPEND_TREE error messages are not longer seen in the boot messages.  However, when I look at the /var/lib/init.d/deptree file, I still see evidence that two /sbin/depscan.sh processes are running.  With the 2.6.5 kernel, the deptree file contained two overlapping copies of the desired deptree file, the second mangling the first.  With the new kernel, the deptree file still contains two copies but they follow one another.  Either (or both?) can be read successfully by the boot software.  However, this suggests that if my hardware or software changed (e.g., a faster or slower or different CPU or more or fewer or rewritten modules, etc.), the errors could reappear. 

Putting my ethernet module in /etc/conf.d/local.start still eliminates the problem for me.  But is this assured if other things change?
Comment 11 Oliver Kaiser 2004-12-11 16:13:24 UTC
I've two ethernet cards. Today I unmerged coldplug and put the Ethernet kernel modules e1000 and 8139too into /etc/modules.autoload.d/kernel-2.6. Now I've the same problem. Depending on if I press a key during boot I see different error messages. So this is definitly a race condition.  

... hmmm, maybe this explains some other strange errors (e.g. bug # 71025) I see on my system for quite a while ...
Comment 12 Paul Pacheco 2004-12-21 15:31:17 UTC
Can you try depscan.patch from bug 70009? it should fix the problem.

just:
cd /
patch -p0 < /tmp/depscan.patch
Comment 13 Stefan Hoefer 2005-02-23 09:12:28 UTC
I am experiencing this bug with baselayout 1.9.4-r6. I'm sure someone's working out something right now, meanwhile I need a system that boots reliably. So here my working bugfix: gendepends.patch. Basically, this is the same fix as formerly applied to cachedepends.awk (Thanks to whoever did that, my solution is a case of simple copy/paste).
Comment 14 Stefan Hoefer 2005-02-23 09:14:55 UTC
Created attachment 51956 [details, diff]
Patch using a temporary file
Comment 15 Martin Schlemmer (RETIRED) gentoo-dev 2005-02-23 09:48:33 UTC
Added to CVS, thanks.  Should be in next unstable baselayout.
Comment 16 Oliver Kaiser 2005-03-28 09:06:57 UTC
After emerging additional services I got tons of weired "RC_DEPEND_TREE" messages. I gave Stefan's patch http://bugs.gentoo.org/attachment.cgi?id=51956&action=view a try and now the issue is gone. :) Thanx!
Comment 17 Tommy Young 2005-05-23 17:34:21 UTC
I too can corroborate, removing my network card from modules.autoload and compiling it into the kernel 
fixed it, but I'd sure like to be able to have my network card be a module... Anyone have any ideas for a 
more permanent fix? (I tried the patch and could not get the patch to apply sucessfully)
Tommy
Comment 18 SpanKY gentoo-dev 2005-11-20 03:02:02 UTC
should be released