From nobody Tue May 24 04:11:08 2022 X-Original-To: ports-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 5910E1B3E34F for ; Tue, 24 May 2022 04:11:09 +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 4L6gjn1KSCz3tKQ for ; Tue, 24 May 2022 04:11:09 +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 0A4501D627 for ; Tue, 24 May 2022 04:11:09 +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 24O4B8UN096034 for ; Tue, 24 May 2022 04:11:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 24O4B8kg096033 for ports-bugs@FreeBSD.org; Tue, 24 May 2022 04:11:08 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: ports-bugs@FreeBSD.org Subject: [Bug 264196] sysutils/fusefs-ntfs: read(2)ing big files in blocks of 32768 bytes and smaller fails with EINVAL Date: Tue, 24 May 2022 04:11:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: danfe@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name attachments.mimetype 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: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653365469; 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=JVYB3rKgpUYjGFM5z1xzIaIf1rfUNI7Oehb1r95HSxY=; b=wbn3pJARJnLpqwARYszbsv1FFCKgwQbPX77O60JvY3/f6IQTicjKoXjZjDGNkcjWox5Fx7 HOLQk5qwh3XtXU5naJUwn+ao0TxGgQ09Z2YqkYcfMq0rR4drMVrtKzK/0IIuqu/jO3ofZa DOjnqRMz97HxFWC9LuJbM6YHqZ1fzpmQOGbTSWL/LqpCGe2uWYEDmMb+d2+OqBqMQj5wI5 nLj7F742A2jtP420qM7e1ybWs0s6e8yq6nFhnzYD5FWb+2NQ37IICXZTH4goaMa92Svv1W /4UQiZHTXqBQhUa+wohkVrRpWt3rKK8NWUJSQtP2Db0BCHO3pMv11WemslET7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653365469; a=rsa-sha256; cv=none; b=QlPr9jqVG5TGZ5zMrFzbCUA+yG5D400gQsMMp/bCwtAgXdKgmOvGUemQg99o+DikEA0zb/ 6/t8LuzeMqRyLXKWJ2Fw5oBQwG8oWs7i0H6W99aAsr8zzQg9q7jqYqC45seL5lEGRXEdOx 8S6L48wV3c+Dv1JfwHpgpjh7OYaFauXdBAvZ18n8QeF6DuwxDI7of4ghh2+btqI1xPCdOy 5EvF5auBHgjwHfobhCICHb2taLEZhlDB3RUx0w6hZfNrj1XaWMPj2Y8rACzGm4yYgR9t8q H19tJDTPOohE1BbEY5vVNihsd0+jDXNPjEoWZicH2prdMbKFO1M0r7VbtKF5oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264196 Bug ID: 264196 Summary: sysutils/fusefs-ntfs: read(2)ing big files in blocks of 32768 bytes and smaller fails with EINVAL Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: danfe@FreeBSD.org CC: asomers@FreeBSD.org, freebsd@dussan.org Flags: maintainer-feedback?(freebsd@dussan.org) CC: freebsd@dussan.org Attachment #234168 text/plain mime type: Created attachment 234168 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D234168&action= =3Dedit Demo program that does the read(2) With the recent 14.0-CURRENT (n255230) and fusefs-ntfs-2017.3.23 (UBLIO=3Do= ff), I'm frequently getting errors when copying not-very-small files with scp(1)= to remote machines, but not with rsync(1); cat(1)ing file e.g. to /dev/null al= so fails. Running those programs under truss(1) reveals interesting bug: read= ing the files on Windows 10 formatted NTFS with block of size 32768 and smaller (stat(2) returns optimal size of 4096 bytes, which both scp(1) and cat(1) u= se) fails after several blocks; rsync(1) uses 262144 and does not fail. Even m= ore interestingly, it does not fail on first couple of blocks and on previously read ones, i.e. once the file had been read, it can be read again with smal= ler block size. I've written a program to demonstrate this (attached): $ ls -l xorgproto-2021.5.tbz -rw-r--r-- 1 danfe wheel 245998 21 =D1=8F=D0=BD=D0=B2. 14:11 xorgproto-= 2021.5.tbz $ /tmp/a.out xorgproto-2021.5.tbz 32768 using i/o size 32768 (optimal 4096) read: Invalid argument 1 reads were successful $ /tmp/a.out xorgproto-2021.5.tbz 32768 using i/o size 32768 (optimal 4096) read: Invalid argument 3 reads were successful $ /tmp/a.out xorgproto-2021.5.tbz 32768 using i/o size 32768 (optimal 4096) $ /tmp/a.out xorgproto-2021.5.tbz -1 using i/o size 4096 (optimal 4096) I'm not sure if the bug is in the port or fusefs(5) implementation, so I'm CC'ing Alan in case he might have a clue. --=20 You are receiving this mail because: You are the assignee for the bug.=