From owner-freebsd-hackers@freebsd.org Sun Apr 8 11:03:20 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06A55F996BC for ; Sun, 8 Apr 2018 11:03:20 +0000 (UTC) (envelope-from emorrasg@yahoo.es) Received: from sonic306-19.consmr.mail.ir2.yahoo.com (sonic306-19.consmr.mail.ir2.yahoo.com [77.238.176.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C9F3765E3 for ; Sun, 8 Apr 2018 11:03:19 +0000 (UTC) (envelope-from emorrasg@yahoo.es) X-YMail-OSG: MFq1SZMVM1lGjcdYqLvHbnPZDvKBZlnxdgHha0SrVmaY56hLdRFTGWUC4.imEGQ T0ENAICPk1vTsdbZeMLGBP8NBCy2aC_7URxiqKcbRERbJHAWFG_6xntuTe4xQlfp3Xb.ZeSbzI0n hF.YUwA3tKgg2Jfkfo2W81WNhvXuhP9_YIFNsE_Wk2oYyRfLVHd4HSnJ1urElRZgcBkUexoKte5r g7Yp1lai1DkHiCLoFJfWr9u6z5B.qSUIMPOFlutGhhJCBwY6KLpp2ps9ZJOXk4oe8yL7hluOhqd5 rEfYDT0Pa_5X760mhQCP8Pzkkwkvi6GBq24YoUQgC61I7BLYO8OAMrABMYxoiiIGk_f9GT9MjbTV PEixPxhRYyKEYZNaHKnWqCPoQT2jHUTAV7ZS3g09nRFuB02G5QNuGuR5SjLxfLa7KSralIMWy1jK MZR2YP_wMmVtN0JjdqMrpXc8YoF1WxDH7G2TYFIhXwedsiViAVxUFYjMWyaI6woIwMME_RcBMMJ7 EFLEzXnoU7fyeYRrViHk8_0o- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Sun, 8 Apr 2018 11:03:11 +0000 Received: from 83.173.188.224.dyn.user.ono.com (EHLO emorras.eu) ([83.173.188.224]) by smtp409.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID ee21935dbdb8ad545c80c9bffa84d529 for ; Sun, 08 Apr 2018 11:03:10 +0000 (UTC) Date: Sun, 8 Apr 2018 13:11:04 +0200 From: Eduardo Morras To: freebsd-hackers@freebsd.org Subject: Re: [diskless] pkg takes 100% of a CPU Message-Id: <20180408131104.117b849278667b57ca51b223@yahoo.es> In-Reply-To: <1523110791.40504.15.camel@freebsd.org> References: <1523110791.40504.15.camel@freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd11.1) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Apr 2018 11:03:20 -0000 On Sat, 07 Apr 2018 08:19:51 -0600 Ian Lepore wrote: > On Sat, 2018-04-07 at 11:50 +0200, BERTRAND Jol wrote: > > Steven Hartland a crit: > > >=20 > > > 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... > >=20 > > Best regards, > >=20 > > JB >=20 > 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=3D"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. https://www.sqlite.org/faq.html#q5 https://stackoverflow.com/questions/9907429/locking-sqlite-file-on-nfs-file= system-possible#9962003 >=20 > -- Ian --- --- Eduardo Morras