From nobody Sat Jul 05 00:30:59 2025 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 4bYryX46L5z61JHK for ; Sat, 05 Jul 2025 00:31:00 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bYryX0v4Hz45W6 for ; Sat, 05 Jul 2025 00:31:00 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751675460; 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=/CAMbwa0OXYdTeSTIs4QzHxMuRlOazy/UMl1TAvrz6c=; b=pbdIMmOYDzUeSzLCAPhe/awsud4PLAZe5MaY0BIgVzyoVsd4cq8OXUrgAtA6x6aYWTteZ8 imWNHc+0ow1LC02lWBY38OifNZ2ng2o+KoMKrfr72IOtJm9OH/Zc3/hoKmbGszTh+ozm+Z VtA2TAUdFV/ZwtAjHoUI2tap0YZFkUwOvzbS+6Ny8a08SFAx0iXsp2J/Hd6Dg8g6QJBtMp UdYkkXJ+McauQe6BfunOwX6kV3ukSqe/xI/UNsOKcHHp/rpp33eMAjq+CIt9kSW2RuUS/l lPtHLKcaCd1tOJQey2zwwhwcN7RLdO8NSKT3A5+anWtaaAxb7Lo3BC1TiD8UPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751675460; 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=/CAMbwa0OXYdTeSTIs4QzHxMuRlOazy/UMl1TAvrz6c=; b=oo8dWVvylBY1ca07QKQunpHbtoUuNK4EE3d6zryKsYfqAZ2vBNChpC2Mg5rVgmP7BTUxLT xhRLm733jLeKqBiRoySCah6F5RRNkIprigKDB+25iSE2vpsPazKFmW9u4+4/w6oYwXoXOl fA64Y7DRN+NkpyXJwC9RiyV6FjzhhzNbIikfoR4WZZbxaEK1REfXLNYAg78Ed/7LSsKDUK x9ErzE/vJ5QEX/2m446N19XlclxekayLrj6ww6/LeyFTdfqTWzecAKbTZvUtolONoAZ8Cm rFXQE8Q3m1zvZnPIj4GL0Fvqta4avSXYTbescknrNISZm3yIk3EtDWCu271C0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751675460; a=rsa-sha256; cv=none; b=Fv+C4QYx6wUz5QceM2ip3tneoUs3Bg36FXezifyZN9yWrhgKm9XGLuVCe+hva9Hhw7O8o6 qAK4bSVPpAygZx92EXbJX5oc/ShkIXa6TgL86chWLGqHjcu5EcQrq9xCu1Bk4rnEyIJ3d9 cj9odISUidRnUWjg+PFYCSfaia0HGfbzCPhhO4NYRKviph87chUXt1/XzigCuOIQgAPsQb ftlHUYCOVQb/nrmJ9CnYZ8uwwuVlGbx2+G5s7y0TEwCag/VePO84QCurzttTHvIQaJo82/ VHCp1uOuQubrpY79/GwKfEUmARnfCb3Nk1cwJd1BvQ1G6BeLybCB0D3RvZkS3Q== 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 4bYryW6Cr8z1C6D for ; Sat, 05 Jul 2025 00:30:59 +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 5650Ux34057388 for ; Sat, 5 Jul 2025 00:30:59 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 5650UxNE057387 for ports-bugs@FreeBSD.org; Sat, 5 Jul 2025 00:30:59 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 288014] errors when copying sparse files to samba share Date: Sat, 05 Jul 2025 00:30:59 +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: wrangletime@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-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 Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D288014 Bug ID: 288014 Summary: errors when copying sparse files to samba share 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: wrangletime@gmail.com I am having issues with sparse/sparse adjacent files (created with qemu-img create .../truncate) copied to or manipulated on samba server. This issue is focusing on copy errors as I am working on isolating other issues. FreeBSD server - freebsd-version -k & freebsd-version -u: 14.3-RELEASE 14.3-RELEASE-p1 samba420-4.20.7_6 is installed client - debian 12 kernel 6.1.0-37-amd64 Steps to reproduce: On Freebsd machine 1. pkg install samba420 from latest repo and not quarterly 2. pw useradd username -s /usr/sbin/nologin -w no 3. pw groupadd group 4. pw groupmod -n group -m username 5. smbpasswd -a user 6. modify /usr/local/etc/smb4.conf to be content at bottom of report 7. chown share path (/path/foo) to be username:group that is forced in the = smb config 8. service samba onerestart On linux machine with GNU coreutils do the following: 1. mount -t cifs -o defaults,username=3Dusername,pass=3D //freebsd_ip= /share localdir 2. truncate foo --size=3D1G=20 3. sudo cp -av --sparse=3Dalways foo localdir 4. cp gets error "error deallocating '': Input/output error" Transferred file size is the same, hard to tell if file was manipulated sin= ce truncate 0s output 5. sudo qemu-img create -o preallocation=3Dfull -f qcow2 dest.qcow2 1G (same thing happens with falloc)=20 6. sudo cp -av --sparse=3Dalways dest.qcow2 sambashare=20 7. cp gets error "error deallocating '': Input/output error" file gets truncated to 196K This was tested when samba share path backing store was zfs or ufs2. I don't get this error on a samba share hosted on Fedora 41 with an identic= al samba configuration (storage is ext4). It was mounted on the same client I mounted the FreeBSD share. Package version is samba-4.21.6-1.fc41.rpm. For qemu-img preallocation option, I get no error when preallocation is set= to off or metadata. I'm not sure why falloc or full get errors, but, metadata doesn't. The man page says this about the option which leads me to believe falloc and full are making sparse files since similar error behavior to truncate: "preallocation Preallocation mode (allowed values: off, metadata, falloc,= =20 full). An image with preallocated metadata is initially larger= but can improve performance when the image needs to grow. falloc a= nd=20 full preallocations are like the same options of raw format, = but sets up metadata also." and here is the snippet from the option for raw "preallocation Preallocation mode (allowed values: off, falloc, full).= =20=20 falloc mode preallocates space for image by calling posix_fallocate(). full mode preallocates space for image by writing data to underly=E2=80=90 ing storage. This data may or may not be zero, depending = on=20 the storage location."=20 smb4.conf [global] workgroup =3D SAMBA security =3D user client min protocol =3D SMB3 smb encrypt =3D mandatory server signing =3D mandatory passdb backend =3D tdbsam socket options =3D TCP_NODELAY map to guest =3D Bad User smb3 unix extensions =3D yes [share] path =3D /path/foo writeable =3D yes browseable =3D no public =3D no valid users =3D username create mask =3D 0770 directory mask =3D 0770 force group =3D group --=20 You are receiving this mail because: You are the assignee for the bug.=