[Bug 268338] zfsdev_ioctl prints an error message if called with FIONBIO

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 12 Dec 2022 18:01:54 UTC

            Bug ID: 268338
           Summary: zfsdev_ioctl prints an error message if called with
           Product: Base System
           Version: 13.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: dfr@rabson.org

While working on podman and buildah, I have noticed many messages logged on the
console that look like this:

len 4 vecnum: 126 sizeof (zfs_cmd_t) 4528

After debugging this a little today, I discovered that this happens when
something tries to set non-blocking i/o on a /dev/zfs filedescriptor which
translates to a FIONBIO ioctl.

The zfs storage layer in for buildah and podman tries to detect whether zfs is
available by opening /dev/zfs. The golang runtime libraries unconditionally try
to set the descriptor into non-blocking mode causing the error message.

I can probably work around this in userland but it seems to me that the freebsd
ZFS port should not print this message to console but instead return a suitable
error. Currently it returns EINVAL after the printf which seems reasonable.

You are receiving this mail because:
You are the assignee for the bug.