[diskless] pkg takes 100% of a CPU

BERTRAND Joël joel.bertrand at systella.fr
Sun Apr 8 11:42:48 UTC 2018


Eduardo Morras via freebsd-hackers a écrit :
> On Sat, 07 Apr 2018 08:19:51 -0600
> Ian Lepore <ian at freebsd.org> 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).
> 
> Is the db is on netbsd side? If yes, sqlite db over nfs are pita
> because nfs lies about file locking. It's true that it works 99% of
> time, the problematic part is the 1%. Documentation talks about
> incorrect NFS implementation, but a correct implementation can fail too
> because network latency, separate memory data between clients and
> server or different filesystem semantics; or all of them.

	All filesystems are mounted from NetBSD server :

root at pythagore:/var # mount
192.168.10.128:/srv/pythagore on / (nfs, asynchronous)
devfs on /dev (devfs, local, multilabel)
procfs on /proc (procfs, local)
fdescfs on /dev/fd (fdescfs)
192.168.10.128:/home on /home (nfs, asynchronous)
root at pythagore:/var # cat /etc/fstab
# Device        Mountpoint      FStype  Options Dump    Pass#
192.168.10.128:/srv/pythagore / nfs nfsv3,tcp,soft,intr,rw,async,nolockd
   0       0
proc                      /proc procfs rw                      0 0
fdesc                     /dev/fd      fdescfs         rw      0 0
192.168.10.128:/home      /home nfs    nfsv3,tcp,soft,intr,rw,async 0 0

	On server, /var/log/messages are full of :
Apr  8 13:40:49 legendre rpc.lockd: duplicate lock from hilbert.45141
Apr  8 13:40:49 legendre rpc.lockd: no matching entry for hilbert
Apr  8 13:40:52 legendre rpc.lockd: duplicate lock from pythagore.68734
Apr  8 13:40:52 legendre rpc.lockd: duplicate lock from pythagore.68734
Apr  8 13:40:52 legendre rpc.lockd: no matching entry for pythagore
Apr  8 13:40:52 legendre rpc.lockd: no matching entry for pythagore
Apr  8 13:40:55 legendre rpc.lockd: duplicate lock from pythagore.68734

even if all filesystems are mounted with nolockd option.

	JB


More information about the freebsd-hackers mailing list