Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Apr 2018 10:52:52 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: [diskless] pkg takes 100% of a CPU
Message-ID:  <1523119972.89422.1.camel@freebsd.org>
In-Reply-To: <201804071435.w37EZeqw008615@pdx.rh.CN85.dnsmgr.net>
References:  <201804071435.w37EZeqw008615@pdx.rh.CN85.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2018-04-07 at 07:35 -0700, Rodney W. Grimes wrote:
> > 
> > On Sat, 2018-04-07 at 11:50 +0200, BERTRAND Jol wrote:
> > > 
> > > Steven Hartland a crit:
> > > > 
> > > > 
> > > > When we?ve seen it using 100% it?s been doing comprehension stuff which
> > > > usually finishes you just have to wait. Not sure if that?s what you?re
> > > > seeing?
> > > 	Yesterday, I have killed pkg after more than 100 hours of CPU time...
> > > 
> > > 	Best regards,
> > > 
> > > 	JB
> > For me, pkg(8) quit working on systems that have /var/db mounted from
> > nfs long ago, maybe as much as a year ago at this point. I mentioned
> > it on irc, and was told "It's probably something to do with locking",
> > but I already have boot.nfsroot.options="nolockd" in loader.conf
> > (because that's pretty much the only option because the rc(8) system
> > was broken years ago when it comes to nfsroot).
> My understanding of the current broken state of afairs is that pkg
> does not work over nfs unless you have proper and full lockd support,
> AND set NFS_WITH_PROPER_LOCKING in pkg's environment.  This really
> really really just needs to work without a lot of fuss out of the
> box.
> 

nfs locking support is compiled into the kernel on both the server and
client side, and rpc.lockd is running on both, but there is no need for
actual locking on the mount because the rootfs isn't accessed by
multiple clients at once -- each of my arm boards has its own private
rootfs exported from the server. I'm pretty sure I tried remounting
root

I agree that pkg(8) needs to just work.

> The /etc/rc.initdiskless is presenty (11.x and later) in a usable
> state, though it has some issues if your /usr is seperate from /,
> and you have to override the default size of /var due to bloat,
> though I think the sizes of all the tmpfs's got bumped in ^head/.
> 

I don't want an mfs-based /var. I want /var, which is just a dir in the
rootfs, to work the way it's supposed to even if rootfs is nfs-mounted. 
Changes to the rc(8) subsystem done long ago, related to managing
pidfiles, cause the bulk of the problems. The problem would be fixable
if we had an mfs-based /run filesystem mounted very early to hold such
things, then later during rc processing a symlink could be made so that
/var/run would point to /run. I'm afraid all of that is easy to say,
but probably has a zillion little nits and "that won't work in my crazy
setup" objections from people, so I've never pursued it seriously.

-- Ian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1523119972.89422.1.camel>