Page MenuHomeFreeBSD
Feed Advanced Search

Jul 3 2023

jah added inline comments to D40600: vfs_lookup(): remove VV_CROSSLOCK logic.
Jul 3 2023, 3:09 PM

Jun 22 2023

jah updated the diff for D40600: vfs_lookup(): remove VV_CROSSLOCK logic.
  • Remove extraneous vhold()
Jun 22 2023, 5:50 PM
jah added inline comments to D40600: vfs_lookup(): remove VV_CROSSLOCK logic.
Jun 22 2023, 3:21 PM

Jun 20 2023

jah updated the diff for D40600: vfs_lookup(): remove VV_CROSSLOCK logic.
  • Return the write sequence on coveredvp to the correct place, replace
Jun 20 2023, 9:57 PM
jah added inline comments to D40600: vfs_lookup(): remove VV_CROSSLOCK logic.
Jun 20 2023, 9:23 PM

Jun 19 2023

jah added a reviewer for D40600: vfs_lookup(): remove VV_CROSSLOCK logic: olce.
Jun 19 2023, 1:30 AM
jah added a comment to D40600: vfs_lookup(): remove VV_CROSSLOCK logic.

Right now this change is just a proposal. I've successfully run the unionfs and nullfs stress2 tests against it, and have also been running it on my -current machine for the last couple of months.
Of course it's entirely possible I've missed something that would make this change unworkable. But if you guys think this approach has merit, then I'll finish this patch by doing the following:

Jun 19 2023, 1:29 AM
jah requested review of D40600: vfs_lookup(): remove VV_CROSSLOCK logic.
Jun 19 2023, 1:23 AM

May 7 2023

jah committed rG0745d837c2e9: unionfs: prevent upperrootvp from being recycled during mount (authored by jah).
unionfs: prevent upperrootvp from being recycled during mount
May 7 2023, 11:53 PM
jah committed rG356e698011b2: unionfs(): destroy root vnode if upper registration fails (authored by jah).
unionfs(): destroy root vnode if upper registration fails
May 7 2023, 11:53 PM
jah committed rG080917298512: unionfs: fixes to unionfs_nodeget() error handling (authored by jah).
unionfs: fixes to unionfs_nodeget() error handling
May 7 2023, 11:53 PM
jah closed D39767: Various fixes to unionfs error handling logic.
May 7 2023, 11:53 PM

May 6 2023

jah committed rG95e02a419224: Intel DMAR: remove parsing of 6-level paging capability (authored by jah).
Intel DMAR: remove parsing of 6-level paging capability
May 6 2023, 1:16 AM
jah committed rG651e037e2720: Intel DMAR: remove parsing of 6-level paging capability (authored by jah).
Intel DMAR: remove parsing of 6-level paging capability
May 6 2023, 1:00 AM

May 2 2023

jah closed D39896: Intel DMAR: remove parsing of 6-level paging capability.
May 2 2023, 2:09 PM
jah committed rG6f378116e9bf: Intel DMAR: remove parsing of 6-level paging capability (authored by jah).
Intel DMAR: remove parsing of 6-level paging capability
May 2 2023, 2:09 PM

May 1 2023

jah requested review of D39896: Intel DMAR: remove parsing of 6-level paging capability.
May 1 2023, 4:32 PM

Apr 24 2023

jah added inline comments to D39767: Various fixes to unionfs error handling logic.
Apr 24 2023, 12:59 AM

Apr 23 2023

jah requested review of D39767: Various fixes to unionfs error handling logic.
Apr 23 2023, 3:10 AM

Apr 18 2023

jah committed rG0c01203e4725: vfs_lookup(): re-check v_mountedhere on lock upgrade (authored by jah).
vfs_lookup(): re-check v_mountedhere on lock upgrade
Apr 18 2023, 1:37 AM
jah committed rG93fe61afde72: unionfs_mkdir(): handle dvp reclamation (authored by jah).
unionfs_mkdir(): handle dvp reclamation
Apr 18 2023, 1:37 AM
jah committed rGd711884e60bf: Remove unionfs_islocked() (authored by jah).
Remove unionfs_islocked()
Apr 18 2023, 1:37 AM
jah committed rGa5d82b55fe76: Remove an impossible condition from unionfs_lock() (authored by jah).
Remove an impossible condition from unionfs_lock()
Apr 18 2023, 1:36 AM
jah committed rGa18c403fbddb: unionfs: remove LK_UPGRADE if falling back to the standard lock (authored by jah).
unionfs: remove LK_UPGRADE if falling back to the standard lock
Apr 18 2023, 1:36 AM
jah closed D39272: unionfs: remove LK_UPGRADE if falling back to the standard lock.
Apr 18 2023, 1:36 AM

Apr 10 2023

jah accepted D39477: ASSERT_VOP_LOCKED(): restore diagnostic for the witness use case.
Apr 10 2023, 4:14 PM
jah added inline comments to D39477: ASSERT_VOP_LOCKED(): restore diagnostic for the witness use case.
Apr 10 2023, 2:27 PM

Mar 28 2023

jah updated the diff for D39272: unionfs: remove LK_UPGRADE if falling back to the standard lock.
  • vfs_lookup(): re-check v_mountedhere on lock upgrade
Mar 28 2023, 6:14 PM
jah added a comment to D39272: unionfs: remove LK_UPGRADE if falling back to the standard lock.
In D39272#894822, @jah wrote:
In D39272#894669, @pho wrote:

I ran into this problem:

Fatal trap 12: page fault while in kernel mode
cpuid = 2; apic id = 02
fault virtual address	= 0x10
fault code		= supervisor read data, page not present
instruction pointer	= 0x20:0xffffffff82753417
stack pointer	        = 0x0:0xfffffe01438a8a80
frame pointer	        = 0x0:0xfffffe01438a8aa0
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 2382 (find)
rdi: fffffe015b22d700 rsi:            82000 rdx: fffffe01438a8ad8
rcx:                1  r8:              246  r9:            40000
rax:                0 rbx: fffffe015b22d700 rbp: fffffe01438a8aa0
r10:                1 r11:                0 r12:            80000
r13: fffffe01599802c0 r14: fffffe01438a8ad8 r15:            82000
trap number		= 12
panic: page fault
cpuid = 2
time = 1679981682
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01438a8840
vpanic() at vpanic+0x152/frame 0xfffffe01438a8890
panic() at panic+0x43/frame 0xfffffe01438a88f0
trap_fatal() at trap_fatal+0x409/frame 0xfffffe01438a8950
trap_pfault() at trap_pfault+0xab/frame 0xfffffe01438a89b0
calltrap() at calltrap+0x8/frame 0xfffffe01438a89b0
--- trap 0xc, rip = 0xffffffff82753417, rsp = 0xfffffe01438a8a80, rbp = 0xfffffe01438a8aa0 ---
unionfs_root() at unionfs_root+0x17/frame 0xfffffe01438a8aa0
vfs_lookup() at vfs_lookup+0x92a/frame 0xfffffe01438a8b40
namei() at namei+0x340/frame 0xfffffe01438a8bc0
kern_statat() at kern_statat+0x12f/frame 0xfffffe01438a8d00
sys_fstatat() at sys_fstatat+0x2f/frame 0xfffffe01438a8e00
amd64_syscall() at amd64_syscall+0x15a/frame 0xfffffe01438a8f30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01438a8f30
--- syscall (552, FreeBSD ELF64, fstatat), rip = 0x1e9fa9c98, rbp = 0x1e9fa1989db0 ---

https://people.freebsd.org/~pho/stress/log/log0429.txt

PS
The BIOS and IPMI firmware was just updated on this test box, but the page fault seems legit to me?

Hmm. I'm probably missing something, but on initial investigation the panic doesn't seem to make sense.
It really looks as though unionfs_root() is seeing a partially constructed mount object: mp has the unionfs ops vector, but mnt_data is NULL (thus the page fault) and the stat object's fsid is 0.
This is consistent with the mount object state that would exist partway through unionfs_domount(), or if unionfs_domount() failed due to failure of unionfs_nodeget() or vfs_register_upper_from_vp(). There is another thread that appears to be partway through unionfs_domount(), and mp's busy count (mnt_lockref) of 2 is consistent with these 2 threads.
What doesn't make sense is how vfs_lookup() could observe a mount object in this state in the first place; vfs_domount_first() doesn't set coveredvp->v_mountedhere until after successful completion of VFS_MOUNT(), and it does so with coveredvp locked exclusive to avoid racing vfs_lookup().

Some things to note:
--Besides a couple of added comments, this is the same patch you tested successfully at the end of January.
--Since then, I have found a couple of bugs in the cleanup logic in unionfs_domount() and unionfs_nodeget(), which I'll post in a separate review after this one, but I don't think they would explain this behavior.
--There does appear to be a third thread calling dounmount() and blocked on an FFS lock, but it's unclear if that has any impact on the crash.

Mar 28 2023, 6:02 PM
jah added a comment to D39272: unionfs: remove LK_UPGRADE if falling back to the standard lock.
In D39272#894669, @pho wrote:

I ran into this problem:

Fatal trap 12: page fault while in kernel mode
cpuid = 2; apic id = 02
fault virtual address	= 0x10
fault code		= supervisor read data, page not present
instruction pointer	= 0x20:0xffffffff82753417
stack pointer	        = 0x0:0xfffffe01438a8a80
frame pointer	        = 0x0:0xfffffe01438a8aa0
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 2382 (find)
rdi: fffffe015b22d700 rsi:            82000 rdx: fffffe01438a8ad8
rcx:                1  r8:              246  r9:            40000
rax:                0 rbx: fffffe015b22d700 rbp: fffffe01438a8aa0
r10:                1 r11:                0 r12:            80000
r13: fffffe01599802c0 r14: fffffe01438a8ad8 r15:            82000
trap number		= 12
panic: page fault
cpuid = 2
time = 1679981682
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01438a8840
vpanic() at vpanic+0x152/frame 0xfffffe01438a8890
panic() at panic+0x43/frame 0xfffffe01438a88f0
trap_fatal() at trap_fatal+0x409/frame 0xfffffe01438a8950
trap_pfault() at trap_pfault+0xab/frame 0xfffffe01438a89b0
calltrap() at calltrap+0x8/frame 0xfffffe01438a89b0
--- trap 0xc, rip = 0xffffffff82753417, rsp = 0xfffffe01438a8a80, rbp = 0xfffffe01438a8aa0 ---
unionfs_root() at unionfs_root+0x17/frame 0xfffffe01438a8aa0
vfs_lookup() at vfs_lookup+0x92a/frame 0xfffffe01438a8b40
namei() at namei+0x340/frame 0xfffffe01438a8bc0
kern_statat() at kern_statat+0x12f/frame 0xfffffe01438a8d00
sys_fstatat() at sys_fstatat+0x2f/frame 0xfffffe01438a8e00
amd64_syscall() at amd64_syscall+0x15a/frame 0xfffffe01438a8f30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01438a8f30
--- syscall (552, FreeBSD ELF64, fstatat), rip = 0x1e9fa9c98, rbp = 0x1e9fa1989db0 ---

https://people.freebsd.org/~pho/stress/log/log0429.txt

PS
The BIOS and IPMI firmware was just updated on this test box, but the page fault seems legit to me?

Mar 28 2023, 4:53 PM

Mar 26 2023

jah added a comment to D39272: unionfs: remove LK_UPGRADE if falling back to the standard lock.
In D39272#894131, @kib wrote:

For VOP_MKDIR() change. Please note that almost any VOP modifying metadata could drop the vnode lock. The list is like VOP_CREAT(), VOP_LINK(), VOP_REMOVE(), VOP_WHITEOUT(), VOP_RMDIR(), VOP_MAKEINODE(), VOP_RENAME().

Mar 26 2023, 4:36 PM
jah requested review of D39272: unionfs: remove LK_UPGRADE if falling back to the standard lock.
Mar 26 2023, 2:59 AM

Feb 10 2023

jah committed R9:1b871ad54ae1: Very belatedly add my PGP key (authored by jah).
Very belatedly add my PGP key
Feb 10 2023, 8:41 PM

Jan 19 2023

jah committed rG5a4a83fd0e67: Improve debuggability of VOP_* locking assertions (authored by jah).
Improve debuggability of VOP_* locking assertions
Jan 19 2023, 3:59 AM
jah closed D38091: Improve debuggability of VOP_* locking assertions.
Jan 19 2023, 3:59 AM

Jan 16 2023

jah added a comment to D38091: Improve debuggability of VOP_* locking assertions.
In D38091#865308, @kib wrote:

Could you please show an example of the new output?

Jan 16 2023, 10:03 PM
jah requested review of D38091: Improve debuggability of VOP_* locking assertions.
Jan 16 2023, 9:41 PM

Dec 11 2022

jah committed rG0ef861e6f4dd: nullfs: adopt VV_CROSSLOCK (authored by jah).
nullfs: adopt VV_CROSSLOCK
Dec 11 2022, 3:49 AM
jah committed rG5cec725cd32a: unionfs: allow recursion on covered vnode lock during mount/unmount (authored by jah).
unionfs: allow recursion on covered vnode lock during mount/unmount
Dec 11 2022, 3:49 AM
jah committed rG42442d7a6eeb: Generalize the VV_CROSSLOCK logic in vfs_lookup() (authored by jah).
Generalize the VV_CROSSLOCK logic in vfs_lookup()
Dec 11 2022, 3:49 AM
jah closed D37458: Various fixes related to VV_CROSSLOCK handling.
Dec 11 2022, 3:49 AM

Nov 22 2022

jah updated the diff for D37458: Various fixes related to VV_CROSSLOCK handling.

Style

Nov 22 2022, 10:30 PM
jah added inline comments to D37458: Various fixes related to VV_CROSSLOCK handling.
Nov 22 2022, 7:12 PM
jah added inline comments to D37458: Various fixes related to VV_CROSSLOCK handling.
Nov 22 2022, 7:08 PM
jah added inline comments to D37458: Various fixes related to VV_CROSSLOCK handling.
Nov 22 2022, 4:00 AM
jah requested review of D37458: Various fixes related to VV_CROSSLOCK handling.
Nov 22 2022, 3:54 AM

Oct 29 2022

jah accepted D37198: vfs_domount(): ensure that v_mountedhere and VIRF_MOUNTPOINT are set under the vnode lock.
Oct 29 2022, 12:04 AM

Oct 28 2022

jah accepted D37198: vfs_domount(): ensure that v_mountedhere and VIRF_MOUNTPOINT are set under the vnode lock.
Oct 28 2022, 4:47 PM
jah added inline comments to D37198: vfs_domount(): ensure that v_mountedhere and VIRF_MOUNTPOINT are set under the vnode lock.
Oct 28 2022, 3:44 PM
jah accepted D37198: vfs_domount(): ensure that v_mountedhere and VIRF_MOUNTPOINT are set under the vnode lock.
Oct 28 2022, 3:32 PM
jah added a comment to D37198: vfs_domount(): ensure that v_mountedhere and VIRF_MOUNTPOINT are set under the vnode lock.

Oops, I didn't realize that the mount path doesn't hold the covered vnode lock while updating the relevant fields.
It looks as though the unmount path does hold the lock across the relevant operations, so we should be safe from these fields being cleared out from under us, correct?
Would it make sense to add a comment here to that effect?

Oct 28 2022, 3:31 PM

Oct 27 2022

jah committed rGf7833196bd6b: vfs_lookup(): Minor performance optimizations (authored by jah).
vfs_lookup(): Minor performance optimizations
Oct 27 2022, 12:25 AM
jah committed rG4390622c8d16: vfs_busy(): fix wording in comment (authored by jah).
vfs_busy(): fix wording in comment
Oct 27 2022, 12:25 AM
jah committed rG706f15c5fa6b: Remove witness directives from crossmp locking VOPs (authored by jah).
Remove witness directives from crossmp locking VOPs
Oct 27 2022, 12:25 AM
jah committed rG080ef8a41851: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR (authored by jah).
Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR
Oct 27 2022, 12:25 AM
jah closed D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.
Oct 27 2022, 12:24 AM

Oct 21 2022

jah added a comment to D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.

Apologies for letting this review stall, $WORK got in the way in a big way for a while.
I've rebased, incorporated some of @mjg's optimization suggestions, and retested.

Oct 21 2022, 3:46 AM
jah updated the diff for D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.

Fix wording in comment, incoporate some suggested performance optimizations

Oct 21 2022, 3:43 AM

Sep 21 2022

jah accepted D36625: Improve POSIX compliance for RLIMIT_FSIZE.
Sep 21 2022, 5:00 PM

Aug 13 2022

jah updated the diff for D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.

Style

Aug 13 2022, 5:08 AM

Aug 5 2022

jah updated the diff for D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.

Remove remaining WITNESS directives and no-longer used variables

Aug 5 2022, 5:49 AM

Jul 29 2022

jah accepted D35946: multimedia/cx88: Remove devclass from DRIVER_MODULE on recent main..
Jul 29 2022, 4:09 AM

Jul 27 2022

jah added inline comments to D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.
Jul 27 2022, 3:56 AM
jah added a comment to D35946: multimedia/cx88: Remove devclass from DRIVER_MODULE on recent main..

Is the idea here to proactively update the DRIVER_MODULE because the devclass compat shims will be removed in a future version, or was there some build error on 14?

Jul 27 2022, 3:50 AM

Jul 25 2022

jah added inline comments to D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.
Jul 25 2022, 3:41 AM
jah updated the diff for D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.
  • Fix typo, restore support for LK_INTERLOCK on vp_crossmp
Jul 25 2022, 3:34 AM

Jul 20 2022

jah added inline comments to D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.
Jul 20 2022, 9:27 PM
jah added inline comments to D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.
Jul 20 2022, 9:22 PM

Jul 19 2022

jah updated the diff for D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.
  • Replace runtime check with KASSERT, add comment on CROSSLOCK behavior
Jul 19 2022, 6:02 PM

Jun 28 2022

jah accepted D35638: UFS quotaoff: start write before unbusying.
Jun 28 2022, 10:09 PM

Jun 14 2022

jah accepted D35477: null_vptocnp(): busy nullfs mp instead of refing it.
Jun 14 2022, 5:39 AM

Jun 10 2022

jah committed R11:88aef5f532d0: multimedia/cx88: update to 1.5.4 (authored by jah).
multimedia/cx88: update to 1.5.4
Jun 10 2022, 3:44 AM

May 15 2022

jah added inline comments to D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.
May 15 2022, 2:49 AM

Apr 26 2022

jah added inline comments to D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.
Apr 26 2022, 12:00 AM

Apr 25 2022

jah added a comment to D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.

I don't really like this change, it feels like a hack to me. At the same time, I don't have another idea that seems clearly better, so I thought I would post this to at least start a discussion.

Apr 25 2022, 3:57 AM
jah requested review of D35054: Add VV_CROSSLOCK vnode flag to avoid cross-mount lookup LOR.
Apr 25 2022, 3:50 AM

Mar 9 2022

jah added inline comments to D34466: shared-locked lookup for ".." on nullfs.
Mar 9 2022, 5:33 PM

Feb 26 2022

jah accepted D34381: rmlock: Add required compiler barriers to _rm_runlock().
Feb 26 2022, 6:26 PM
jah added inline comments to D34381: rmlock: Add required compiler barriers to _rm_runlock().
Feb 26 2022, 12:20 AM

Feb 25 2022

jah accepted D34377: rmlock: Micro-optimize read locking.
Feb 25 2022, 5:15 PM

Feb 24 2022

jah committed rGfcb164742b6f: unionfs: rework unionfs_getwritemount() (authored by jah).
unionfs: rework unionfs_getwritemount()
Feb 24 2022, 4:01 AM
jah closed D34282: unionfs: rework unionfs_getwritemount().
Feb 24 2022, 4:01 AM

Feb 18 2022

jah updated the diff for D34282: unionfs: rework unionfs_getwritemount().

prune whitespace

Feb 18 2022, 4:52 AM
jah updated the diff for D34282: unionfs: rework unionfs_getwritemount().

Remove unnecessary MNT_RDONLY check

Feb 18 2022, 4:51 AM

Feb 17 2022

jah updated the diff for D34282: unionfs: rework unionfs_getwritemount().

Return EACCES if we can't find a suitable upper vnode; add comments and assertion

Feb 17 2022, 8:33 PM

Feb 16 2022

jah added inline comments to D34282: unionfs: rework unionfs_getwritemount().
Feb 16 2022, 7:39 PM
jah added inline comments to D34282: unionfs: rework unionfs_getwritemount().
Feb 16 2022, 5:06 PM
jah added inline comments to D34282: unionfs: rework unionfs_getwritemount().
Feb 16 2022, 2:35 AM

Feb 15 2022

jah added inline comments to D34282: unionfs: rework unionfs_getwritemount().
Feb 15 2022, 8:41 PM
jah added inline comments to D34282: unionfs: rework unionfs_getwritemount().
Feb 15 2022, 8:39 PM
jah added inline comments to D34282: unionfs: rework unionfs_getwritemount().
Feb 15 2022, 7:43 PM
jah added inline comments to D34282: unionfs: rework unionfs_getwritemount().
Feb 15 2022, 4:01 AM
jah updated the summary of D34282: unionfs: rework unionfs_getwritemount().
Feb 15 2022, 3:55 AM
jah added inline comments to D34282: unionfs: rework unionfs_getwritemount().
Feb 15 2022, 3:48 AM
jah requested review of D34282: unionfs: rework unionfs_getwritemount().
Feb 15 2022, 3:45 AM

Feb 10 2022

jah committed rG974efbb3d5c0: unionfs: fix typo in comment (authored by jah).
unionfs: fix typo in comment
Feb 10 2022, 9:10 PM

Feb 3 2022

jah committed rG83d61d5b7300: unionfs: do not force LK_NOWAIT if VI_OWEINACT is set (authored by jah).
unionfs: do not force LK_NOWAIT if VI_OWEINACT is set
Feb 3 2022, 2:59 AM
jah committed rG6ff167aa427c: unionfs: allow lock recursion when reclaiming the root vnode (authored by jah).
unionfs: allow lock recursion when reclaiming the root vnode
Feb 3 2022, 2:59 AM
jah committed rG0cd8f3e958a5: unionfs: fix assertion order in unionfs_lock() (authored by jah).
unionfs: fix assertion order in unionfs_lock()
Feb 3 2022, 2:59 AM
jah closed D34109: assorted small fixes to unionfs_lock().
Feb 3 2022, 2:58 AM