Page MenuHomeFreeBSD

asomers (Alan Somers)
User

Projects

User Details

User Since
May 9 2014, 11:04 PM (613 w, 4 d)

Recent Activity

Today

asomers added inline comments to D55230: fusefs: redo vnode attribute locking.
Wed, Feb 11, 1:40 PM

Yesterday

asomers updated the diff for D55230: fusefs: redo vnode attribute locking.
  • Respond to markj's comments
Tue, Feb 10, 11:28 PM
asomers added inline comments to D55230: fusefs: redo vnode attribute locking.
Tue, Feb 10, 11:28 PM
asomers added a comment to D55047: fuse: Do not unconditionally overwrite local vnode size with remote.

The odd thing here is that VOP_WRITE should always be called with the vnode exclusively locked. So it shouldn't be possible for it to race with a separate operation, like VOP_READ, that might call fuse_internal_cache_attrs . Do you have a stack trace for either thread involved with this race?

Tue, Feb 10, 9:59 PM
asomers added a comment to D55047: fuse: Do not unconditionally overwrite local vnode size with remote.

This looks like a real problem. But how did you find it? Was it just virtio-fs, or did you find it with a regular fuse file system too? If either case, do you know if FUSE_ASYNC_READ was set? And do you know what values are typically used for the entry and attribute cache?

Tue, Feb 10, 9:57 PM
asomers added a comment to D55145: fusefs: Fix vnode lock mismatch in fuse_internal_do_getattr().

See https://reviews.freebsd.org/D55230 for a more complete solution.

Tue, Feb 10, 9:47 PM
asomers requested review of D55231: fusefs: remove the obsolete rename_lock.
Tue, Feb 10, 8:48 PM
asomers requested review of D55230: fusefs: redo vnode attribute locking.
Tue, Feb 10, 8:27 PM

Sat, Feb 7

asomers added a comment to D55167: cp: Expect EINTR while copying.

The reproducing case is timing dependent. I came up with the discrepancy when a user on the forums interrupted a cp operation with a du and cp bailed out.

Do you at least know what fuse file system he was using, and what options it was mounted with?

NTFS. I just asked the user for flags.

Sat, Feb 7, 5:55 PM
asomers added a comment to D55167: cp: Expect EINTR while copying.

The reproducing case is timing dependent. I came up with the discrepancy when a user on the forums interrupted a cp operation with a du and cp bailed out.

Sat, Feb 7, 5:44 PM
asomers added a comment to D55167: cp: Expect EINTR while copying.

This is probably correct. However, I'd like to see two other things:

  • A reproduction case
  • An audit of the rest of the base system for other utilities that make the same mistake, like install(1).
Sat, Feb 7, 5:40 PM
asomers added inline comments to D55153: pwd: Add tests.
Sat, Feb 7, 3:43 PM
asomers added a comment to D19407: Port openrsync to FreeBSD using capsicum.

FYI I've proposed a GSoC project to capsicumize the fts(3) family of functions. That would enable finishing the OpenRsync port.
https://wiki.freebsd.org/SummerOfCodeIdeas?highlight=%28fts_open%29#Capsciumize_fts.283.29

Sat, Feb 7, 3:35 PM
asomers added a comment to D55056: fusefs: Take mnt_ref when mounting.

I have no idea what is double-release.

Sat, Feb 7, 3:27 PM

Fri, Feb 6

asomers abandoned D54850: fusefs: fix a vnode locking bug during VOP_READ.

I'm going to reopen this in a few days, rebased and with a different approach.

Fri, Feb 6, 9:50 PM
asomers added a comment to D55145: fusefs: Fix vnode lock mismatch in fuse_internal_do_getattr().

Sure i can close this diff.

But can you tell me what won't work ? I use 16-Current and have INVARIANTS

Fri, Feb 6, 7:19 PM
asomers added a comment to D55056: fusefs: Take mnt_ref when mounting.

I'm not very confident in this area, but I think arrowd's latest patch should work. But to check for double-releases, he should add this patch to the test suite:

diff --git a/tests/sys/fs/fusefs/destroy.cc b/tests/sys/fs/fusefs/destroy.cc
index 0c8e2fd22a50..b3e7f8bc5fff 100644
--- a/tests/sys/fs/fusefs/destroy.cc
+++ b/tests/sys/fs/fusefs/destroy.cc
@@ -136,6 +136,17 @@ TEST_F(AutoUnmount, dup)
        assert_unmounted();
 }
Fri, Feb 6, 6:40 PM
asomers added a comment to D55145: fusefs: Fix vnode lock mismatch in fuse_internal_do_getattr().

Thanks for your attention in this area. As a matter of fact, I've been working on this exact same problem. My first attempt at a solution was close to this one, but ultimately it won't work. Today I'm going to try a different solution, based on mutex protection rather than the vnode lock. I'll update Bugzilla when I have a working patch, so you can subscribe to this bug to find out.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283391

Fri, Feb 6, 5:40 PM

Mon, Feb 2

asomers added a comment to D55047: fuse: Do not unconditionally overwrite local vnode size with remote.

Interesting find. I'll review this next week, after I'm home from vacation.

Mon, Feb 2, 1:22 AM
asomers added a comment to D55046: fuse: Ensure fuse_internal_cache_attrs() is called with exclusive lock.

Thanks for working on this! I was actually working on the exact same problem myself last week. And I came up with a very similar solution. But then I realized that it wouldn't work :( . The cached attrs also need to be modified in paths where the vnode lock cannot be upgraded. So my plan is to add a mutex just to protect them. I started work on it last week. But now I'm on vacation, so I can't resume work for a few more days. But thanks for your interest in fuse.

Mon, Feb 2, 1:21 AM

Sat, Jan 31

asomers committed rGdf68a09ea2ec: tests: sys/capsicum/functional requires mqueuefs (authored by asomers).
tests: sys/capsicum/functional requires mqueuefs
Sat, Jan 31, 3:47 PM
asomers closed D54902: tests: sys/capsicum/functional requires mqueuefs.
Sat, Jan 31, 3:47 PM

Fri, Jan 30

asomers added a comment to D54985: capsicum-tests: remove Linux support.

It was not my intention to enable new tests in this commit, but I accidentally enabled the Sctp test. It probably should've been enabled before, but never was. And it works fine now.

Fri, Jan 30, 10:11 PM
asomers requested review of D54985: capsicum-tests: remove Linux support.
Fri, Jan 30, 10:05 PM

Thu, Jan 29

asomers accepted D54938: geom: Convert err/warn() to xo_err/warn() and style(9) fixes .

It looks good to me. And I see that with --libxo=json, these errors append a {}. Are there any other cases where they do something differently than err?

Thu, Jan 29, 8:50 PM

Tue, Jan 27

asomers accepted D54917: capsicum-test: Move out of contrib.

I agree with Ed on all of these points.

Tue, Jan 27, 9:53 PM
asomers requested review of D54902: tests: sys/capsicum/functional requires mqueuefs.
Tue, Jan 27, 12:08 AM

Mon, Jan 26

asomers accepted D54864: contrib/googletest: update from 1.15.2 to 1.17.0.

As long as the existing test suites pass, I'm happy.

Mon, Jan 26, 11:52 PM
asomers accepted D54899: libc: document posix_spawnattr_{get,set}procdescp_np(3).
Mon, Jan 26, 9:23 PM
asomers committed rG6253212608b4: Add pdrfork to OpenBSM (authored by asomers).
Add pdrfork to OpenBSM
Mon, Jan 26, 9:04 PM
asomers closed D54897: Add pdrfork to OpenBSM.
Mon, Jan 26, 9:04 PM
asomers added a comment to D54897: Add pdrfork to OpenBSM.
In D54897#1255061, @kib wrote:

I think this is fine, and I have this change in some intermediate version of the patch.
But then I noted that e.g. inotify(2) is not there (unless I mistaken), so I decided that it is up to upstream to add missed syscalls, and then import a new version.
You might add inotify as well while there.

Mon, Jan 26, 9:02 PM
asomers requested changes to D54899: libc: document posix_spawnattr_{get,set}procdescp_np(3).

I suggest a few wording changes. Also, fork->vfork, pdfork->pdrfork, and execfd->procdescp.

Mon, Jan 26, 8:42 PM
asomers requested review of D54897: Add pdrfork to OpenBSM.
Mon, Jan 26, 7:13 PM
asomers accepted D54879: Add posix_spawnattr_{get,set}procdescp_np(3).

I didn't read the assembly code (I haven't had to write x86 assembly since University), but otherwise it looks good to me. And thanks for adding the P686 example, too.

Mon, Jan 26, 6:25 PM
asomers committed rG277539ae7f2f: Add tests for pdwait (authored by asomers).
Add tests for pdwait
Mon, Jan 26, 2:38 PM
asomers committed rGd1e6057fa47e: Add tests for pdrfork (authored by asomers).
Add tests for pdrfork
Mon, Jan 26, 2:38 PM
asomers committed rGe35df41f6891: procdesc: Add a test for pid recycling behavior (authored by asomers).
procdesc: Add a test for pid recycling behavior
Mon, Jan 26, 2:38 PM

Sat, Jan 24

asomers committed rG52ddca7c2e33: fusefs: style (authored by asomers).
fusefs: style
Sat, Jan 24, 4:05 PM
asomers committed rGffb747d587bf: fusefs: Add tests for the new -o auto_unmount feature (authored by asomers).
fusefs: Add tests for the new -o auto_unmount feature
Sat, Jan 24, 4:05 PM

Fri, Jan 23

asomers added a comment to D54850: fusefs: fix a vnode locking bug during VOP_READ.
In D54850#1253849, @kib wrote:

Is this the only place where the update of the cache under the shared vnode lock occurs?
Or even better, can you point me to the single entry point of the cache update code?

Fri, Jan 23, 9:50 PM
asomers requested review of D54850: fusefs: fix a vnode locking bug during VOP_READ.
Fri, Jan 23, 9:32 PM

Wed, Jan 21

asomers accepted D53086: fusefs: kernel-based implementation of auto_unmount.

Approved, but don't forget to bump the man page's .Dd date.

Wed, Jan 21, 4:45 PM

Tue, Jan 20

asomers committed rG1ad466ca8385: netstat: fix a segfault with --libxo (authored by asomers).
netstat: fix a segfault with --libxo
Tue, Jan 20, 10:32 PM
asomers committed rG46a760e578f5: gpart: "gpart --libxo:JP list" duplicates attribute keys (authored by asomers).
gpart: "gpart --libxo:JP list" duplicates attribute keys
Tue, Jan 20, 10:32 PM
asomers committed rGb6533f67c399: fusefs: Fix further intermittency in the BadServer.ShortWrite test case (authored by asomers).
fusefs: Fix further intermittency in the BadServer.ShortWrite test case
Tue, Jan 20, 10:32 PM
asomers committed rGb3647e2a408e: netstat: fix a segfault with --libxo (authored by asomers).
netstat: fix a segfault with --libxo
Tue, Jan 20, 5:16 PM
asomers committed rG3b5c296fa151: fusefs: Fix further intermittency in the BadServer.ShortWrite test case (authored by asomers).
fusefs: Fix further intermittency in the BadServer.ShortWrite test case
Tue, Jan 20, 5:15 PM
asomers committed rG3b44f04225bc: gpart: "gpart --libxo:JP list" duplicates attribute keys (authored by asomers).
gpart: "gpart --libxo:JP list" duplicates attribute keys
Tue, Jan 20, 5:14 PM
asomers accepted D54592: Add pdrfork(2) and pdwait(2).
Tue, Jan 20, 3:16 PM
asomers requested changes to D54592: Add pdrfork(2) and pdwait(2).
Tue, Jan 20, 2:48 PM
asomers added inline comments to D54592: Add pdrfork(2) and pdwait(2).
Tue, Jan 20, 2:03 PM
asomers requested changes to D54592: Add pdrfork(2) and pdwait(2).

Thanks for writing the man page too. I've made a few comments, mostly to make the English more grammatical and idiomatic.

Tue, Jan 20, 1:21 PM
asomers accepted D54592: Add pdrfork(2) and pdwait(2).

This looks great, @kib! If you commit it, I'll follow up with the test suite. A few questions:

Tue, Jan 20, 1:12 AM
asomers requested changes to D53086: fusefs: kernel-based implementation of auto_unmount.

Wow! This looks much simpler than the original userspace-based implementation. I like it. I wrote some tests, too. I can commit those separately if you like, after you commit the main code. The only thing that's missing is a mention of the new option in mount_fusefs.8 . Could you please add that?

Tue, Jan 20, 12:20 AM

Mon, Jan 19

asomers accepted D54518: Account for the ctl test needing the ctl(4) module.
Mon, Jan 19, 7:02 PM
asomers added a comment to D54592: Add pdrfork(2) and pdwait(2).

I'm afraid that with this latest patch, I get an instapanic on boot in pid 1.

Mon, Jan 19, 6:17 PM

Wed, Jan 14

asomers abandoned D54717: committers-src: fix typo.

Sorry, you're right @jlduran , as js just informed me elsewhere. My source tree was out of date. Sorry for the noise.

Wed, Jan 14, 5:54 PM
asomers requested review of D54717: committers-src: fix typo.
Wed, Jan 14, 5:23 PM
asomers accepted D54715: committers-src: add myself (js@) with asomers as mentor.
Wed, Jan 14, 5:17 PM
asomers accepted D54709: netstat: Remove padding from cc and stack fields.
Wed, Jan 14, 5:00 PM
asomers added a comment to D54592: Add pdrfork(2) and pdwait(2).

I had to build an aarch64 VM just to test the RFSPAWN change, but it works now. It probably works on amd64 too, but I can't test it without writing assembly code.

Wed, Jan 14, 12:49 AM

Jan 8 2026

asomers updated the diff for D54592: Add pdrfork(2) and pdwait(2).

Add test cases

Jan 8 2026, 11:05 PM
asomers added a comment to D54592: Add pdrfork(2) and pdwait(2).

The new syscalls mostly work nicely. I've just found a few bugs. In addition to my inline comments, pdwait never returns a pid. It always returns 0. Is that deliberate? Also, it's unclear to me when a child ought to be reaped. I would think that it should be reaped as soon as pdwait or waitpid returns it (though the pid shouldn't be recycled until the process descriptor is closed). However, I'm seeing that the child doesn't get reaped until close(). That is, pdwait() will return the process multiple times, as if WNOWAIT were set. Is that deliberate?

Jan 8 2026, 11:03 PM
asomers committed R11:7be1ca542e07: shells/fish: fix the build with DOCS=OFF after 4.3.3 (authored by asomers).
shells/fish: fix the build with DOCS=OFF after 4.3.3
Jan 8 2026, 7:31 PM
asomers added a comment to D54592: Add pdrfork(2) and pdwait(2).

Rather than add a new syscall for pdwait, what would you say to adding another idtype for waitid and wait6? We already have those syscalls, and their existing interface nicely allows for different kinds of ids. We would just need to add a P_PIDFD idtype value. That's also what Linux does.

Jan 8 2026, 4:24 PM

Jan 7 2026

asomers committed R11:2eb572527994: shells/fish: 4.3.3 (authored by asomers).
shells/fish: 4.3.3
Jan 7 2026, 8:36 PM
asomers committed rG3b6615ec0332: netstat: fix a segfault with --libxo (authored by asomers).
netstat: fix a segfault with --libxo
Jan 7 2026, 2:35 PM
asomers closed D54567: netstat: fix a segfault with --libxo.
Jan 7 2026, 2:35 PM
asomers updated the diff for D54567: netstat: fix a segfault with --libxo.
  • Style, suggested by des@
  • Fix the encoded width of tcp-state, suggested by @des
Jan 7 2026, 1:41 PM

Jan 6 2026

asomers requested review of D54567: netstat: fix a segfault with --libxo.
Jan 6 2026, 10:23 PM

Jan 5 2026

asomers accepted D54536: sesutil: Remove width limiter on encoded "Desc" field.

LGTM. But you should wrap the long line in your commit message . And add something to the commit message indicating that the problem is with the "show" subcommand.

Jan 5 2026, 8:18 PM
asomers added a comment to D54536: sesutil: Remove width limiter on encoded "Desc" field.

I can't reproduce this behavior with "sesutil map --libxo=json,pretty". What is the right way to trigger the bug?

Jan 5 2026, 7:48 PM

Dec 31 2025

asomers added inline comments to D54426: makefs: tests: Improve ZFS perms test.
Dec 31 2025, 3:32 PM
asomers accepted D54425: makefs: tests: Double the timeout of ZFS file_extend test.

Again, 300s -> 400s is not much of an increase. Might want to go more.

Dec 31 2025, 3:31 PM
asomers accepted D54424: makefs: tests: Double the timeout of ZFS compression test.

This looks fine. But as the default timeout is already 300s, I suggest increasing it even more. If it were me, I would double it.

Dec 31 2025, 3:30 PM

Dec 22 2025

asomers added a comment to D54342: Note that __FreeBSD_version 1600005 also includes a ZFS change.

Is it kosher to have two gitrefs in one entry?

Dec 22 2025, 9:35 PM
asomers requested review of D54342: Note that __FreeBSD_version 1600005 also includes a ZFS change.
Dec 22 2025, 9:35 PM
asomers committed R11:28c3a79a6e9d: filesystems:py-libzfs: fix the build on FreeBSD 16 (authored by asomers).
filesystems:py-libzfs: fix the build on FreeBSD 16
Dec 22 2025, 9:28 PM
asomers committed rGf51e9d0e0988: fusefs: Fix further intermittency in the BadServer.ShortWrite test case (authored by asomers).
fusefs: Fix further intermittency in the BadServer.ShortWrite test case
Dec 22 2025, 5:19 PM
asomers closed D54331: fusefs: Fix further intermittency in the BadServer.ShortWrite test case.
Dec 22 2025, 5:18 PM

Dec 21 2025

asomers added a comment to D53357: fusefs: Fix intermittency in the BadServer.ShortWrite test case.
In D53357#1241293, @guest-svmhdvn wrote:

Sorry to bring this back, but I'm noticing intermittency again on latest 16-CURRENT HEAD. I can reproduce it locally on amd64, and I'm seeing it fail on aarch64 in jenkins with the same result: https://ci.freebsd.org/view/Test/job/FreeBSD-main-aarch64-test/1857/testReport/sys.fs.fusefs/bad_server/main/

I needed a large count (at least 500+ iterations on my local system) to reproduce it:

$ bricoler run freebsd-src-regression-suite --param freebsd-src:url=/usr/src --param freebsd-src:branch= --param freebsd-src-regression-suite:hypervisor=bhyve --param freebsd-src-regression-suite:memory=4096 --param freebsd-src-regression-suite:ncpus=2 --param freebsd-src-regression-suite:parallelism=1 --param freebsd-src-regression-suite:count=600 --param freebsd-src-regression-suite:tests='sys/fs/fusefs/bad_server:main'

Standard output:
[==========] Running 3 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 3 tests from BadServer
[ RUN      ] BadServer.UnknownUnique
[       OK ] BadServer.UnknownUnique (1 ms)
[ RUN      ] BadServer.ShortWrite
/home/siva/src/fbsdsrcgit/tests/sys/fs/fusefs/mockfs.cc:987: Failure
Value of: res >= static_cast<ssize_t>(sizeof(in.header)) || m_quit
  Actual: false
Expected: true

[  FAILED  ] BadServer.ShortWrite (0 ms)
[ RUN      ] BadServer.ErrorWithPayload
[       OK ] BadServer.ErrorWithPayload (0 ms)
[----------] 3 tests from BadServer (2 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test suite ran. (2 ms total)
[  PASSED  ] 2 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] BadServer.ShortWrite

 1 FAILED TEST
===> Failed tests
sys/fs/fusefs/bad_server:main  ->  failed: Returned non-success exit status 1  [0.006s]

@asomers could you try to reproduce?

Dec 21 2025, 3:35 PM
asomers requested review of D54331: fusefs: Fix further intermittency in the BadServer.ShortWrite test case.
Dec 21 2025, 3:34 PM

Dec 16 2025

asomers added a member for committers: js.
Dec 16 2025, 5:57 PM
asomers accepted D54256: new committer (src): Johan Söllvander (js).

LGTM, but you should also create a real Phabricator account now.

Dec 16 2025, 2:55 PM

Dec 15 2025

asomers committed R9:714d9ddb5d89: Update my PGP key with its new expiration date. (authored by asomers).
Update my PGP key with its new expiration date.
Dec 15 2025, 8:37 PM

Dec 12 2025

asomers committed R11:294e82e8243e: sysutils/gstat-rs: 0.1.7 (authored by asomers).
sysutils/gstat-rs: 0.1.7
Dec 12 2025, 4:54 PM

Dec 10 2025

asomers committed rGa0347b0f3a60: gpart: "gpart --libxo:JP list" duplicates attribute keys (authored by asomers).
gpart: "gpart --libxo:JP list" duplicates attribute keys
Dec 10 2025, 6:12 PM
asomers closed D54080: gpart: "gpart --libxo:JP list" duplicates attribute keys .
Dec 10 2025, 6:11 PM

Dec 9 2025

asomers added a comment to D54149: release: fix "make release" with NOPKGBASE=1.

@jrtc27's suggestion works. Though there are other problems too, that I haven't solved yet.

Dec 9 2025, 11:24 PM
asomers updated the diff for D54149: release: fix "make release" with NOPKGBASE=1.
  • Respond to Jessica's feedback.
Dec 9 2025, 11:23 PM
asomers committed R11:105f4df19183: filesystems/py-libzfs: fix the build on FreeBSD 15 (authored by asomers).
filesystems/py-libzfs: fix the build on FreeBSD 15
Dec 9 2025, 1:43 PM
asomers committed R11:79b7a0fcef29: sysutils/jail_exporter: always close stdout, stdin, and stderr (authored by asomers).
sysutils/jail_exporter: always close stdout, stdin, and stderr
Dec 9 2025, 1:36 PM
asomers requested review of D54151: security/vuxml: Document version range of recent Python vuln entries.
Dec 9 2025, 1:26 PM
asomers added inline comments to D54149: release: fix "make release" with NOPKGBASE=1.
Dec 9 2025, 12:10 AM

Dec 8 2025

asomers requested review of D54149: release: fix "make release" with NOPKGBASE=1.
Dec 8 2025, 11:35 PM

Dec 6 2025

asomers accepted D53950: Add libxo support to `gpart show` and document libxo flags in geom and gpart man pages.
Dec 6 2025, 3:48 PM
asomers committed R11:f3f63d8635c9: filesystems/py-libzfs: fix the build on FreeBSD 15 (authored by asomers).
filesystems/py-libzfs: fix the build on FreeBSD 15
Dec 6 2025, 3:27 PM

Dec 5 2025

asomers accepted D54080: gpart: "gpart --libxo:JP list" duplicates attribute keys .

LGTM.

Dec 5 2025, 4:20 PM

Dec 4 2025

asomers accepted D53950: Add libxo support to `gpart show` and document libxo flags in geom and gpart man pages.
Dec 4 2025, 8:28 PM