From nobody Tue Aug 09 13:39:27 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4M2Dgz1f5hz4Z49T for ; Tue, 9 Aug 2022 13:39:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M2Dgy6gVmz401T for ; Tue, 9 Aug 2022 13:39:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4M2Dgy5lJ4zZ3b for ; Tue, 9 Aug 2022 13:39:26 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 279DdQk0036850 for ; Tue, 9 Aug 2022 13:39:26 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 279DdQAD036849 for bugs@FreeBSD.org; Tue, 9 Aug 2022 13:39:26 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Tue, 09 Aug 2022 13:39:27 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: paulzhol@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660052366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iMQ9Y8iw6Tj6J1fiIdLM6lGT9IkDwsYtm2T4JzCzmSk=; b=Ym1P5iP5QM5+KIYdL0UVux8OQzvcWlijcy30uftT4SorZH6DceexAxK5ie3xPbHUH1RgRy ox157byW+NF0vvxzvPjbzyzAh8+YMs3nwjG28Yp6buHbAXWkT8J0Cak7Tzc0qWe3scAs9F O1o4Zot8MCiB3hrUSmpMMpPNkNmenjFBHOeIMJ3i9YFQu06fdGvEaT+u9Y7UY7dcqGlCFL V8AeEzwSP0hjdjxOOeP+2zyyL7l/P7hArZ1mDbHwJjj3XfM1b3aJfpBDlv2s9+ENvfaiMb 44zLKNZNYYMfOpU5nMtnmqn2ln6eYAPqUaADfg8lVBlB3GBvnDRlvwKtF2CGZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660052366; a=rsa-sha256; cv=none; b=UdWptRSiKcaetT6EboR7fPdDOuvqputiMobBWx7LTLMK6wMQPJfnOHseVxbjU10Gm/FKKM 1NQgb+4B0ezy4dp6m/5RX3u2WSrQRq/Iqs7PslAS+CvOqpKVL0AbNoOIgMKr/sdffGEU3G sTcG9paccPGBr+3R4x2pwlJPCFumd/lq3aVZjJxMUn6K8WgZBrgDHKDseb2guQXXe0CAui LsJrjn1dJgo+ff9bE6zhwHhmy21xcyqnFX9uRgcl/zt3r+6K4l3D3oTLfVVjybLxfdIGCQ WuN4vFxDwQhwSBK2mFqth1zRgC/eXpESQ/kSjCNSNVXHMFY3JDeczpMTOOOE0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N 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.=