Project

General

Profile

Actions

Bug #1963

closed

ininite rc loop

Added by matthiasr about 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

I've been setting up a DF-BSD home server. After compiling netatalk,
avahi, and some convenience tools (sudo, vim, screen, zsh and
pkg_rolling-replace, I think) I wanted to reboot.

Now the machine keeps repeating some part of the boot process (see
screenshot at [1]). There's a short delay after "loading devfs rules";
when I press ctrl+c then I can break the cycle.

Subsequent actions are taken as often as the cycle ran (with some
services complaining that they're already running, other failing to
bind to ports etc.).

I can ssh into the machine or login on the console. Not all
filesystems are mounted, e.g. /home, /tmp, /var/tmp are missing, while
/, /usr, /var and /dev are there (the default HAMMER layout made by
the installer). I can mount the rest with mount -a just fine. (this
may be an artifact of ctrl+c, it appears the system tries to unmount
everything but fails on usr, dev and var)

The system is more-or-less usable for a time then, but either becomes
unresponsive or simply panics due to ressource exhaustion.

I have symlinked /usr/pkg/etc to /etc and I had linked
/usr/pkg/share/examples/rc.d to /etc/rc.d, although I have tried to
untangle the latter (which didn't help). Comparing /etc/rc.d with
/usr/src/etc/rc.d the file names match except for Makefile and
udevd_early missing from /etc/rc.d (from what I can tell the latter
was introduced only after 2.8.2).

I've attached my rc.conf, the output from "rcorder rcorder -s nostart
/etc/rc.d/*", dmesg and /var/log/messages. uname -a is:

DragonFly zz.2pktfkt.net 2.8-RELEASE DragonFly v2.8.2-RELEASE #2: Fri
Oct 29 08:03:52 PDT 2010
:/usr/obj/usr/src-misc/sys/X86_64_GENERIC_SMP
x86_64

PS: concerning the symlinking: I know this is bad, and may well have
caused this, but I think it should work (because without a
corresponding entry in rc.conf, each script should be a noop) and it
did work very well on NetBSD.

[1] http://matthiasr.posterous.com/rcd-weirdness


Files

rcorder.txt (2.16 KB) rcorder.txt matthiasr, 01/23/2011 02:54 PM
rc.conf (1 KB) rc.conf matthiasr, 01/23/2011 02:54 PM
dmesg.txt (8.96 KB) dmesg.txt matthiasr, 01/23/2011 02:54 PM
messages.bz2 (5.56 KB) messages.bz2 matthiasr, 01/23/2011 02:54 PM
Actions #1

Updated by justin about 13 years ago

On Sun, January 23, 2011 9:50 am, Matthias Rampke wrote:

I've been setting up a DF-BSD home server. After compiling netatalk,
avahi, and some convenience tools (sudo, vim, screen, zsh and
pkg_rolling-replace, I think) I wanted to reboot.

Now the machine keeps repeating some part of the boot process (see
screenshot at [1]). There's a short delay after "loading devfs rules";
when I press ctrl+c then I can break the cycle.

Subsequent actions are taken as often as the cycle ran (with some
services complaining that they're already running, other failing to
bind to ports etc.).

Boot from a install CD - you can mount the drives at that point and either
continue untangling the server or copy off any config files you want to
save, and reinstall. In terms of absolute time, it may be faster to just
start over if you don't have to do much reconfiguring. (though be careful
to not put yourself in the same loop again...)

Actions #2

Updated by c.turner about 13 years ago

On Sun, Jan 23, 2011 at 03:50:24PM +0100, Matthias Rampke wrote:

PS: concerning the symlinking: I know this is bad, and may well have
caused this, but I think it should work (because without a
corresponding entry in rc.conf, each script should be a noop) and it
did work very well on NetBSD.

As I recall from 'fiddling' previously I think the rc.d 'rcorder'
dependency scan happens before the filesystems are mounted - so all the
rc scripts need to physically be on '/' - so I'd definately suggest to
try copying the related scripts instead of symlinking here.

Actions #3

Updated by matthiasr about 13 years ago

On Sun, Jan 23, 2011 at 22:23, Chris Turner
<> wrote:

As I recall from 'fiddling' previously I think the rc.d 'rcorder'
dependency scan happens before the filesystems are mounted - so all the
rc scripts need to physically be on '/' - so I'd definately suggest to
try copying the related scripts instead of symlinking here.

Sorry this wasn't clear enough: I moved all the scripts from
/usr/pkg/share/examples/rc.d to /etc/rc.d and then made the former a
symlink pointing to the latter just to ensure all future rc.d scripts
would end up there as well. After the whole mess happened I undid
this; the /etc/rc.d is now identical to /usr/src/etc/rc.d (i.e. for
the time being, pkgsrc-installed rc scripts are out of the way); still
no change.

I still have no idea what exactly could be messed up; from the
symptoms it seems that something in the rc process keeps starting the
whole process again and again - until I hit ctrl-c, at which point all
these processes continue in parallel. Where could this happen?

Regards, M.

Actions #4

Updated by y0n3t4n1 about 13 years ago

On Sun, Jan 23, 2011 at 03:50:24PM +0100, Matthias Rampke wrote:

I have symlinked /usr/pkg/etc to /etc and I had linked
/usr/pkg/share/examples/rc.d to /etc/rc.d, although I have tried to
untangle the latter (which didn't help). Comparing /etc/rc.d with

This would cause loop because /etc/rc.d/localdaemons tries to scan
$local_startup, which contains /usr/pkg/etc/rc.d, which points to
/etc/rc.d on your machine. Then there's /usr/pkg/etc/rc.d/localdaemons,
which tries to start the things under /usr/pkg/etc/rc.d...

So if you'd like to keep the current configuration, you need to set
local_startup=NO in /etc/rc.conf.

Actions #5

Updated by matthiasr about 13 years ago

On Sun, Jan 23, 2011 at 23:03, YONETANI Tomokazu (via DragonFly issue tracker)

On Sun, Jan 23, 2011 at 03:50:24PM +0100, Matthias Rampke wrote:

I have symlinked /usr/pkg/etc to /etc

This would cause loop because /etc/rc.d/localdaemons tries to scan
$local_startup, which contains /usr/pkg/etc/rc.d

I wasn't aware of that.

local_startup=NO in /etc/rc.conf

This fixed it. Thanks a lot and sorry for the disturbance.

Actions

Also available in: Atom PDF