Date: Sat, 26 Mar 2022 04:03:46 +0000 From: Rick Macklem <rmacklem@uoguelph.ca> To: John Baldwin <jhb@FreeBSD.org>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: Re: ktrace on NFSroot failing? Message-ID: <YT2PR01MB973039BE3072ED3F94CFE141DD1B9@YT2PR01MB9730.CANPRD01.PROD.OUTLOOK.COM> In-Reply-To: <YT2PR01MB97308688D7ACB6072A20DBE8DD1B9@YT2PR01MB9730.CANPRD01.PROD.OUTLOOK.COM> References: <alpine.BSF.2.00.2203101514090.68830@ai.fobar.qr> <CAGudoHGCOVQy7CVySkNKey0QYi2zqO8UqBUcACzmWH4B-ZpsuQ@mail.gmail.com> <70135754-84c2-b642-5641-0721e0b4690d@FreeBSD.org> <YT2PR01MB97308688D7ACB6072A20DBE8DD1B9@YT2PR01MB9730.CANPRD01.PROD.OUTLOOK.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
--_002_YT2PR01MB973039BE3072ED3F94CFE141DD1B9YT2PR01MB9730CANP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Rick Macklem <rmacklem@uoguelph.ca> wrote:=0A= > John Baldwin <jhb@FreeBSD.org> wrote:=0A= > > On 3/10/22 8:14 AM, Mateusz Guzik wrote:=0A= > > > On 3/10/22, Bjoern A. Zeeb <bzeeb-lists@lists.zabbadoz.net> wrote:=0A= > > >> Hi,=0A= > > >>=0A= > > >> I am having a weird issue with ktrace on an nfsroot machine:=0A= > > >>=0A= > > >> root:/tmp # ktrace sleep 1=0A= > > >> root:/tmp # kdump=0A= > > >> -559038242 Events dropped.=0A= > > >> kdump: bogus length 0xdeadc0de=0A= > > >>=0A= > > >> Anyone seen something like this before?=0A= > > >>=0A= > > >=0A= > > > I just did a quick check and it definitely fails on nfs mounts:=0A= > > > # ktrace pwd=0A= > > > /root/mjg=0A= > > > # kdump=0A= > > > -559038242 Events dropped.=0A= > > > kdump: bogus length 0xdeadc0de=0A= > > >=0A= > > > I don't have time to look into it this week though.=0A= > >=0A= > > Possibly related: core dumps are no longer working for me on NFS=0A= > > mounts. I get a 0 byte foo.core instead of a valid core dump.=0A= > I just tried a core dump for a kernel built from main sources as of=0A= > to-day and it worked ok.=0A= > =0A= > However my userland is several months old and I can't easily upgrade=0A= > it for now.=0A= >=0A= > There was a recent ZFS problem that found its way into 13.0-p8 that=0A= > I'm pretty sure is fixed now. If you had a fairly recent server exporting= =0A= > ZFS, that *might* explain it?=0A= > =0A= > In particular, an NFSroot uses NFSv3 and nothing has changed for=0A= > NFSv3 in a looonnggg time.=0A= Oops, I did make a change that affected NFSv3 as well as NFSv4.=0A= Last December I committed a path to head that made IO_APPEND=0A= writes use nfs_directio_write() and avoid the buffer cache.=0A= =0A= Turns out nfs_directio_write() only worked for UIO_USERSPACE.=0A= The attached trivial patch fixes ktrace for me.=0A= I have no idea if core dumping ever does IO_APPEND VOP_WRITE()s?=0A= =0A= Please test the attached patch.=0A= =0A= Thanks, rick=0A= =0A= rick=0A= =0A= --=0A= John Baldwin=0A= =0A= --_002_YT2PR01MB973039BE3072ED3F94CFE141DD1B9YT2PR01MB9730CANP_ Content-Type: application/octet-stream; name="ktrace.patch" Content-Description: ktrace.patch Content-Disposition: attachment; filename="ktrace.patch"; size=416; creation-date="Sat, 26 Mar 2022 04:03:40 GMT"; modification-date="Sat, 26 Mar 2022 04:03:41 GMT" Content-Transfer-Encoding: base64 LS0tIHN5cy9mcy9uZnNjbGllbnQvbmZzX2NsYmlvLmMuc2F2CTIwMjItMDMtMjUgMTk6MzY6NTgu MzgxNTU4MDAwIC0wNzAwCisrKyBzeXMvZnMvbmZzY2xpZW50L25mc19jbGJpby5jCTIwMjItMDMt MjUgMTk6NDQ6MTUuMzg2NDY5MDAwIC0wNzAwCkBAIC03ODAsNyArNzgwLDcgQEAgZG9fc3luYzoK IAkJCXVpby51aW9faW92Y250ID0gMTsKIAkJCXVpby51aW9fb2Zmc2V0ID0gdWlvcC0+dWlvX29m ZnNldDsKIAkJCXVpby51aW9fcmVzaWQgPSBzaXplOwotCQkJdWlvLnVpb19zZWdmbGcgPSBVSU9f VVNFUlNQQUNFOworCQkJdWlvLnVpb19zZWdmbGcgPSB1aW9wLT51aW9fc2VnZmxnOwogCQkJdWlv LnVpb19ydyA9IFVJT19XUklURTsKIAkJCXVpby51aW9fdGQgPSB0ZDsKIAkJCWlvbW9kZSA9IE5G U1dSSVRFX0ZJTEVTWU5DOwo= --_002_YT2PR01MB973039BE3072ED3F94CFE141DD1B9YT2PR01MB9730CANP_--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YT2PR01MB973039BE3072ED3F94CFE141DD1B9>