Date: Tue, 09 Aug 2022 13:39:27 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 265736] [FUSEFS] fuse(4) reports error on F_SETFL, O_RDWR|O_NONBLOCK but still sets the device in non-blocking mode Message-ID: <bug-265736-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265736 Bug ID: 265736 Summary: [FUSEFS] fuse(4) reports error on F_SETFL, O_RDWR|O_NONBLOCK but still sets the device in non-blocking mode Product: Base System Version: 13.1-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: paulzhol@gmail.com Created attachment 235799 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D235799&action= =3Dedit bazil/fuse workaround (Copied from https://github.com/golang/go/issues/54100#issuecomment-1200165= 500) I ran the bazil/fuse/examples/hellofs example (https://github.com/bazil/fuse/blob/master/examples/hellofs/hello.go), under truss, getting the same result: # truss -SdHf -o /tmp/truss ./hellofs -fuse.debug /tmp/tst1 2022/07/30 14:30:17 resource temporarily unavailable 3678 100150: 0.032046504 open("/dev/fuse",O_RDWR|O_CLOEXEC,00) =3D 3 (0x3) 3678 100150: 0.032667484 fstat(3,{ mode=3Dcrw-rw-rw- ,inode=3D102,size=3D0,blksize=3D4096 }) =3D 0 (0x0) 3678 100150: 0.032856138 kqueue() =3D 4 (0x4) 3678 100150: 0.033037163 fcntl(4,F_SETFD,FD_CLOEXEC) =3D 0 (0x0) 3678 100150: 0.033541314 compat11.kevent(4,{ 3,EVFILT_READ,EV_ADD|EV_CLEAR,0,0,0x827253f68 3,EVFILT_WRITE,EV_ADD|EV_CLEAR,0,0,0x827253f68 },2,0x0,0,0x0) =3D 0 (0x0) 3678 100150: 0.033721862 fcntl(3,F_GETFL,) =3D 2 (0x2) 3678 100150: 0.033866169 fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) ERR#19 'Operat= ion not supported by device' The fcntl(3,F_SETFL,O_RDWR|O_NONBLOCK) reports an error, but still sets the underlying file status flag to non-blocking. This later causes a read to re= turn EAGAIN which breaks the program. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-265736-227>