Summary: | fstat(1): /usr/bin/fstat shows error messages and hang. | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | KOIE Hidetaka <hide> | ||||
Component: | amd64 | Assignee: | freebsd-amd64 (Nobody) <amd64> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | 8.0-CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
KOIE Hidetaka
2008-05-06 12:00:04 UTC
jhb 2008-05-07 17:49:31 UTC FreeBSD src repository Modified files: usr.bin/fstat fstat.c Log: Only output details about the current working directory of a process if the vnode pointer is not NULL. This avoids spurious warnings in fstat -v output for kernel processes. MFC after: 1 week PR: amd64/123456 Submitted by: KOIE Hidetaka | hide koie.org Revision Changes Path 1.66 +2 -1 src/usr.bin/fstat/fstat.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" jhb 2008-05-07 17:55:28 UTC FreeBSD src repository Modified files: usr.bin/fstat zfs.c Log: The debug.sizeof.znode sysctl returns an int, not a size_t. This can cause a hang on 64-bit platforms. MFC after: 1 week PR: amd64/123456 Submitted by: KOIE Hidetaka | hide koie.org Revision Changes Path 1.3 +3 -2 src/usr.bin/fstat/zfs.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" jhb 2008-05-07 18:27:38 UTC FreeBSD src repository Modified files: usr.bin/fstat zfs.c Log: Fix reading the address of a znode_phys from a znode on 64-bit platforms where sizeof(pointer) != sizeof(int). MFC after: 1 week PR: amd64/123456 Submitted by: KOIE Hidetaka | hide koie.org Revision Changes Path 1.4 +3 -3 src/usr.bin/fstat/zfs.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" On Tuesday 06 May 2008 06:53:42 am KOIE Hidetaka wrote:
> >Description:
> fstat -v shows error message like this:
> can't read vnode at 0x0 for pid ***
> can't read znode_phys at 0x**** for pid ***
> unknown file type 5 for file 5 of pid ***
>
> fstat / hangs.
>
> >How-To-Repeat:
>
> >Fix:
> Patch for "can't read vnode at 0x0 for pid ***":
> vtrans() is invoked iff vp is not null.
>
> Patch for "can't read znode_phys at 0x**** for pid ***":
> znode_phys is void *, not int.
>
> Patch for "unknown file type 5 for file 5 of pid ***":
> consider other DTYPEs.
>
> Patch for hanging:
> sysctl "debug.sizeof.znode" returns int, not size_t.
I've applied all of the fixes except for the 3rd one. I think that each file
type should show up as unknown until support for it is added to fstat.
--
John Baldwin
Message-Id: <200805071429.27293.jhb@freebsd.org> Date: Wed, 7 May 2008 14:29:27 -0400 From: John Baldwin <jhb@freebsd.org> Subject: Re: amd64/123456: /usr/bin/fstat shows error messages an.. | On Tuesday 06 May 2008 06:53:42 am KOIE Hidetaka wrote: | > >Description: | > fstat -v shows error message like this: | > can't read vnode at 0x0 for pid *** | > can't read znode_phys at 0x**** for pid *** | > unknown file type 5 for file 5 of pid *** | > | > fstat / hangs. | > | > >How-To-Repeat: | > | > >Fix: | > Patch for "can't read vnode at 0x0 for pid ***": | > vtrans() is invoked iff vp is not null. | > | > Patch for "can't read znode_phys at 0x**** for pid ***": | > znode_phys is void *, not int. | > | > Patch for "unknown file type 5 for file 5 of pid ***": | > consider other DTYPEs. | > | > Patch for hanging: | > sysctl "debug.sizeof.znode" returns int, not size_t. | | I've applied all of the fixes except for the 3rd one. I think that each file | type should show up as unknown until support for it is added to fstat. Yes, any message should be showed. But, "unknown file type" impresses user-kernel version mismatch to me... -- KOIE Hidetaka <hide@koie.org> State Changed From-To: open->patched Patched in head and stable/8 (r178831, r178832 and r178833). State Changed From-To: patched->closed I think that the problem can be considered resolved and there is no reason to keep this PR open. |