From unknown Fri Aug 15 12:52:06 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#51857 <51857@debbugs.gnu.org> To: bug#51857 <51857@debbugs.gnu.org> Subject: Status: cross-filesystem copying broken on macOS with coreutils >= 9.0 Reply-To: bug#51857 <51857@debbugs.gnu.org> Date: Fri, 15 Aug 2025 19:52:06 +0000 retitle 51857 cross-filesystem copying broken on macOS with coreutils >=3D = 9.0=20 reassign 51857 coreutils submitter 51857 Sudhip Nashi severity 51857 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 00:01:20 2021 Received: (at submit) by debbugs.gnu.org; 15 Nov 2021 05:01:20 +0000 Received: from localhost ([127.0.0.1]:52180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmU7M-0005x6-2I for submit@debbugs.gnu.org; Mon, 15 Nov 2021 00:01:20 -0500 Received: from lists.gnu.org ([209.51.188.17]:60636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmTCe-0004DU-Vr for submit@debbugs.gnu.org; Sun, 14 Nov 2021 23:02:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmTCe-00015F-PR for bug-coreutils@gnu.org; Sun, 14 Nov 2021 23:02:44 -0500 Received: from ms11p00im-qufo17281401.me.com ([17.58.38.51]:52031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmTCd-0002Qj-BV for bug-coreutils@gnu.org; Sun, 14 Nov 2021 23:02:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1636948956; bh=goD36rpu01uPe0aLKUuf4tQKQtmW4ZgYVFs/B3I1tRQ=; h=From:Content-Type:Mime-Version:Subject:Message-Id:Date:To; b=GH3nGD/aMCdzjRt6MqWMISp9P1l8lyIWDdqo/qbShsIBbosJQkev6igBFYvv0g7KH ufLdiiYoqjl3LQP76yenPCjEs3aLfg6hzHoVAKH+m2dYkYgtnkiHcHrgqnweyL66Sg ch9Mj6QwbRX3H0ZuoyKZl4tTV5jCMAsq1rfmy9Rq9GqHb5cFXZJJRGeTNQpQxI5Rsd GEmOmkdLSze29bbhHvNaFtmCTOvkcIb+RiPjILGYzr/MjU9RuIVO+j+kydlO9noA29 h3xnrDytIg4r7oPzcx+Bga4F28juj4nh3IVxZVdxfrS+X8K4ysH8aqvSNMvaNT2JEy MglwACCB2h2rw== Received: from smtpclient.apple (unknown [104.189.146.210]) by ms11p00im-qufo17281401.me.com (Postfix) with ESMTPSA id EB0CBBC0248; Mon, 15 Nov 2021 04:02:35 +0000 (UTC) From: Sudhip Nashi Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: cross-filesystem copying broken on macOS with coreutils >= 9.0 Message-Id: <7926F269-23C7-420E-9603-27EDDA7A57D8@icloud.com> Date: Sun, 14 Nov 2021 22:02:33 -0600 To: bug-coreutils@gnu.org X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.790,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-11-15=5F02:2021-11-12=5F01,2021-11-15=5F02,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 adultscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 clxscore=1011 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2111150022 Received-SPF: pass client-ip=17.58.38.51; envelope-from=sudhipnashi@icloud.com; helo=ms11p00im-qufo17281401.me.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 15 Nov 2021 00:01:19 -0500 Cc: me@cameronkatri.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hello, Cross-filesystem copying seems to have been broken in the latest = coreutils release on macOS. Running a command like =E2=80=98cp = /usr/bin/clear /tmp/test=E2=80=99 appears to return successfully, but if = one analyzes /tmp/test, it=E2=80=99s filled with NULL characters. = However, copying works fine when the source and destination file are on = the same filesystem. Do you know what might be causing this? Thanks in advance, Sudhip Nashi= From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 10:09:34 2021 Received: (at 51857) by debbugs.gnu.org; 15 Nov 2021 15:09:35 +0000 Received: from localhost ([127.0.0.1]:55783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmdby-0005RS-Ni for submit@debbugs.gnu.org; Mon, 15 Nov 2021 10:09:34 -0500 Received: from mail-wr1-f43.google.com ([209.85.221.43]:41785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmdbx-0005RC-AP for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 10:09:33 -0500 Received: by mail-wr1-f43.google.com with SMTP id a9so5162869wrr.8 for <51857@debbugs.gnu.org>; Mon, 15 Nov 2021 07:09:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=9ZKI/2yRQ2YD9rOttrgxsTrJ6o7rCM2YwzmrSZ6LH/s=; b=pd5IYhDDF4nx1TJVfUXtI/BejGpTkc4cFIbmIgyQqm5TSmWU7CSHyctsjPU+dddOWe WSis2DtFOdm11quQKzkgJ5GTko8+Xbr/fM+DY2oG7bXA9KYm1bxYvkESQWMMP8TjjRRn V3YRZwhz8rnk72Sz7GW0yCiNxczq8PpgXxZfA1NC0XD4Yecn/PTzsgfCGkaZmgs39LXN AxUMCXtncYnxUGoRCvOl+cq7nWozOy5/1FxHWf4E8QNM/pP5gtrrT0YvA3vvcP9Yt86V 0LSb2O/dm/i0C/gJxXeoInNXWDPriEquz2+Mde/EZJke1UCZFxR9x8mbPxSb+Af1Yd4h YLLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=9ZKI/2yRQ2YD9rOttrgxsTrJ6o7rCM2YwzmrSZ6LH/s=; b=wtJlVg8DSPpnAXE7egpBRxvnXGDZyIFWD3++Xba21fpv1OjBKYtY0BwtXCYzpAWk1i ULZ9tyWqK3b2MwLehUafg0lshQ6RqNyAMuuw/9JwV2zqaqp2lsZflk50rTSSFsLIkVjz wj7BY1Z2KGQPg1RGRfsnBjI+W3cDFgpwnN7YpefHSCkhF3RTQplreaE458/U3u3NW8rO bmxHluqQStjSvciMRJOGvgdJcWxz/YMVe6GOrsEqTmIUTdQquTeXQoDO9leLBLtCkSZ0 BUzz3ZSieYGfh8Z7JTtyjQ85ZPCqJ88z1vOzrIZVL1iPYM3PhzjXlkFhrQ8or+oB1vWJ RtWw== X-Gm-Message-State: AOAM531WVibDpKVCI0OMoPAbDNeIaaHdrfaYSSWUOKgwDMhprm2Fi9oY iMl4ES/Kwo3ya1OLiGWOcjE= X-Google-Smtp-Source: ABdhPJzyz3g9NbDt8lcmXKnRJTavsXl+uwFXuBeEkfQFH5StcDLY5W1HALLkQ0OZWbxW1rD/opKD5w== X-Received: by 2002:a05:6000:2ca:: with SMTP id o10mr47359401wry.244.1636988967503; Mon, 15 Nov 2021 07:09:27 -0800 (PST) Received: from [192.168.1.9] (86-40-129-104-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.40.129.104]) by smtp.googlemail.com with ESMTPSA id r8sm18420215wrz.43.2021.11.15.07.09.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Nov 2021 07:09:26 -0800 (PST) Message-ID: <3ee50940-8d0e-76d5-aea6-77d8fe4fa719@draigBrady.com> Date: Mon, 15 Nov 2021 15:09:25 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Thunderbird/95.0 Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 Content-Language: en-US To: Sudhip Nashi , 51857@debbugs.gnu.org References: <7926F269-23C7-420E-9603-27EDDA7A57D8@icloud.com> From: =?UTF-8?Q?P=c3=a1draig_Brady?= In-Reply-To: <7926F269-23C7-420E-9603-27EDDA7A57D8@icloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 51857 Cc: me@cameronkatri.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 15/11/2021 04:02, Sudhip Nashi via GNU coreutils Bug Reports wrote: > Hello, > > Cross-filesystem copying seems to have been broken in the latest coreutils release on macOS. Running a command like ‘cp /usr/bin/clear /tmp/test’ appears to return successfully, but if one analyzes /tmp/test, it’s filled with NULL characters. However, copying works fine when the source and destination file are on the same filesystem. Do you know what might be causing this? > > Thanks in advance, > Sudhip Nashi > > What are the source and dest file system types? Could you send the output of `sudo dtruss cp /usr/bin/clear /tmp/test`? I suspect SEEK_DATA may have issues on nacOS, as usage of that is new in coreutils 9.0. thanks, Pádraig From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 11:00:38 2021 Received: (at 51857) by debbugs.gnu.org; 15 Nov 2021 16:00:38 +0000 Received: from localhost ([127.0.0.1]:55850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmePO-0006xZ-5K for submit@debbugs.gnu.org; Mon, 15 Nov 2021 11:00:38 -0500 Received: from cameronkatri.com ([206.189.178.249]:47040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmeDV-0006bL-2L for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 10:48:21 -0500 Received: from smtpclient.apple (asa-video.irsc.edu [64.56.91.48]) by cameronkatri.com (Postfix) with ESMTPSA id 4691D41030; Mon, 15 Nov 2021 10:48:20 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cameronkatri.com; s=20201109; t=1636991300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=E3o6uhUkA/uRT1CTU9alSzVAMmHlIQr3QunDMNr5mgA=; b=P6L0Jl+3YPJ7QDesOwLiGhVqaEQlYsPygJIyCAiowu/SsGz7nOaOgMfpuTTE9lpSWBtHyC PY1ZEglTyT0dgtIzvnuMgV2VeUZl1pHeOb5SVtGbcF742x1mcsFoc/iVIGx9sa5U+4w2qp 7gAvy1z6L1Vs8fTZqSoACSQ0dbRhsKg= Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 From: Cameron Katri In-Reply-To: <3ee50940-8d0e-76d5-aea6-77d8fe4fa719@draigBrady.com> Date: Mon, 15 Nov 2021 10:48:19 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <92C63704-6D3A-4886-9214-F0DB96B25891@cameronkatri.com> References: <7926F269-23C7-420E-9603-27EDDA7A57D8@icloud.com> <3ee50940-8d0e-76d5-aea6-77d8fe4fa719@draigBrady.com> To: =?utf-8?Q?P=C3=A1draig_Brady?= X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51857 X-Mailman-Approved-At: Mon, 15 Nov 2021 11:00:36 -0500 Cc: Sudhip Nashi , 51857@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Nov 15, 2021, at 10:09 AM, P=C3=A1draig Brady = wrote: >=20 > On 15/11/2021 04:02, Sudhip Nashi via GNU coreutils Bug Reports wrote: >> Hello, >> Cross-filesystem copying seems to have been broken in the latest = coreutils release on macOS. Running a command like =E2=80=98cp = /usr/bin/clear /tmp/test=E2=80=99 appears to return successfully, but if = one analyzes /tmp/test, it=E2=80=99s filled with NULL characters. = However, copying works fine when the source and destination file are on = the same filesystem. Do you know what might be causing this? >> Thanks in advance, >> Sudhip Nashi >=20 > What are the source and dest file system types? > Could you send the output of `sudo dtruss cp /usr/bin/clear = /tmp/test`? > I suspect SEEK_DATA may have issues on nacOS, > as usage of that is new in coreutils 9.0. >=20 > thanks, > P=C3=A1draig Here yo go: sudo dtruss ./src/cp /usr/bin/clear /tmp/test SYSCALL(args) =3D return access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0) =3D -1 = Err#2 bsdthread_register(0x1AEC802C8, 0x1AEC802BC, 0x4000) =3D = 1073742303 0 shm_open(0x1AEB48F55, 0x0, 0xFFFFFFFFB821D000) =3D 3 0 fstat64(0x3, 0x16DDC2070, 0x0) =3D 0 0 mmap(0x0, 0x4000, 0x1, 0x40001, 0x3, 0x0) =3D 0x102170000 = 0 close(0x3) =3D 0 0 ioctl(0x2, 0x4004667A, 0x16DDC211C) =3D 0 0 mprotect(0x1021A0000, 0x4000, 0x0) =3D 0 0 mprotect(0x1021AC000, 0x4000, 0x0) =3D 0 0 mprotect(0x1021B0000, 0x4000, 0x0) =3D 0 0 mprotect(0x1021BC000, 0x4000, 0x0) =3D 0 0 mprotect(0x1021C0000, 0x4000, 0x0) =3D 0 0 mprotect(0x1021CC000, 0x4000, 0x0) =3D 0 0 mprotect(0x102174000, 0x90, 0x1) =3D 0 0 mprotect(0x102174000, 0x90, 0x3) =3D 0 0 mprotect(0x102174000, 0x90, 0x1) =3D 0 0 mprotect(0x10217C000, 0x4000, 0x1) =3D 0 0 mprotect(0x1021D0000, 0x90, 0x1) =3D 0 0 mprotect(0x1021D0000, 0x90, 0x3) =3D 0 0 mprotect(0x1021D0000, 0x90, 0x1) =3D 0 0 mprotect(0x102174000, 0x90, 0x3) =3D 0 0 mprotect(0x102174000, 0x90, 0x1) =3D 0 0 mprotect(0x10217C000, 0x4000, 0x3) =3D 0 0 mprotect(0x10217C000, 0x4000, 0x1) =3D 0 0 objc_bp_assist_cfg_np(0x1AEB103C0, 0x8000000000201048, 0x0) = =3D -1 Err#5 issetugid(0x0, 0x0, 0x0) =3D 0 0 getentropy(0x16DDC1EC8, 0x20, 0x0) =3D 0 0 getentropy(0x16DDC1F18, 0x40, 0x0) =3D 0 0 getpid(0x0, 0x0, 0x0) =3D 4661 0 stat64("/AppleInternal\0", 0x16DDC2680, 0x0) =3D -1 Err#2 csops_audittoken(0x1235, 0x7, 0x16DDC21B0) =3D 0 0 proc_info(0x2, 0x1235, 0xD) =3D 64 0 csops_audittoken(0x1235, 0x7, 0x16DDC2270) =3D 0 0 sysctlbyname(kern.osvariant_status, 0x15, 0x16DDC26E8, 0x16DDC26E0, 0x0) = =3D 0 0 csops(0x1235, 0x0, 0x16DDC270C) =3D 0 0 geteuid(0x0, 0x0, 0x0) =3D 0 0 getuid(0x0, 0x0, 0x0) =3D 0 0 sysctl([CTL_KERN, 14, 1, 4661, 0, 0] (4), 0x16DDC0C00, 0x16DDC0BE8, 0x0, = 0x0) =3D 0 0 gettid(0x16DDC0EE0, 0x16DDC0EE4, 0x0) =3D -1 Err#3 geteuid(0x0, 0x0, 0x0) =3D 0 0 getegid(0x0, 0x0, 0x0) =3D 0 0 csops(0x1235, 0x0, 0x16DDC1C24) =3D 0 0 gettid(0x16DDC0EB0, 0x16DDC0EB4, 0x0) =3D -1 Err#3 geteuid(0x0, 0x0, 0x0) =3D 0 0 getegid(0x0, 0x0, 0x0) =3D 0 0 mprotect(0x102068000, 0x100000, 0x1) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_COLLATE\0", 0x0, 0x0) = =3D 3 0 fcntl_nocancel(0x3, 0x3, 0x0) =3D 0 0 getrlimit(0x1008, 0x16DDC2F98, 0x0) =3D 0 0 fstat64(0x3, 0x16DDC2F10, 0x0) =3D 0 0 read_nocancel(0x3, "1.1A\n\0", 0x1000) =3D 2086 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_CTYPE\0", 0x0, 0x0) = =3D 3 0 fcntl_nocancel(0x3, 0x3, 0x0) =3D 0 0 fstat64(0x3, 0x16DDC3040, 0x0) =3D 0 0 fstat64(0x3, 0x16DDC2E30, 0x0) =3D 0 0 lseek(0x3, 0x0, 0x1) =3D 0 0 lseek(0x3, 0x0, 0x0) =3D 0 0 read_nocancel(0x3, "RuneMagAUTF-8\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "@\004\211\0", 0xF5D0) =3D 62928 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_MONETARY\0", 0x0, 0x0) = =3D 3 0 fstat64(0x3, 0x16DDC3060, 0x0) =3D 0 0 read_nocancel(0x3, "USD = \n$\n.\n,\n3;3\n\n-\n2\n2\n1\n0\n1\n0\n1\n1\n(\0", 0x22) = =3D 34 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_NUMERIC\0", 0x0, 0x0) = =3D 3 0 fstat64(0x3, 0x16DDC3060, 0x0) =3D 0 0 read_nocancel(0x3, ".\n,\n3;3\n@$\b\0", 0x8) =3D 8 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_TIME\0", 0x0, 0x0) = =3D 3 0 fstat64(0x3, 0x16DDC3070, 0x0) =3D 0 0 read_nocancel(0x3, = "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec\nJanuary\nFebr= uary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nOctober\nNovember\= nDecember\nSun\nMon\nTue\nWed\nThu\nFri\nSat\nSunday\nMonday\nTuesday\nWed= nesday\nThursday\nFriday\nSaturday\n%H:%M:%S\n%m/%d/%Y\n%a %b %e %X = %Y\nAM\nP", 0x179) =3D 377 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/LC_MESSAGES\0", = 0x0, 0x0) =3D 3 0 fstat64(0x3, 0x16DDC3070, 0x0) =3D 0 0 read_nocancel(0x3, "^[yYsS].*\n^[nN].*\n(\0", 0x12) =3D 18 = 0 close_nocancel(0x3) =3D 0 0 geteuid(0x0, 0x0, 0x0) =3D 0 0 stat64("/tmp/test\0", 0x16DDC36C0, 0x0) =3D 0 0 fstatat64(0xFFFFFFFFFFFFFFFE, 0x16DDC3C21, 0x16DDC2BA0) =3D 0 0 fstatat64(0xFFFFFFFFFFFFFFFE, 0x16DDC3C30, 0x16DDC2B10) =3D 0 0 open("/usr/bin/clear\0", 0x0, 0x0) =3D 3 0 fstat64(0x3, 0x16DDC2C30, 0x0) =3D 0 0 open("/tmp/test\0", 0x401, 0x0) =3D 4 0 fstat64(0x4, 0x16DDC2CC0, 0x0) =3D 0 0 fstat64(0x4, 0x16DDC2D50, 0x0) =3D 0 0 fcntl(0x3, 0x32, 0x16DDC3200) =3D 0 0 fcntl(0x4, 0x32, 0x16DDC2E00) =3D 0 0 unlink("/private/tmp/test\0", 0x0, 0x0) =3D 0 0 clonefileat(0xFFFFFFFFFFFFFFFE, 0x16DDC3200, 0xFFFFFFFFFFFFFFFE) = =3D -1 Err#18 open("/private/tmp/test\0", 0x601, 0x81ED) =3D 5 0 close(0x5) =3D 0 0 open("/private/tmp/test\0", 0x2, 0x0) =3D 5 0 dup2(0x5, 0x4, 0x0) =3D 4 0 close(0x5) =3D 0 0 fchmod(0x4, 0x81ED, 0x0) =3D 0 0 fchown(0x4, 0x0, 0x0) =3D 0 0 futimes(0x4, 0x16DDC2DE0, 0x0) =3D 0 0 sysctl([CTL_HW, 7, 0, 0, 0, 0] (2), 0x207EC4068, 0x16DDC2A30, 0x0, 0x0) = =3D 0 0 lseek(0x3, 0x0, 0x4) =3D -1 Err#6 ftruncate(0x4, 0x1D770, 0x0) =3D 0 0 close(0x4) =3D 0 0 close(0x3) =3D 0 0 lseek(0x0, 0x0, 0x1) =3D 6741 0 lseek(0x0, 0x0, 0x1) =3D 6741 0 lseek(0x0, 0x1A55, 0x0) =3D 6741 0 close_nocancel(0x0) =3D 0 0 close_nocancel(0x1) =3D 0 0 close_nocancel(0x2) =3D 0 0 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 12:33:31 2021 Received: (at 51857) by debbugs.gnu.org; 15 Nov 2021 17:33:31 +0000 Received: from localhost ([127.0.0.1]:56047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmfrH-0001MQ-BE for submit@debbugs.gnu.org; Mon, 15 Nov 2021 12:33:31 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmfrF-0001MA-LL for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 12:33:30 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6131D1600EA; Mon, 15 Nov 2021 09:33:23 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id MekyxeRndjeD; Mon, 15 Nov 2021 09:33:22 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 44D1F160121; Mon, 15 Nov 2021 09:33:22 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Ox6gmmliRtOj; Mon, 15 Nov 2021 09:33:22 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 1547116004F; Mon, 15 Nov 2021 09:33:22 -0800 (PST) Message-ID: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> Date: Mon, 15 Nov 2021 09:33:21 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Content-Language: en-US To: Cameron Katri , =?UTF-8?Q?P=c3=a1draig_Brady?= References: <7926F269-23C7-420E-9603-27EDDA7A57D8@icloud.com> <3ee50940-8d0e-76d5-aea6-77d8fe4fa719@draigBrady.com> <92C63704-6D3A-4886-9214-F0DB96B25891@cameronkatri.com> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 In-Reply-To: <92C63704-6D3A-4886-9214-F0DB96B25891@cameronkatri.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 51857 Cc: Sudhip Nashi , 51857@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) Is the source file on a ZFS file system by any chance? See my lseek comment below. On 11/15/21 07:48, Cameron Katri via GNU coreutils Bug Reports wrote: > stat64("/tmp/test\0", 0x16DDC36C0, 0x0) = 0 0 > fstatat64(0xFFFFFFFFFFFFFFFE, 0x16DDC3C21, 0x16DDC2BA0) = 0 0 > fstatat64(0xFFFFFFFFFFFFFFFE, 0x16DDC3C30, 0x16DDC2B10) = 0 0 > open("/usr/bin/clear\0", 0x0, 0x0) = 3 0 > fstat64(0x3, 0x16DDC2C30, 0x0) = 0 0 > open("/tmp/test\0", 0x401, 0x0) = 4 0 > fstat64(0x4, 0x16DDC2CC0, 0x0) = 0 0 > fstat64(0x4, 0x16DDC2D50, 0x0) = 0 0 > fcntl(0x3, 0x32, 0x16DDC3200) = 0 0 > fcntl(0x4, 0x32, 0x16DDC2E00) = 0 0 > unlink("/private/tmp/test\0", 0x0, 0x0) = 0 0 What's causing this use of "/private/tmp"? I don't see that in the GNU cp source code. Can you put a breakpoint on clonefileat and see what's calling it and what its arguments are? > clonefileat(0xFFFFFFFFFFFFFFFE, 0x16DDC3200, 0xFFFFFFFFFFFFFFFE) = -1 Err#18 > open("/private/tmp/test\0", 0x601, 0x81ED) = 5 0 > close(0x5) = 0 0 > open("/private/tmp/test\0", 0x2, 0x0) = 5 0 > dup2(0x5, 0x4, 0x0) = 4 0 > close(0x5) = 0 0 > fchmod(0x4, 0x81ED, 0x0) = 0 0 > fchown(0x4, 0x0, 0x0) = 0 0 > futimes(0x4, 0x16DDC2DE0, 0x0) = 0 0 > sysctl([CTL_HW, 7, 0, 0, 0, 0] (2), 0x207EC4068, 0x16DDC2A30, 0x0, 0x0) = 0 0 > lseek(0x3, 0x0, 0x4) = -1 Err#6 That lseek call looks like OpenZFS bug 11900 . If you're using ZFS, the bug really should be fixed in your ZFS implementation as it can affect programs other than coreutils and there's no easy workaround (other than to disable efficient copying). Is this something you can look into, or ask someone with macOS and/or ZFS expertise to look into? For more, see . > ftruncate(0x4, 0x1D770, 0x0) = 0 0 > close(0x4) = 0 0 > close(0x3) = 0 0 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 12:40:50 2021 Received: (at 51857) by debbugs.gnu.org; 15 Nov 2021 17:40:50 +0000 Received: from localhost ([127.0.0.1]:56051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmfyM-0001YN-5Q for submit@debbugs.gnu.org; Mon, 15 Nov 2021 12:40:50 -0500 Received: from cameronkatri.com ([206.189.178.249]:52932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmfyJ-0001YD-Fv for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 12:40:48 -0500 Received: from FreeBSDY540 (c-73-84-80-103.hsd1.fl.comcast.net [73.84.80.103]) by cameronkatri.com (Postfix) with ESMTPSA id 2831740CEB; Mon, 15 Nov 2021 12:40:46 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cameronkatri.com; s=20201109; t=1636998046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bvGszt8SSyYKrK/cXRQpJqE4qkLky742Hc0lRmLUNhQ=; b=VQxAJmSiiGLHMJsnUdqQZj3Y23Xp9qP0+cK0PDiLEKJIqL0D0Cj9RFEtn7zXZMLo8zM9nG 8WT9hQpZBRjs1cAZPeJbm3rwovUzyGQeq7/ekqa3rS9u8JW6sD4dH867u3QZtpOh135ke7 gm699+9fV4/sz1NXpf/Fvg71qX1Nc/o= Date: Mon, 15 Nov 2021 12:40:45 -0500 From: Cameron Katri To: Paul Eggert Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 Message-ID: <20211115174045.u6wj7mdv4buaa3ly@FreeBSDY540> References: <7926F269-23C7-420E-9603-27EDDA7A57D8@icloud.com> <3ee50940-8d0e-76d5-aea6-77d8fe4fa719@draigBrady.com> <92C63704-6D3A-4886-9214-F0DB96B25891@cameronkatri.com> <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pzvlrcjhyekmz5oa" Content-Disposition: inline In-Reply-To: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51857 Cc: Sudhip Nashi , =?utf-8?Q?P=C3=A1draig?= Brady , 51857@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --pzvlrcjhyekmz5oa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 15, 2021 at 09:33:21AM -0800, Paul Eggert wrote: > Is the source file on a ZFS file system by any chance? See my lseek comme= nt > below. No, this is one APFS (Apple File System). >=20 > On 11/15/21 07:48, Cameron Katri via GNU coreutils Bug Reports wrote: >=20 > > stat64("/tmp/test\0", 0x16DDC36C0, 0x0) =3D 0 0 > > fstatat64(0xFFFFFFFFFFFFFFFE, 0x16DDC3C21, 0x16DDC2BA0) =3D 0 0 > > fstatat64(0xFFFFFFFFFFFFFFFE, 0x16DDC3C30, 0x16DDC2B10) =3D 0 0 > > open("/usr/bin/clear\0", 0x0, 0x0) =3D 3 0 > > fstat64(0x3, 0x16DDC2C30, 0x0) =3D 0 0 > > open("/tmp/test\0", 0x401, 0x0) =3D 4 0 > > fstat64(0x4, 0x16DDC2CC0, 0x0) =3D 0 0 > > fstat64(0x4, 0x16DDC2D50, 0x0) =3D 0 0 > > fcntl(0x3, 0x32, 0x16DDC3200) =3D 0 0 > > fcntl(0x4, 0x32, 0x16DDC2E00) =3D 0 0 > > unlink("/private/tmp/test\0", 0x0, 0x0) =3D 0 0 >=20 > What's causing this use of "/private/tmp"? I don't see that in the GNU cp > source code. Can you put a breakpoint on clonefileat and see what's calli= ng > it and what its arguments are? On macOS, `/tmp` is a symlink to `/private/tmp`. >=20 > > clonefileat(0xFFFFFFFFFFFFFFFE, 0x16DDC3200, 0xFFFFFFFFFFFFFFFE) =3D = -1 Err#18 > > open("/private/tmp/test\0", 0x601, 0x81ED) =3D 5 0 > > close(0x5) =3D 0 0 > > open("/private/tmp/test\0", 0x2, 0x0) =3D 5 0 > > dup2(0x5, 0x4, 0x0) =3D 4 0 > > close(0x5) =3D 0 0 > > fchmod(0x4, 0x81ED, 0x0) =3D 0 0 > > fchown(0x4, 0x0, 0x0) =3D 0 0 > > futimes(0x4, 0x16DDC2DE0, 0x0) =3D 0 0 > > sysctl([CTL_HW, 7, 0, 0, 0, 0] (2), 0x207EC4068, 0x16DDC2A30, 0x0, 0x0)= =3D 0 0 > > lseek(0x3, 0x0, 0x4) =3D -1 Err#6 >=20 > That lseek call looks like OpenZFS bug 11900 > . If you're using ZFS, the b= ug > really should be fixed in your ZFS implementation as it can affect progra= ms > other than coreutils and there's no easy workaround (other than to disable > efficient copying). Is this something you can look into, or ask someone w= ith > macOS and/or ZFS expertise to look into? For more, see > . >=20 > > ftruncate(0x4, 0x1D770, 0x0) =3D 0 0 > > close(0x4) =3D 0 0 > > close(0x3) =3D 0 0 --=20 Cameron Katri Email: me@cameronkatri.com PGP Fingerprint: 7D3B36CEA40FCC2181FB6DCDBAFFD97826540F1C --pzvlrcjhyekmz5oa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEfTs2zqQPzCGB+23Nuv/ZeCZUDxwFAmGSm5gACgkQuv/ZeCZU DxxNkgf9GObzbGsOM/iXwH2+8PijVqpFccw+W1wuS0ek2GrS18fwI9izf3YYG7U4 jLcVnvWrYhAt7pJ2l0jQKDilGdGO4b542yA0lc9ttbtoVi9G246PxwWS7Xv6iOAE 3/3EIup42SjQfVySSFV3VNonC5LLxhtjRpSyXXBptEwvFQwr4L36xHUlubRjo21R KWDLr0IqYlejNE7yh5BRNw/V51KtU22HgU7vYuYbv02p7MaFNu/pBKWJmVmh+/Zr 4bG6gp2MaDoqPL2faLdbWsgZXYGgSLtGAh3ImDcFx37/FPqbqz8Vso1zla6R8L56 cFl1/jBG/66w/HQlfOC/q+Jzq6xO1A== =03EY -----END PGP SIGNATURE----- --pzvlrcjhyekmz5oa-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 15:51:45 2021 Received: (at 51857) by debbugs.gnu.org; 15 Nov 2021 20:51:46 +0000 Received: from localhost ([127.0.0.1]:56302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmix7-0000l7-KQ for submit@debbugs.gnu.org; Mon, 15 Nov 2021 15:51:45 -0500 Received: from ms11p00im-qufo17281801.me.com ([17.58.38.55]:45424) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmix6-0000kt-J1 for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 15:51:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1637009498; bh=rpOuMMdiufx3sn4Kd6IPkCcjhHElDvUbYEPb+G8U2Pg=; h=Content-Type:From:Mime-Version:Subject:Date:Message-Id:To; b=VvKV4cmRureqWrSnPvzKK7B7LEzJwwJchT+NWsxC0D7AYD9eSk3++lgakd4n9xp5p qAKcBTOVVnqqm/snCZoJoOA7rfeBtJJMCMWbbFeKVFmbjl0jNbQ8JplBkaJMQeGBWM R+mHW0xv484CVDo489c3GYE5/HWVGiRfs+kPLxPAun70yBka7QSUgvHCwijUuCqn9E U3KqqyG1YBpilrATbR4mS54msktKnPtRyRvP4wBAFWKqdm4S+mHRg0DXd1nIrTwwYN kqAu0FLqZpa+FIdQoRT7CxUUdDl56CnipqWZe1OI4GxK/w/LNMmk6pKDopoZveU5v3 TAmrlyI7rVlEQ== Received: from [10.88.224.141] (unknown [192.206.244.202]) by ms11p00im-qufo17281801.me.com (Postfix) with ESMTPSA id 7DBB51001BB; Mon, 15 Nov 2021 20:51:38 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Sudhip Nashi Mime-Version: 1.0 (1.0) Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 Date: Mon, 15 Nov 2021 12:37:51 -0600 Message-Id: <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> References: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> In-Reply-To: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> To: Paul Eggert X-Mailer: iPhone Mail (18C66) X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.790,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-11-15=5F15:2021-11-12=5F01,2021-11-15=5F15,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 clxscore=1011 phishscore=0 malwarescore=0 mlxlogscore=969 spamscore=0 suspectscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2111150105 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 51857 Cc: 51857@debbugs.gnu.org, =?utf-8?Q?P=C3=A1draig_Brady?= , Cameron Katri X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > On Nov 15, 2021, at 11:33, Paul Eggert wrote: >=20 > =EF=BB=BFIs the source file on a ZFS file system by any chance? See my lse= ek comment below. >=20 >> On 11/15/21 07:48, Cameron Katri via GNU coreutils Bug Reports wrote: >>=20 >> stat64("/tmp/test\0", 0x16DDC36C0, 0x0) =3D 0 0 >> fstatat64(0xFFFFFFFFFFFFFFFE, 0x16DDC3C21, 0x16DDC2BA0) =3D 0 0 >> fstatat64(0xFFFFFFFFFFFFFFFE, 0x16DDC3C30, 0x16DDC2B10) =3D 0 0 >> open("/usr/bin/clear\0", 0x0, 0x0) =3D 3 0 >> fstat64(0x3, 0x16DDC2C30, 0x0) =3D 0 0 >> open("/tmp/test\0", 0x401, 0x0) =3D 4 0 >> fstat64(0x4, 0x16DDC2CC0, 0x0) =3D 0 0 >> fstat64(0x4, 0x16DDC2D50, 0x0) =3D 0 0 >> fcntl(0x3, 0x32, 0x16DDC3200) =3D 0 0 >> fcntl(0x4, 0x32, 0x16DDC2E00) =3D 0 0 >> unlink("/private/tmp/test\0", 0x0, 0x0) =3D 0 0 >=20 > What's causing this use of "/private/tmp"? I don't see that in the GNU cp s= ource code. Can you put a breakpoint on clonefileat and see what's calling i= t and what its arguments are? >=20 >> clonefileat(0xFFFFFFFFFFFFFFFE, 0x16DDC3200, 0xFFFFFFFFFFFFFFFE) =3D= -1 Err#18 >> open("/private/tmp/test\0", 0x601, 0x81ED) =3D 5 0 >> close(0x5) =3D 0 0 >> open("/private/tmp/test\0", 0x2, 0x0) =3D 5 0 >> dup2(0x5, 0x4, 0x0) =3D 4 0 >> close(0x5) =3D 0 0 >> fchmod(0x4, 0x81ED, 0x0) =3D 0 0 >> fchown(0x4, 0x0, 0x0) =3D 0 0 >> futimes(0x4, 0x16DDC2DE0, 0x0) =3D 0 0 >> sysctl([CTL_HW, 7, 0, 0, 0, 0] (2), 0x207EC4068, 0x16DDC2A30, 0x0, 0x0) = =3D 0 0 >> lseek(0x3, 0x0, 0x4) =3D -1 Err#6 >=20 > That lseek call looks like OpenZFS bug 11900 . If you're using ZFS, the bug really should be fixed in you= r ZFS implementation as it can affect programs other than coreutils and ther= e's no easy workaround (other than to disable efficient copying). Is this so= mething you can look into, or ask someone with macOS and/or ZFS expertise to= look into? For more, see . >=20 >> ftruncate(0x4, 0x1D770, 0x0) =3D 0 0 >> close(0x4) =3D 0 0 >> close(0x3) =3D 0 0 Turns out lseek is broken (or at least works differently) on macOS as well (= https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00054.html). Funny c= oincidence! I=E2=80=99ll take a better look later this week if I can and try= to see what the exact problem is.= From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 16:33:54 2021 Received: (at 51857) by debbugs.gnu.org; 15 Nov 2021 21:33:54 +0000 Received: from localhost ([127.0.0.1]:56366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmjbu-00020R-Hc for submit@debbugs.gnu.org; Mon, 15 Nov 2021 16:33:54 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:37220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmjbs-00020B-IO for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 16:33:53 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5737A1600EF; Mon, 15 Nov 2021 13:33:46 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id KvWib4x8uC5W; Mon, 15 Nov 2021 13:33:45 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9F8F2160100; Mon, 15 Nov 2021 13:33:45 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id QAxx6MkFkYgZ; Mon, 15 Nov 2021 13:33:45 -0800 (PST) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 799FA1600EF; Mon, 15 Nov 2021 13:33:45 -0800 (PST) Message-ID: Date: Mon, 15 Nov 2021 13:33:44 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 Content-Language: en-US To: Cameron Katri References: <7926F269-23C7-420E-9603-27EDDA7A57D8@icloud.com> <3ee50940-8d0e-76d5-aea6-77d8fe4fa719@draigBrady.com> <92C63704-6D3A-4886-9214-F0DB96B25891@cameronkatri.com> <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> <20211115174045.u6wj7mdv4buaa3ly@FreeBSDY540> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <20211115174045.u6wj7mdv4buaa3ly@FreeBSDY540> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 51857 Cc: Sudhip Nashi , =?UTF-8?Q?P=c3=a1draig_Brady?= , 51857@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) On 11/15/21 09:40, Cameron Katri wrote: > No, this is one APFS (Apple File System). OK, so ZFS is not involved. >>> unlink("/private/tmp/test\0", 0x0, 0x0) = 0 0 >> >> What's causing this use of "/private/tmp"? I don't see that in the GNU cp >> source code. Can you put a breakpoint on clonefileat and see what's calling >> it and what its arguments are? > > On macOS, `/tmp` is a symlink to `/private/tmp`. Fine, but why would 'cp' remove /private/tmp/test when you told it to copy to /tmp/test? I see no reason why it would expand the symlink by hand, nor why it would remove the destination file even if it calculated that /tmp/test and /private/tmp/test were the same file (it's not supposed to do that). And why would 'cp' invoke clonefileat? Coreutils cp's source code does not mention clonefileat anywhere. Something very odd is going on here. Did you build vanilla coreutils 9.0 yourself? If so, what commands did you you use to build it, exactly? If not, who built coreutils and how did they configure and/or modify it? I worry that we're looking at a version of coreutils cp that has been modified somehow, or that you're dtrussing the wrong cp somehow. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 16:49:44 2021 Received: (at 51857) by debbugs.gnu.org; 15 Nov 2021 21:49:44 +0000 Received: from localhost ([127.0.0.1]:56382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmjrD-0002VV-Kb for submit@debbugs.gnu.org; Mon, 15 Nov 2021 16:49:44 -0500 Received: from cameronkatri.com ([206.189.178.249]:59910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmjrC-0002VN-Al for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 16:49:42 -0500 Received: from FreeBSDY540 (c-73-84-80-103.hsd1.fl.comcast.net [73.84.80.103]) by cameronkatri.com (Postfix) with ESMTPSA id 2749D41068; Mon, 15 Nov 2021 16:49:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cameronkatri.com; s=20201109; t=1637012981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MrKIeRYcU3MssZWSHo/rSfy/8peYzjXRUxM1C/mwWGw=; b=OEBBy1KQrOzDGiv30HTuzBQZxuZ6AIwk7d6qG4emU6PapFvW+s0qlXW3Vge5XHEk9GHAN5 Lh9EXb63Ud6IZ4ez63EIq3Fhn4oEbng/3YepGU+kut4auOauapdgkEc065lAtU8tFgiCrw OLOAgWhxkVkM/zUQWuxe2Ig2Uj4VQaA= Date: Mon, 15 Nov 2021 16:49:40 -0500 From: Cameron Katri To: Paul Eggert Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 Message-ID: <20211115214940.bc6x3jkkj3flr5xj@FreeBSDY540> References: <7926F269-23C7-420E-9603-27EDDA7A57D8@icloud.com> <3ee50940-8d0e-76d5-aea6-77d8fe4fa719@draigBrady.com> <92C63704-6D3A-4886-9214-F0DB96B25891@cameronkatri.com> <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> <20211115174045.u6wj7mdv4buaa3ly@FreeBSDY540> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wt246dg7m5g3fxek" Content-Disposition: inline In-Reply-To: X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51857 Cc: Sudhip Nashi , =?utf-8?Q?P=C3=A1draig?= Brady , 51857@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --wt246dg7m5g3fxek Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 15, 2021 at 01:33:44PM -0800, Paul Eggert wrote: > On 11/15/21 09:40, Cameron Katri wrote: >=20 > Did you build vanilla coreutils 9.0 yourself? If so, what commands did you > you use to build it, exactly? If not, who built coreutils and how did they > configure and/or modify it? I worry that we're looking at a version of > coreutils cp that has been modified somehow, or that you're dtrussing the > wrong cp somehow. I forgot that I had a patch to enable reflink on APFS, I just rebuilt a vanilla coreutils with just ./configure && make and the issue persists. Sorry about that, here is the correct dtruss: cameron in Documents/coreutils-9.0/src at build \> sudo dtruss ./cp /usr/bin/clear /tmp/test SYSCALL(args) =3D return access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0) =3D -1 Err= #2 bsdthread_register(0x1AEC802C8, 0x1AEC802BC, 0x4000) =3D 107374= 2303 0 shm_open(0x1AEB48F55, 0x0, 0x4158000) =3D 3 0 fstat64(0x3, 0x16BCA6130, 0x0) =3D 0 0 mmap(0x0, 0x4000, 0x1, 0x40001, 0x3, 0x0) =3D 0x104298000 0 close(0x3) =3D 0 0 ioctl(0x2, 0x4004667A, 0x16BCA61DC) =3D 0 0 mprotect(0x1042A4000, 0x4000, 0x0) =3D 0 0 mprotect(0x1042B0000, 0x4000, 0x0) =3D 0 0 mprotect(0x1042B4000, 0x4000, 0x0) =3D 0 0 mprotect(0x1042C0000, 0x4000, 0x0) =3D 0 0 mprotect(0x1042C4000, 0x4000, 0x0) =3D 0 0 mprotect(0x1042D0000, 0x4000, 0x0) =3D 0 0 mprotect(0x10429C000, 0x90, 0x1) =3D 0 0 mprotect(0x10429C000, 0x90, 0x3) =3D 0 0 mprotect(0x10429C000, 0x90, 0x1) =3D 0 0 mprotect(0x1042D4000, 0x4000, 0x1) =3D 0 0 mprotect(0x1042D8000, 0x90, 0x1) =3D 0 0 mprotect(0x1042D8000, 0x90, 0x3) =3D 0 0 mprotect(0x1042D8000, 0x90, 0x1) =3D 0 0 mprotect(0x10429C000, 0x90, 0x3) =3D 0 0 mprotect(0x10429C000, 0x90, 0x1) =3D 0 0 mprotect(0x1042D4000, 0x4000, 0x3) =3D 0 0 mprotect(0x1042D4000, 0x4000, 0x1) =3D 0 0 objc_bp_assist_cfg_np(0x1AEB103C0, 0x8000000000201048, 0x0) = =3D -1 Err#5 issetugid(0x0, 0x0, 0x0) =3D 0 0 getentropy(0x16BCA5FF8, 0x20, 0x0) =3D 0 0 getentropy(0x16BCA6048, 0x40, 0x0) =3D 0 0 getpid(0x0, 0x0, 0x0) =3D 91358 0 stat64("/AppleInternal\0", 0x16BCA6740, 0x0) =3D -1 Err#2 csops_audittoken(0x164DE, 0x7, 0x16BCA6270) =3D 0 0 proc_info(0x2, 0x164DE, 0xD) =3D 64 0 csops_audittoken(0x164DE, 0x7, 0x16BCA6330) =3D 0 0 sysctlbyname(kern.osvariant_status, 0x15, 0x16BCA67A8, 0x16BCA67A0, 0x0) = =3D 0 0 csops(0x164DE, 0x0, 0x16BCA67CC) =3D 0 0 mprotect(0x104190000, 0x100000, 0x1) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_COLLATE\0", 0x0, 0x0) = =3D 3 0 fcntl_nocancel(0x3, 0x3, 0x0) =3D 0 0 getrlimit(0x1008, 0x16BCA7178, 0x0) =3D 0 0 fstat64(0x3, 0x16BCA70F0, 0x0) =3D 0 0 read_nocancel(0x3, "1.1A\n\0", 0x1000) =3D 2086 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_CTYPE\0", 0x0, 0x0) = =3D 3 0 fcntl_nocancel(0x3, 0x3, 0x0) =3D 0 0 fstat64(0x3, 0x16BCA7220, 0x0) =3D 0 0 fstat64(0x3, 0x16BCA7010, 0x0) =3D 0 0 lseek(0x3, 0x0, 0x1) =3D 0 0 lseek(0x3, 0x0, 0x0) =3D 0 0 read_nocancel(0x3, "RuneMagAUTF-8\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "@\004\211\0", 0xF5D0) =3D 62928 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_MONETARY\0", 0x0, 0x0) = =3D 3 0 fstat64(0x3, 0x16BCA7240, 0x0) =3D 0 0 read_nocancel(0x3, "USD \n$\n.\n,\n3;3\n\n-\n2\n2\n1\n0\n1\n0\n1\n1\n(\0", = 0x22) =3D 34 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_NUMERIC\0", 0x0, 0x0) = =3D 3 0 fstat64(0x3, 0x16BCA7240, 0x0) =3D 0 0 read_nocancel(0x3, ".\n,\n3;3\n@$\b\0", 0x8) =3D 8 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_TIME\0", 0x0, 0x0) = =3D 3 0 fstat64(0x3, 0x16BCA7250, 0x0) =3D 0 0 read_nocancel(0x3, "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\n= Dec\nJanuary\nFebruary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nO= ctober\nNovember\nDecember\nSun\nMon\nTue\nWed\nThu\nFri\nSat\nSunday\nMond= ay\nTuesday\nWednesday\nThursday\nFriday\nSaturday\n%H:%M:%S\n%m/%d/%Y\n%a = %b %e %X %Y\nAM\nP", 0x179) =3D 377 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/LC_MESSAGES\0", 0x= 0, 0x0) =3D 3 0 fstat64(0x3, 0x16BCA7250, 0x0) =3D 0 0 read_nocancel(0x3, "^[yYsS].*\n^[nN].*\n(\0", 0x12) =3D 18 0 close_nocancel(0x3) =3D 0 0 geteuid(0x0, 0x0, 0x0) =3D 0 0 stat64("/tmp/test\0", 0x16BCA7720, 0x0) =3D 0 0 fstatat64(0xFFFFFFFFFFFFFFFE, 0x16BCA7C45, 0x16BCA73F0) =3D 0 0 fstatat64(0xFFFFFFFFFFFFFFFE, 0x16BCA7C54, 0x16BCA7360) =3D 0 0 open("/usr/bin/clear\0", 0x0, 0x0) =3D 3 0 fstat64(0x3, 0x16BCA7490, 0x0) =3D 0 0 open("/tmp/test\0", 0x401, 0x0) =3D 4 0 fstat64(0x4, 0x16BCA75C0, 0x0) =3D 0 0 sysctl([CTL_HW, 7, 0, 0, 0, 0] (2), 0x207EC4068, 0x16BCA7280, 0x0, 0x0) = =3D 0 0 lseek(0x3, 0x0, 0x4) =3D -1 Err#6 ftruncate(0x4, 0x1D770, 0x0) =3D 0 0 close(0x4) =3D 0 0 close(0x3) =3D 0 0 lseek(0x0, 0x0, 0x1) =3D 146611 0 lseek(0x0, 0x0, 0x1) =3D 146611 0 lseek(0x0, 0x23CB3, 0x0) =3D 146611 0 close_nocancel(0x0) =3D 0 0 close_nocancel(0x1) =3D 0 0 close_nocancel(0x2) =3D 0 0 --=20 Cameron Katri Email: me@cameronkatri.com PGP Fingerprint: 7D3B36CEA40FCC2181FB6DCDBAFFD97826540F1C --wt246dg7m5g3fxek Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEfTs2zqQPzCGB+23Nuv/ZeCZUDxwFAmGS1fMACgkQuv/ZeCZU Dxx/OAgAlHiiQzPmZq6Bnq+hYYXpBJBwWrdEwZPL0Wvjno748bDWM/CThrVNd/g0 aNYkCt1CK/QR9qEJhsKPSz0avGqEjTJQHQWUsOgXpnnd2LMZBt5S86DqgoiuW/8z uia9eyU4yLnBY8hn1qAjmuh6ojZrXtz3U7lOA8CcumM0IsaoQBsw7O8ZGpOtCkEY d+nvVUDJOBioOeOPctmjyaTnkvm/51N0uAqFrzEhj0ECQhniZOD7+BXaTMopM0wy IaFAWY7eWTbjGWgeORbhvLfPmyryNtbf0+GX5EE8US+elSdcsCrfcbhZUxSqMjr+ 1FP4p1e9xTVdw2RYWIWUfg5c9vIgRw== =wO4y -----END PGP SIGNATURE----- --wt246dg7m5g3fxek-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 18:21:18 2021 Received: (at 51857) by debbugs.gnu.org; 15 Nov 2021 23:21:18 +0000 Received: from localhost ([127.0.0.1]:56521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmlHp-0005Cm-TK for submit@debbugs.gnu.org; Mon, 15 Nov 2021 18:21:18 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:35455) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmlHn-0005CX-VG for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 18:21:16 -0500 Received: by mail-wr1-f48.google.com with SMTP id i5so33837466wrb.2 for <51857@debbugs.gnu.org>; Mon, 15 Nov 2021 15:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to; bh=qgFFfwSsfVv5fh06jWlVLowlKIROWCUPUL602ebU7W4=; b=phI5HPf6F9calZHKMVme0GIcrWTWceq2ASgXut2NCpTHo61JsPzdeFS4dj0G5jbzkJ iGFmZsr7bb2tTTc/j7kF/kzqWXQ/sy9sMBT07TOCd6TiCUiMC63/OLL0+8WexXCkdJEX +/8yssjuiFsCGzTyxwhfZT4DibURHBfyAGbaoeKaGcZTLvwgOEwwvxS3BdzvZxc/wQzS UsUAWkvn/eByP98EYpfSdzMeV2kXN+GvIhe7US77DlT5G7NIk5UfabrjpXsOpRwdeApX +axll8eoWjo+9s74l2+3+jTWG5iR7NCFBhAH3GL6fh2DHtClYFy+JndhcDzHX/xTuLRu ccrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to; bh=qgFFfwSsfVv5fh06jWlVLowlKIROWCUPUL602ebU7W4=; b=ojhkQG9Xjygxj8jh3/A4A9pPVB5uGMq3Xsr48Bj1nXYL8khw0WULXABZB3mjFv2pHr oa04zxOFbVmMrtwp6k9Cz/nO+BN8fbYFL3oULczeU6rTq5HflO4GSNQwKUI4AevGFZB5 81DPFTF7yvTSdqXpTQlkXlamyDvj0DnJqXsO18rbubRVySVG9bXy2lgGVzLF2yZXu2lC OIyiDDPwzoT5I7lQ8tL7XsqAagV5f6ROowx2kMDPLm8zmEckoou014ac7gn52WVRiP7I Oub/Mq60/G96FU+SbG++quU+KZrYPm5a0ytFV5QeZ7Es4xHu5B9cuBS/vT9/daYkm4T1 K5mA== X-Gm-Message-State: AOAM532rDgvKGl4WKDnyYCYp9b7UY8uBoFgsCrq/0/RAkcui7jbq2Z0+ njrtjyKPhmPrkGVl57J5wSU= X-Google-Smtp-Source: ABdhPJzqZ/wxaHemj6MIV/ReeofLsmoCgrt0H+TXYb+KFjP8SjCz8F8Zhp9eBgm/S1RoCpVYnLmFCQ== X-Received: by 2002:adf:f907:: with SMTP id b7mr3646889wrr.5.1637018469951; Mon, 15 Nov 2021 15:21:09 -0800 (PST) Received: from [192.168.1.9] (86-40-129-104-dynamic.agg2.lod.rsl-rtd.eircom.net. [86.40.129.104]) by smtp.googlemail.com with ESMTPSA id z6sm837910wmp.1.2021.11.15.15.21.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Nov 2021 15:21:08 -0800 (PST) Content-Type: multipart/mixed; boundary="------------8pTD4AOXvq0Czbxl0PEF42k1" Message-ID: <81ba0789-b6f7-5e7a-e221-f982f98c51bf@draigBrady.com> Date: Mon, 15 Nov 2021 23:20:08 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Thunderbird/95.0 Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 Content-Language: en-US To: Sudhip Nashi , Paul Eggert References: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> From: =?UTF-8?Q?P=c3=a1draig_Brady?= In-Reply-To: <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 51857 Cc: 51857@debbugs.gnu.org, Cameron Katri X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) This is a multi-part message in MIME format. --------------8pTD4AOXvq0Czbxl0PEF42k1 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 15/11/2021 18:37, Sudhip Nashi via GNU coreutils Bug Reports wrote: > >> On Nov 15, 2021, at 11:33, Paul Eggert wrote: >> >> Is the source file on a ZFS file system by any chance? See my lseek comment below. >> >>> On 11/15/21 07:48, Cameron Katri via GNU coreutils Bug Reports wrote: >>> >>> stat64("/tmp/test\0", 0x16DDC36C0, 0x0) = 0 0 >>> fstatat64(0xFFFFFFFFFFFFFFFE, 0x16DDC3C21, 0x16DDC2BA0) = 0 0 >>> fstatat64(0xFFFFFFFFFFFFFFFE, 0x16DDC3C30, 0x16DDC2B10) = 0 0 >>> open("/usr/bin/clear\0", 0x0, 0x0) = 3 0 >>> fstat64(0x3, 0x16DDC2C30, 0x0) = 0 0 >>> open("/tmp/test\0", 0x401, 0x0) = 4 0 >>> fstat64(0x4, 0x16DDC2CC0, 0x0) = 0 0 >>> fstat64(0x4, 0x16DDC2D50, 0x0) = 0 0 >>> fcntl(0x3, 0x32, 0x16DDC3200) = 0 0 >>> fcntl(0x4, 0x32, 0x16DDC2E00) = 0 0 >>> unlink("/private/tmp/test\0", 0x0, 0x0) = 0 0 >> >> What's causing this use of "/private/tmp"? I don't see that in the GNU cp source code. Can you put a breakpoint on clonefileat and see what's calling it and what its arguments are? >> >>> clonefileat(0xFFFFFFFFFFFFFFFE, 0x16DDC3200, 0xFFFFFFFFFFFFFFFE) = -1 Err#18 >>> open("/private/tmp/test\0", 0x601, 0x81ED) = 5 0 >>> close(0x5) = 0 0 >>> open("/private/tmp/test\0", 0x2, 0x0) = 5 0 >>> dup2(0x5, 0x4, 0x0) = 4 0 >>> close(0x5) = 0 0 >>> fchmod(0x4, 0x81ED, 0x0) = 0 0 >>> fchown(0x4, 0x0, 0x0) = 0 0 >>> futimes(0x4, 0x16DDC2DE0, 0x0) = 0 0 >>> sysctl([CTL_HW, 7, 0, 0, 0, 0] (2), 0x207EC4068, 0x16DDC2A30, 0x0, 0x0) = 0 0 >>> lseek(0x3, 0x0, 0x4) = -1 Err#6 >> >> That lseek call looks like OpenZFS bug 11900 . If you're using ZFS, the bug really should be fixed in your ZFS implementation as it can affect programs other than coreutils and there's no easy workaround (other than to disable efficient copying). Is this something you can look into, or ask someone with macOS and/or ZFS expertise to look into? For more, see . >> >>> ftruncate(0x4, 0x1D770, 0x0) = 0 0 >>> close(0x4) = 0 0 >>> close(0x3) = 0 0 > > Turns out lseek is broken (or at least works differently) on macOS as well (https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00054.html). Funny coincidence! I’ll take a better look later this week if I can and try to see what the exact problem is. I saw on other report of failure on macOS. I think we should disable the SEEK_DATA optimization there for now. The attached does that. I'll apply that later. I also have access to a macOS system, so I'll also test out if there are ways to use SEEK_DATA there. thanks, Pádraig --------------8pTD4AOXvq0Czbxl0PEF42k1 Content-Type: text/x-patch; charset=UTF-8; name="seek-data-apple-skip.patch" Content-Disposition: attachment; filename="seek-data-apple-skip.patch" Content-Transfer-Encoding: base64 RnJvbSBlODI2NzA3NTllN2VlYTNmYjlmYWVjOTlmY2Q5NGFkOWYyZmUwM2I2IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/UD1DMz1BMWRyYWlnPTIwQnJhZHk/ PSA8UEBkcmFpZ0JyYWR5LmNvbT4KRGF0ZTogTW9uLCAxNSBOb3YgMjAyMSAyMzoxNTowNyAr MDAwMApTdWJqZWN0OiBbUEFUQ0hdIGNvcHk6IGF2b2lkIFNFRUtfREFUQSBvbiBtYWNPUwoK KiBzcmMvY29weS5jIChpbmZlcl9zY2FudHlwZSk6IERvbid0IHByb2JlIGZvciBTRUVLX0RB VEEgc3VwcG9ydApvbiBfX0FQUExFX18gc3lzdGVtcywgYXMgU0VFS19EQVRBIHdhcyBzZWVu IHRvIHJldHVybiBFTlhJTwppbmFwcHJvcHJpYXRlbHkgdGhlcmUuCiogaW5pdC5jZmcgKHNl ZWtfZGF0YV9jYXBhYmxlXyk6IFJldHVybiBmYWlsdXJlIG9uIERhcndpbiBzeXN0ZW1zLgpB ZGRyZXNzZXMgaHR0cHM6Ly9idWdzLmdudS5vcmcvNTE4NTcKLS0tCiBpbml0LmNmZyAgIHwg NiArKysrKysKIHNyYy9jb3B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ldHVybiBQTEFJTl9TQ0FOVFlQRTsKIAotI2lmZGVmIFNFRUtfSE9MRQorI2lm IGRlZmluZWQgU0VFS19IT0xFICYmICFkZWZpbmVkIF9fQVBQTEVfXwogICBzY2FuX2luZmVy ZW5jZS0+ZXh0X3N0YXJ0ID0gbHNlZWsgKGZkLCAwLCBTRUVLX0RBVEEpOwogICBpZiAoMCA8 PSBzY2FuX2luZmVyZW5jZS0+ZXh0X3N0YXJ0IHx8IGVycm5vID09IEVOWElPKQogICAgIHJl dHVybiBMU0VFS19TQ0FOVFlQRTsKLS0gCjIuMjYuMgoK --------------8pTD4AOXvq0Czbxl0PEF42k1-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 18:30:14 2021 Received: (at 51857) by debbugs.gnu.org; 15 Nov 2021 23:30:14 +0000 Received: from localhost ([127.0.0.1]:56530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmlQU-0005TF-8e for submit@debbugs.gnu.org; Mon, 15 Nov 2021 18:30:14 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmlQT-0005Rx-36 for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 18:30:13 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 99B4A1600EF; Mon, 15 Nov 2021 15:30:07 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ia8XjWmxjV31; Mon, 15 Nov 2021 15:30:06 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E3AC3160112; Mon, 15 Nov 2021 15:30:06 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id MDQYb4uC-Ald; Mon, 15 Nov 2021 15:30:06 -0800 (PST) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C6F681600EF; Mon, 15 Nov 2021 15:30:06 -0800 (PST) Message-ID: <3d8d69cb-1908-30c2-73d7-078202c37c8f@cs.ucla.edu> Date: Mon, 15 Nov 2021 15:30:06 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 Content-Language: en-US To: =?UTF-8?Q?P=c3=a1draig_Brady?= , Sudhip Nashi References: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> <81ba0789-b6f7-5e7a-e221-f982f98c51bf@draigBrady.com> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <81ba0789-b6f7-5e7a-e221-f982f98c51bf@draigBrady.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 51857 Cc: 51857@debbugs.gnu.org, Cameron Katri X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) On 11/15/21 15:20, P=C3=A1draig Brady wrote: > I also have access to a macOS system, so I'll also test out > if there are ways to use SEEK_DATA there. Could you try the latest savannah Git instead? I installed something=20 into Gnulib that I hope lets coreutils use SEEK_DATA on macOS as before.=20 The Gnulib workaround operates on macOS only, and requires an=20 lseek+SEEK_HOLE and an lseek+SEEK_DATA where Linux, FreeBSD etc. need=20 only lseek+SEEK_DATA, but that's good enough I would think to copy holes=20 efficiently on macOS. I plan to send another email about this shortly. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 18:41:11 2021 Received: (at 51857) by debbugs.gnu.org; 15 Nov 2021 23:41:11 +0000 Received: from localhost ([127.0.0.1]:56545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmlb4-0005mQ-Mq for submit@debbugs.gnu.org; Mon, 15 Nov 2021 18:41:11 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmlb1-0005m9-UN for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 18:41:08 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 35945160100; Mon, 15 Nov 2021 15:41:02 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 2v5kwRMOOxgz; Mon, 15 Nov 2021 15:41:00 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DD2051600EF; Mon, 15 Nov 2021 15:41:00 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id SRlEf_ReSKij; Mon, 15 Nov 2021 15:41:00 -0800 (PST) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 9EB7F160100; Mon, 15 Nov 2021 15:41:00 -0800 (PST) Content-Type: multipart/mixed; boundary="------------8hq72ZXgXFOdbPUdYt8NZ2OQ" Message-ID: <3fc6f75c-83fa-6270-9c88-f5e75eca6f65@cs.ucla.edu> Date: Mon, 15 Nov 2021 15:41:00 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 Content-Language: en-US To: Sudhip Nashi References: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 51857 Cc: 51857@debbugs.gnu.org, Gnulib bugs , =?UTF-8?Q?P=c3=a1draig_Brady?= , Cameron Katri X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) This is a multi-part message in MIME format. --------------8hq72ZXgXFOdbPUdYt8NZ2OQ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 11/15/21 10:37, Sudhip Nashi wrote: > Turns out lseek is broken (or at least works differently) on macOS as w= ell (https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00054.html)= . Funny coincidence! I=E2=80=99ll take a better look later this week if I= can and try to see what the exact problem is. Thanks, I think I see the problem now. Eventually macOS will likely get fixed to work around this=20 lseek+SEEK_DATA incompatibility (as FreeBSD, Solaris, etc. all do things=20 the Linux way and that's what I think will appear in the next POSIX),=20 but in the meantime I attempted to work around the portability issue by=20 installing the attached patch into Gnulib, and by syncing coreutils to=20 the latest Gnulib. I don't use macOS so have not tested this. Please give it a try, either=20 by building from bleeding-edge coreutils on Savannah, or by building=20 from the tarball temporarily here: https://www.cs.ucla.edu/~eggert/coreutils-9.0.26-0f4d9.tar.gz Thanks. --------------8hq72ZXgXFOdbPUdYt8NZ2OQ Content-Type: text/x-patch; charset=UTF-8; name="0001-lseek-port-around-macOS-SEEK_DATA-glitch.patch" Content-Disposition: attachment; filename="0001-lseek-port-around-macOS-SEEK_DATA-glitch.patch" Content-Transfer-Encoding: base64 RnJvbSA0ZGI4ZGIzNDExMmI4NmRkZjhiYWM0OGYxNmI1YWNmZjczMmI1ZmE5IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDE1IE5vdiAyMDIxIDE1OjA4OjI1IC0wODAwClN1YmplY3Q6IFtQQVRD SF0gbHNlZWs6IHBvcnQgYXJvdW5kIG1hY09TIFNFRUtfREFUQSBnbGl0Y2gKClByb2JsZW0g cmVwb3J0ZWQgYnkgU3VkaGlwIE5hc2hpIChCdWcjNTE4NTcpLgoqIGRvYy9wb3NpeC1mdW5j dGlvbnMvbHNlZWsudGV4aSAobHNlZWspOiBNZW50aW9uIG1hY09TIFNFRUtfREFUQQppc3N1 ZS4KKiBsaWIvbHNlZWsuYyAocnBsX2xzZWVrKTogV29yayBhcm91bmQgbWFjT1MgcG9ydGFi aWxpdHkgZ2xpdGNoLgoqIG00L2xzZWVrLm00IChnbF9GVU5DX0xTRUVLKTogUmVwbGFjZSBs c2VlayBvbiBEYXJ3aW4uCiogbW9kdWxlcy9sc2VlayAoRGVwZW5kcy1vbik6IERlcGVuZCBv biBtc3ZjLW5vdGhyb3cKYW5kIGZzdGF0IG9ubHkgaWYgbmVlZGVkLgotLS0KIENoYW5nZUxv ZyAgICAgICAgICAgICAgICAgICAgICB8IDExICsrKysrKysrKysrCiBkb2MvcG9zaXgtZnVu Y3Rpb25zL2xzZWVrLnRleGkgfCAgNCArKysrCiBsaWIvbHNlZWsuYyAgICAgICAgICAgICAg ICAgICAgfCAxNiArKysrKys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XNlICRob3N0X29zIGluCisgICAgZGFyd2luKikKKyAgICAgIFJFUExBQ0VfTFNFRUs9MTs7 CisgIGVzYWMKIF0pCmRpZmYgLS1naXQgYS9tb2R1bGVzL2xzZWVrIGIvbW9kdWxlcy9sc2Vl awppbmRleCBjZWQ0NDMxMjMuLmY2MDgwOTMxOSAxMDA2NDQKLS0tIGEvbW9kdWxlcy9sc2Vl aworKysgYi9tb2R1bGVzL2xzZWVrCkBAIC05LDggKzksOCBAQCBEZXBlbmRzLW9uOgogdW5p c3RkCiBzeXNfdHlwZXMKIGxhcmdlZmlsZQotbXN2Yy1ub3Rocm93ICAgIFt0ZXN0ICRSRVBM QUNFX0xTRUVLID0gMV0KLWZzdGF0ICAgICAgICAgICBbdGVzdCAkUkVQTEFDRV9MU0VFSyA9 IDFdCittc3ZjLW5vdGhyb3cgICAgW3Rlc3QgJFdJTkRPV1NfNjRfQklUX09GRl9UID0gMV0K K2ZzdGF0ICAgICAgICAgICBbdGVzdCAiJGdsX2N2X2Z1bmNfbHNlZWtfcGlwZSIgPSBub10K IAogY29uZmlndXJlLmFjOgogZ2xfRlVOQ19MU0VFSwotLSAKMi4zMy4xCgo= --------------8hq72ZXgXFOdbPUdYt8NZ2OQ-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 18:46:25 2021 Received: (at 51857) by debbugs.gnu.org; 15 Nov 2021 23:46:25 +0000 Received: from localhost ([127.0.0.1]:56550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmlg9-0005vc-Hi for submit@debbugs.gnu.org; Mon, 15 Nov 2021 18:46:25 -0500 Received: from ms11p00im-qufo17282001.me.com ([17.58.38.57]:57623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmlg7-0005vK-OX for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 18:46:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1637019978; bh=ZGhncN8QkuZ8drJNUiDb9QzeMCQRBNSRA2rUFMxdgcs=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=PdXH0Nzkq5cWA7QvUZRCA/yjjKQBp3RhkJAS9nPsNW9hpvrUq0eHniopb4wdUug4N VfGIdIwBQDBdn5un7+Xs8qEFeke5p3veQw12lme/clP4Iq5NYNZVWlPZ5PWV1P+oKq Xrr8zzO84OCGRPZg+QNGquer7HfI9VLWUvPlBFyDhzZSWUlBvv8YO1pX4Jb587Fajh H4Pb6zkQPEDVBYhSxHayVHwmYDM4CFDTW41TpZ8Lz0bR3BQBWSlW97jwLLDHtz69Ip +sU8NaD+VBUb6cvU048J+ifwDT5XRmUlh7g7HAZyvfIGOQXX3mJ410/PtdDF/0yf8j AldIiWH+CTGag== Received: from smtpclient.apple (unknown [104.189.146.210]) by ms11p00im-qufo17282001.me.com (Postfix) with ESMTPSA id 84E77A00229; Mon, 15 Nov 2021 23:46:17 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 From: Sudhip Nashi In-Reply-To: <3fc6f75c-83fa-6270-9c88-f5e75eca6f65@cs.ucla.edu> Date: Mon, 15 Nov 2021 17:46:14 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <02868C5E-96E6-49D2-B942-E2239C967328@icloud.com> References: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> <3fc6f75c-83fa-6270-9c88-f5e75eca6f65@cs.ucla.edu> To: Paul Eggert X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.790,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-11-15=5F16:2021-11-15=5F01,2021-11-15=5F16,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 adultscore=0 suspectscore=0 clxscore=1011 mlxlogscore=999 spamscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2111150121 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 51857 Cc: 51857@debbugs.gnu.org, Gnulib bugs , =?utf-8?Q?P=C3=A1draig_Brady?= , Cameron Katri X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Awesome, thanks for the quick response! I=E2=80=99ll give this a go and = let you know the results. > On Nov 15, 2021, at 5:41 PM, Paul Eggert wrote: >=20 > On 11/15/21 10:37, Sudhip Nashi wrote: >> Turns out lseek is broken (or at least works differently) on macOS as = well = (https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00054.html). = Funny coincidence! I=E2=80=99ll take a better look later this week if I = can and try to see what the exact problem is. >=20 > Thanks, I think I see the problem now. >=20 > Eventually macOS will likely get fixed to work around this = lseek+SEEK_DATA incompatibility (as FreeBSD, Solaris, etc. all do things = the Linux way and that's what I think will appear in the next POSIX), = but in the meantime I attempted to work around the portability issue by = installing the attached patch into Gnulib, and by syncing coreutils to = the latest Gnulib. >=20 > I don't use macOS so have not tested this. Please give it a try, = either by building from bleeding-edge coreutils on Savannah, or by = building from the tarball temporarily here: >=20 > https://www.cs.ucla.edu/~eggert/coreutils-9.0.26-0f4d9.tar.gz >=20 > Thanks.<0001-lseek-port-around-macOS-SEEK_DATA-glitch.patch> From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 19:02:27 2021 Received: (at 51857) by debbugs.gnu.org; 16 Nov 2021 00:02:28 +0000 Received: from localhost ([127.0.0.1]:56570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmlvf-0006S3-LT for submit@debbugs.gnu.org; Mon, 15 Nov 2021 19:02:27 -0500 Received: from ms11p00im-qufo17291501.me.com ([17.58.38.44]:43142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmlve-0006Rq-1o for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 19:02:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1637020935; bh=0XSxo+8r/XX01uSKcIN9WKwpaH9IPEV1c5Zk6hPcfoI=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=O4Alk/TWE6cIDnCkJnETUh90atA7igZJv+GhdJB8uoDVKbn5I/y98tGf9VzZmcXey guKi1OjU0uvG10pTffE15FpieVEtDQ+9OB0M4YafxsUIlLERQtHQPToMEM1fS1ou/H 4TI5I5C5rFgnmT9C7FLR3B+2XknWpb07AdD2SbhVaxQuBvphuxQcNv8sU4QTOKlITF 5667sBcF/tmH67BdY5/P6yCiBxet7V7AvWSzt722j/dmVPhk5Bk8qY/IfkMDzo0To8 kc+pGStBbgiPvCkZUgvIzVAPdYM4MIHDmPfbmlNAp76T5omSNQq83PqoB5fGt4A206 UcjGrsEdFQtOg== Received: from smtpclient.apple (unknown [104.189.146.210]) by ms11p00im-qufo17291501.me.com (Postfix) with ESMTPSA id 9BA6210011F; Tue, 16 Nov 2021 00:02:13 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 From: Sudhip Nashi In-Reply-To: <02868C5E-96E6-49D2-B942-E2239C967328@icloud.com> Date: Mon, 15 Nov 2021 18:02:10 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <1E2CA8EF-94C1-441D-A684-DEB7A7C32B64@icloud.com> References: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> <3fc6f75c-83fa-6270-9c88-f5e75eca6f65@cs.ucla.edu> <02868C5E-96E6-49D2-B942-E2239C967328@icloud.com> To: Sudhip Nashi X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.790,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-11-15=5F16:2021-11-15=5F01,2021-11-15=5F16,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 adultscore=0 suspectscore=0 clxscore=1015 mlxlogscore=948 spamscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2111150123 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 51857 Cc: 51857@debbugs.gnu.org, Paul Eggert , Gnulib bugs , Cameron Katri , =?utf-8?Q?P=C3=A1draig_Brady?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) It doesn=E2=80=99t seem like this patch works. I compiled from the = tarball you provided, but the destination file is still filled with NULL = chars. > On Nov 15, 2021, at 5:46 PM, Sudhip Nashi via GNU coreutils Bug = Reports wrote: >=20 > Awesome, thanks for the quick response! I=E2=80=99ll give this a go = and let you know the results. >=20 >> On Nov 15, 2021, at 5:41 PM, Paul Eggert wrote: >>=20 >> On 11/15/21 10:37, Sudhip Nashi wrote: >>> Turns out lseek is broken (or at least works differently) on macOS = as well = (https://lists.gnu.org/archive/html/bug-gnulib/2018-09/msg00054.html). = Funny coincidence! I=E2=80=99ll take a better look later this week if I = can and try to see what the exact problem is. >>=20 >> Thanks, I think I see the problem now. >>=20 >> Eventually macOS will likely get fixed to work around this = lseek+SEEK_DATA incompatibility (as FreeBSD, Solaris, etc. all do things = the Linux way and that's what I think will appear in the next POSIX), = but in the meantime I attempted to work around the portability issue by = installing the attached patch into Gnulib, and by syncing coreutils to = the latest Gnulib. >>=20 >> I don't use macOS so have not tested this. Please give it a try, = either by building from bleeding-edge coreutils on Savannah, or by = building from the tarball temporarily here: >>=20 >> https://www.cs.ucla.edu/~eggert/coreutils-9.0.26-0f4d9.tar.gz >>=20 >> Thanks.<0001-lseek-port-around-macOS-SEEK_DATA-glitch.patch> >=20 >=20 >=20 >=20 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 21:10:19 2021 Received: (at 51857) by debbugs.gnu.org; 16 Nov 2021 02:10:19 +0000 Received: from localhost ([127.0.0.1]:56638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmnvP-0001gD-95 for submit@debbugs.gnu.org; Mon, 15 Nov 2021 21:10:19 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmnvN-0001fy-Ry for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 21:10:18 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E0B4A1600EF; Mon, 15 Nov 2021 18:10:11 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id xjNVi62__pxq; Mon, 15 Nov 2021 18:10:11 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 42B44160100; Mon, 15 Nov 2021 18:10:11 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BWrTQ9VEj0Go; Mon, 15 Nov 2021 18:10:11 -0800 (PST) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 23D8E1600EF; Mon, 15 Nov 2021 18:10:11 -0800 (PST) Message-ID: <43e85c70-2f4e-2093-0563-765a7956f4fb@cs.ucla.edu> Date: Mon, 15 Nov 2021 18:10:10 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 Content-Language: en-US To: Sudhip Nashi References: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> <3fc6f75c-83fa-6270-9c88-f5e75eca6f65@cs.ucla.edu> <02868C5E-96E6-49D2-B942-E2239C967328@icloud.com> <1E2CA8EF-94C1-441D-A684-DEB7A7C32B64@icloud.com> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <1E2CA8EF-94C1-441D-A684-DEB7A7C32B64@icloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 51857 Cc: 51857@debbugs.gnu.org, Gnulib bugs , Cameron Katri , =?UTF-8?Q?P=c3=a1draig_Brady?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) On 11/15/21 16:02, Sudhip Nashi wrote: > It doesn=E2=80=99t seem like this patch works. I compiled from the tarb= all you provided, but the destination file is still filled with NULL char= s. Too bad. Can you do a dtruss or at least a ktrace/kdump for the failing=20 program? I'd like to see what lseek is doing with SEEK_HOLE and=20 SEEK_DATA. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 15 22:15:13 2021 Received: (at 51857) by debbugs.gnu.org; 16 Nov 2021 03:15:13 +0000 Received: from localhost ([127.0.0.1]:56666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmowD-0003VM-6v for submit@debbugs.gnu.org; Mon, 15 Nov 2021 22:15:13 -0500 Received: from st43p00im-ztfb10063301.me.com ([17.58.63.179]:45928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmowA-0003V2-MY for 51857@debbugs.gnu.org; Mon, 15 Nov 2021 22:15:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1637032505; bh=3uC53XUVPtlRrS1sm5kfeYguNa+O27INmjDnLbe3Mko=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=phqu7HK5GDpMvHJHZcR6ASSKPFQ41nKZDyrLgPHo09t+37PrEVviRhsOyWmhyx0mt PfxyCLuOIDE9Xq7DANEWfX9+XRhQVs+2xZIlpODWLQIkxHlw+TihxGimb8G1p1wtlq fG9Qd4xCTWfBvE+2ecn6WjOX8waCJwMgy1lZcZ/K4pIi8ezB+ZFZ1nfwxqGVP8Q5ko qyb32papVM29atS8ZpBMJiBUjWW/1YRe1wpQ7E9+1q9sBQJQDMygPFysiSTVBGZIUJ YuHR1Ed/colny9rXsymzmFNDWVlLd5QER8VYMTEyJiLOzLEpK12nsclolAAMI1tA5C sSfH2KhVWm3Ig== Received: from smtpclient.apple (unknown [104.189.146.210]) by st43p00im-ztfb10063301.me.com (Postfix) with ESMTPSA id B91ECA403DF; Tue, 16 Nov 2021 03:15:01 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 From: Sudhip Nashi In-Reply-To: <43e85c70-2f4e-2093-0563-765a7956f4fb@cs.ucla.edu> Date: Mon, 15 Nov 2021 21:14:44 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <6D82032F-D259-4B40-9736-887A9796F6C2@icloud.com> References: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> <3fc6f75c-83fa-6270-9c88-f5e75eca6f65@cs.ucla.edu> <02868C5E-96E6-49D2-B942-E2239C967328@icloud.com> <1E2CA8EF-94C1-441D-A684-DEB7A7C32B64@icloud.com> <43e85c70-2f4e-2093-0563-765a7956f4fb@cs.ucla.edu> To: Paul Eggert X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.790,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-11-15=5F15:2021-11-15=5F01,2021-11-15=5F15,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 mlxlogscore=958 suspectscore=0 mlxscore=0 adultscore=0 clxscore=1015 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2111160015 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 51857 Cc: 51857@debbugs.gnu.org, Gnulib bugs , Cameron Katri , =?utf-8?Q?P=C3=A1draig_Brady?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Sure, here=E2=80=99s the dtruss output: SYSCALL(args) =3D return access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0) =3D -1 = Err#2 bsdthread_register(0x1AEC802C8, 0x1AEC802BC, 0x4000) =3D = 1073742303 0 shm_open(0x1AEB48F55, 0x0, 0xDD8000) =3D 3 0 fstat64(0x3, 0x16F0260D0, 0x0) =3D 0 0 mmap(0x0, 0x4000, 0x1, 0x40001, 0x3, 0x0) =3D 0x100F18000 = 0 close(0x3) =3D 0 0 ioctl(0x2, 0x4004667A, 0x16F02617C) =3D -1 Err#25 ioctl(0x2, 0x40487413, 0x16F026180) =3D -1 Err#25 mprotect(0x100F24000, 0x4000, 0x0) =3D 0 0 mprotect(0x100F30000, 0x4000, 0x0) =3D 0 0 mprotect(0x100F34000, 0x4000, 0x0) =3D 0 0 mprotect(0x100F40000, 0x4000, 0x0) =3D 0 0 mprotect(0x100F44000, 0x4000, 0x0) =3D 0 0 mprotect(0x100F50000, 0x4000, 0x0) =3D 0 0 mprotect(0x100F1C000, 0x90, 0x1) =3D 0 0 mprotect(0x100F1C000, 0x90, 0x3) =3D 0 0 mprotect(0x100F1C000, 0x90, 0x1) =3D 0 0 mprotect(0x100F54000, 0x4000, 0x1) =3D 0 0 mprotect(0x100F58000, 0x90, 0x1) =3D 0 0 mprotect(0x100F58000, 0x90, 0x3) =3D 0 0 mprotect(0x100F58000, 0x90, 0x1) =3D 0 0 mprotect(0x100F1C000, 0x90, 0x3) =3D 0 0 mprotect(0x100F1C000, 0x90, 0x1) =3D 0 0 mprotect(0x100F54000, 0x4000, 0x3) =3D 0 0 mprotect(0x100F54000, 0x4000, 0x1) =3D 0 0 objc_bp_assist_cfg_np(0x1AEB103C0, 0x8000000000201048, 0x0) = =3D -1 Err#5 issetugid(0x0, 0x0, 0x0) =3D 0 0 getentropy(0x16F025F98, 0x20, 0x0) =3D 0 0 getentropy(0x16F025FE8, 0x40, 0x0) =3D 0 0 getpid(0x0, 0x0, 0x0) =3D 45930 0 stat64("/AppleInternal\0", 0x16F0266E0, 0x0) =3D -1 Err#2 csops_audittoken(0xB36A, 0x7, 0x16F026210) =3D 0 0 proc_info(0x2, 0xB36A, 0xD) =3D 64 0 csops_audittoken(0xB36A, 0x7, 0x16F0262D0) =3D 0 0 sysctlbyname(kern.osvariant_status, 0x15, 0x16F026748, 0x16F026740, 0x0) = =3D 0 0 csops(0xB36A, 0x0, 0x16F02676C) =3D 0 0 mprotect(0x100E10000, 0x100000, 0x1) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_COLLATE\0", 0x0, 0x0) = =3D 3 0 fcntl_nocancel(0x3, 0x3, 0x0) =3D 0 0 getrlimit(0x1008, 0x16F027118, 0x0) =3D 0 0 fstat64(0x3, 0x16F027090, 0x0) =3D 0 0 read_nocancel(0x3, "1.1A\n\0", 0x1000) =3D 2086 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_CTYPE\0", 0x0, 0x0) = =3D 3 0 fcntl_nocancel(0x3, 0x3, 0x0) =3D 0 0 fstat64(0x3, 0x16F0271C0, 0x0) =3D 0 0 fstat64(0x3, 0x16F026FB0, 0x0) =3D 0 0 lseek(0x3, 0x0, 0x1) =3D 0 0 lseek(0x3, 0x0, 0x0) =3D 0 0 read_nocancel(0x3, "RuneMagAUTF-8\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "\0", 0x1000) =3D 4096 0 read_nocancel(0x3, "@\004\211\0", 0xF5D0) =3D 62928 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_MONETARY\0", 0x0, 0x0) = =3D 3 0 fstat64(0x3, 0x16F0271E0, 0x0) =3D 0 0 read_nocancel(0x3, "USD = \n$\n.\n,\n3;3\n\n-\n2\n2\n1\n0\n1\n0\n1\n1\n(\0", 0x22) = =3D 34 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_NUMERIC\0", 0x0, 0x0) = =3D 3 0 fstat64(0x3, 0x16F0271E0, 0x0) =3D 0 0 read_nocancel(0x3, ".\n,\n3;3\n@$\b\0", 0x8) =3D 8 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_TIME\0", 0x0, 0x0) = =3D 3 0 fstat64(0x3, 0x16F0271F0, 0x0) =3D 0 0 read_nocancel(0x3, = "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug\nSep\nOct\nNov\nDec\nJanuary\nFebr= uary\nMarch\nApril\nMay\nJune\nJuly\nAugust\nSeptember\nOctober\nNovember\= nDecember\nSun\nMon\nTue\nWed\nThu\nFri\nSat\nSunday\nMonday\nTuesday\nWed= nesday\nThursday\nFriday\nSaturday\n%H:%M:%S\n%m/%d/%Y\n%a %b %e %X = %Y\nAM\nP", 0x179) =3D 377 0 close_nocancel(0x3) =3D 0 0 open_nocancel("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/LC_MESSAGES\0", = 0x0, 0x0) =3D 3 0 fstat64(0x3, 0x16F0271F0, 0x0) =3D 0 0 read_nocancel(0x3, "^[yYsS].*\n^[nN].*\n(\0", 0x12) =3D 18 = 0 close_nocancel(0x3) =3D 0 0 geteuid(0x0, 0x0, 0x0) =3D 0 0 stat64("/tmp/filetest\0", 0x16F0276C0, 0x0) =3D -1 Err#2 fstatat64(0xFFFFFFFFFFFFFFFE, 0x16F027BDD, 0x16F027390) =3D 0 0 fstatat64(0xFFFFFFFFFFFFFFFE, 0x16F027C0B, 0x16F027300) =3D -1 = Err#2 open("/System/Library/dyld/dyld_shared_cache_arm64e\0", 0x0, 0x0) = =3D 3 0 fstat64(0x3, 0x16F027430, 0x0) =3D 0 0 open("/tmp/filetest\0", 0xA01, 0x1ED) =3D 4 0 fstat64(0x4, 0x16F027560, 0x0) =3D 0 0 sysctl([CTL_HW, 7, 0, 0, 0, 0] (2), 0x207EC4068, 0x16F027220, 0x0, 0x0) = =3D 0 0 lseek(0x3, 0x0, 0x3) =3D -1 Err#6 ftruncate(0x4, 0x59C68000, 0x0) =3D 0 0 close(0x4) =3D 0 0 close(0x3) =3D 0 0 lseek(0x0, 0x0, 0x1) =3D 21373 0 lseek(0x0, 0x0, 0x1) =3D 21373 0 lseek(0x0, 0x537D, 0x0) =3D 21373 0 close_nocancel(0x0) =3D 0 0 close_nocancel(0x1) =3D 0 0 close_nocancel(0x2) =3D 0 0 > On Nov 15, 2021, at 8:10 PM, Paul Eggert wrote: >=20 > On 11/15/21 16:02, Sudhip Nashi wrote: >> It doesn=E2=80=99t seem like this patch works. I compiled from the = tarball you provided, but the destination file is still filled with NULL = chars. >=20 > Too bad. Can you do a dtruss or at least a ktrace/kdump for the = failing program? I'd like to see what lseek is doing with SEEK_HOLE and = SEEK_DATA. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 16 02:31:21 2021 Received: (at 51857) by debbugs.gnu.org; 16 Nov 2021 07:31:21 +0000 Received: from localhost ([127.0.0.1]:56895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmsw5-0002eD-Gf for submit@debbugs.gnu.org; Tue, 16 Nov 2021 02:31:21 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmsw4-0002ds-D3 for 51857@debbugs.gnu.org; Tue, 16 Nov 2021 02:31:21 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E594616010B; Mon, 15 Nov 2021 23:31:14 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id h_frWezC1tqw; Mon, 15 Nov 2021 23:31:13 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B66D3160112; Mon, 15 Nov 2021 23:31:13 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qpeF1qK_xT_W; Mon, 15 Nov 2021 23:31:13 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 76A52160100; Mon, 15 Nov 2021 23:31:13 -0800 (PST) Content-Type: multipart/mixed; boundary="------------WjYr3psOWKvXVs0QfNGaYbcg" Message-ID: <2402fd5b-bd0c-427e-1871-0eab91bda38b@cs.ucla.edu> Date: Mon, 15 Nov 2021 23:31:11 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Content-Language: en-US To: Sudhip Nashi References: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> <3fc6f75c-83fa-6270-9c88-f5e75eca6f65@cs.ucla.edu> <02868C5E-96E6-49D2-B942-E2239C967328@icloud.com> <1E2CA8EF-94C1-441D-A684-DEB7A7C32B64@icloud.com> <43e85c70-2f4e-2093-0563-765a7956f4fb@cs.ucla.edu> <6D82032F-D259-4B40-9736-887A9796F6C2@icloud.com> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 In-Reply-To: <6D82032F-D259-4B40-9736-887A9796F6C2@icloud.com> X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 51857 Cc: 51857@debbugs.gnu.org, Gnulib bugs , Cameron Katri , =?UTF-8?Q?P=c3=a1draig_Brady?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) This is a multi-part message in MIME format. --------------WjYr3psOWKvXVs0QfNGaYbcg Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/15/21 19:14, Sudhip Nashi wrote: > lseek(0x3, 0x0, 0x3) = -1 Err#6 Oh my, it appears lseek (fd, 0, SEEK_HOLE) is failing with errno == ENXIO when the file has no holes, even though the Darwin man page clearly states that lseek should return the file size in that case (see ). So, not only does macOS lseek disagree with all other implementations, it even disagrees with the Darwin documentation. To work around this macOS problem I installed the attached further patch into Gnulib and propagated it into coreutils. Please try the latest coreutils version on Savannah, or you can simply run configure+make from the tarball that is temporarily at: https://web.cs.ucla.edu/~eggert/coreutils-9.0.28-6d0f0.tar.gz --------------WjYr3psOWKvXVs0QfNGaYbcg Content-Type: text/x-patch; charset=UTF-8; name="0001-lseek-port-around-macOS-SEEK_HOLE-glitch.patch" Content-Disposition: attachment; filename="0001-lseek-port-around-macOS-SEEK_HOLE-glitch.patch" Content-Transfer-Encoding: base64 RnJvbSAxYTI2ODE3NmZiYjE4NGUzOTNjOTg1NzVlNjFmZTY5MjI2NGM3ZDkxIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 P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AgICBvZmZfdCBuZXh0X2hvbGUgPSBs c2VlayAoZmQsIG9mZnNldCwgU0VFS19IT0xFKTsKICAgICAgIGlmIChuZXh0X2hvbGUgPCAw KQotICAgICAgICByZXR1cm4gbmV4dF9ob2xlOworICAgICAgICByZXR1cm4gZXJybm8gPT0g RU5YSU8gPyBvZmZzZXQgOiBuZXh0X2hvbGU7CiAgICAgICBpZiAobmV4dF9ob2xlICE9IG9m ZnNldCkKICAgICAgICAgd2hlbmNlID0gU0VFS19TRVQ7CiAgICAgfQotLSAKMi4zMi4wCgo= --------------WjYr3psOWKvXVs0QfNGaYbcg-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 16 02:31:25 2021 Received: (at 51857) by debbugs.gnu.org; 16 Nov 2021 07:31:25 +0000 Received: from localhost ([127.0.0.1]:56897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmsw8-0002eN-Qz for submit@debbugs.gnu.org; Tue, 16 Nov 2021 02:31:25 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:40918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmsw4-0002dt-Fc for 51857@debbugs.gnu.org; Tue, 16 Nov 2021 02:31:21 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CEAA71600EF; Mon, 15 Nov 2021 23:31:14 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id fjfMJiJjcgVL; Mon, 15 Nov 2021 23:31:13 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B1F6B16010B; Mon, 15 Nov 2021 23:31:13 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id n_FN0yF8ClvD; Mon, 15 Nov 2021 23:31:13 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 75B6E1600EF; Mon, 15 Nov 2021 23:31:13 -0800 (PST) Content-Type: multipart/mixed; boundary="------------w0gkGJvguW1kZQWerHeuqnLK" Message-ID: <42b8d25d-2d23-a468-079f-190cd0195c52@cs.ucla.edu> Date: Mon, 15 Nov 2021 23:31:12 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Content-Language: en-US To: Sudhip Nashi References: <9c99d85f-b6d0-cfc1-4ece-94bf3ba877f1@cs.ucla.edu> <8EB9BEE9-260C-4306-8E0C-7C8605177B99@icloud.com> <3fc6f75c-83fa-6270-9c88-f5e75eca6f65@cs.ucla.edu> <02868C5E-96E6-49D2-B942-E2239C967328@icloud.com> <1E2CA8EF-94C1-441D-A684-DEB7A7C32B64@icloud.com> <43e85c70-2f4e-2093-0563-765a7956f4fb@cs.ucla.edu> <6D82032F-D259-4B40-9736-887A9796F6C2@icloud.com> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 In-Reply-To: <6D82032F-D259-4B40-9736-887A9796F6C2@icloud.com> X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 51857 Cc: 51857@debbugs.gnu.org, Gnulib bugs , Cameron Katri , =?UTF-8?Q?P=c3=a1draig_Brady?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) This is a multi-part message in MIME format. --------------w0gkGJvguW1kZQWerHeuqnLK Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/15/21 19:14, Sudhip Nashi wrote: > lseek(0x3, 0x0, 0x3) = -1 Err#6 Oh my, it appears lseek (fd, 0, SEEK_HOLE) is failing with errno == ENXIO when the file has no holes, even though the Darwin man page clearly states that lseek should return the file size in that case (see ). So, not only does macOS lseek disagree with all other implementations, it even disagrees with the Darwin documentation. To work around this macOS problem I installed the attached further patch into Gnulib and propagated it into coreutils. Please try the latest coreutils version on Savannah, or you can simply run configure+make from the tarball that is temporarily at: https://web.cs.ucla.edu/~eggert/coreutils-9.0.28-6d0f0.tar.gz --------------w0gkGJvguW1kZQWerHeuqnLK Content-Type: text/x-patch; charset=UTF-8; name="0001-lseek-port-around-macOS-SEEK_HOLE-glitch.patch" Content-Disposition: attachment; filename="0001-lseek-port-around-macOS-SEEK_HOLE-glitch.patch" Content-Transfer-Encoding: base64 RnJvbSAxYTI2ODE3NmZiYjE4NGUzOTNjOTg1NzVlNjFmZTY5MjI2NGM3ZDkxIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDE1IE5vdiAyMDIxIDIyOjE3OjQ0IC0wODAwClN1YmplY3Q6IFtQQVRD SF0gbHNlZWs6IHBvcnQgYXJvdW5kIG1hY09TIFNFRUtfSE9MRSBnbGl0Y2gKClByb2JsZW0g cmVwb3J0ZWQgYnkgU3VkaGlwIE5hc2hpIChCdWcjNTE4NTcjNDcpLgoqIGxpYi9sc2Vlay5j IChycGxfbHNlZWspOiBXb3JrIGFyb3VuZCBtYWNPUyBsc2VlaytTRUVLX0hPTEUKcmV0dXJu aW5nIC0xIHdpdGggRU5YSU8gaWYgdGhlcmUgYXJlIG5vIGhvbGVzIGJlZm9yZSBFT0YsCmNv bnRyYXJ5IHRvIHRoZSBtYWNPUyBkb2N1bWVudGF0aW9uLgotLS0KIEN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KQEAgLTYxLDEwICs2MSwxMiBAQCBycGxfbHNlZWsg KGludCBmZCwgb2ZmX3Qgb2Zmc2V0LCBpbnQgd2hlbmNlKQogICAgICAgICAgZGF0YSBmb2xs b3dlZCBieSBhIHBvc3NpYmx5LWVtcHR5IGhvbGUuICBUbyB3b3JrIGFyb3VuZCB0aGlzCiAg ICAgICAgICBwb3J0YWJpbGl0eSBnbGl0Y2gsIGNoZWNrIHdoZXRoZXIgT0ZGU0VUIGlzIHdp dGhpbiBkYXRhIGJ5CiAgICAgICAgICB1c2luZyBsc2VlaytTRUVLX0hPTEUsIGFuZCBpZiBz byByZXR1cm4gdG8gT0ZGU0VUIGJ5IHVzaW5nCi0gICAgICAgICBsc2VlaytTRUVLX1NFVC4g ICovCisgICAgICAgICBsc2VlaytTRUVLX1NFVC4gIEFsc28sIGNvbnRyYXJ5IHRvIHRoZSBt YWNPUyBkb2N1bWVudGF0aW9uLAorICAgICAgICAgbHNlZWsrU0VFS19IT0xFIGNhbiBmYWls IHdpdGggRU5YSU8gaWYgdGhlcmUgYXJlIG5vIGhvbGVzIG9uCisgICAgICAgICBvciBhZnRl ciBPRkZTRVQuICBXaGF0IGEgbWVzcyEgICovCiAgICAgICBvZmZfdCBuZXh0X2hvbGUgPSBs c2VlayAoZmQsIG9mZnNldCwgU0VFS19IT0xFKTsKICAgICAgIGlmIChuZXh0X2hvbGUgPCAw KQotICAgICAgICByZXR1cm4gbmV4dF9ob2xlOworICAgICAgICByZXR1cm4gZXJybm8gPT0g RU5YSU8gPyBvZmZzZXQgOiBuZXh0X2hvbGU7CiAgICAgICBpZiAobmV4dF9ob2xlICE9IG9m ZnNldCkKICAgICAgICAgd2hlbmNlID0gU0VFS19TRVQ7CiAgICAgfQotLSAKMi4zMi4wCgo= --------------w0gkGJvguW1kZQWerHeuqnLK-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 16 14:15:11 2021 Received: (at 51857) by debbugs.gnu.org; 16 Nov 2021 19:15:12 +0000 Received: from localhost ([127.0.0.1]:59249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mn3vD-0000sr-Ge for submit@debbugs.gnu.org; Tue, 16 Nov 2021 14:15:11 -0500 Received: from ms11p00im-qufo17291901.me.com ([17.58.38.48]:59423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mn3vC-0000sU-2j for 51857@debbugs.gnu.org; Tue, 16 Nov 2021 14:15:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1637090104; bh=EKIlX788Y2hzwOW3M75CgKxpygmtfxP9zxb+OE70jeU=; h=Content-Type:From:Mime-Version:Subject:Date:Message-Id:To; b=R49LNsCv+r6bLo0anjBL/xiuHu8cdwxKxpusGc7spyw84Xmi8CSYud5qLXwKbQ+5I YRFDaQ4xsCIqzrrlAOs2HAk4P6Mbu/M3YMObr5iFNxrTRV9fetqcyAS3RFGdST1v3W 9AkZ2xNaNxUJDZhz/NOOVuQlRnPapNavkUsetDsncnfeVctSVtjUiXkOknZtIBdOs+ 57SEj0WzRLGUypv+v3xuYZbyBkLFQxIkMHWyv+YYLKc/u+7NlkFnCX8Th8GRkIkObT P8RO1AaVsrW/NDj8b2eaAd+pOm8JFoQ6AMtDPZXcoLTMVP/CxO2LEx5Di6zurtUPXe eRdxAu4Nl4TvQ== Received: from [10.94.240.254] (unknown [166.137.105.26]) by ms11p00im-qufo17291901.me.com (Postfix) with ESMTPSA id 18A3ACA0349; Tue, 16 Nov 2021 19:15:04 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Sudhip Nashi Mime-Version: 1.0 (1.0) Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 Date: Tue, 16 Nov 2021 10:40:31 -0600 Message-Id: References: <2402fd5b-bd0c-427e-1871-0eab91bda38b@cs.ucla.edu> In-Reply-To: <2402fd5b-bd0c-427e-1871-0eab91bda38b@cs.ucla.edu> To: Paul Eggert X-Mailer: iPhone Mail (18C66) X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.790,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-11-16=5F05:2021-11-15=5F01,2021-11-16=5F05,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015 mlxscore=0 malwarescore=0 mlxlogscore=620 phishscore=0 adultscore=0 suspectscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2111160092 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 51857 Cc: 51857@debbugs.gnu.org, Gnulib bugs , Cameron Katri , =?utf-8?Q?P=C3=A1draig_Brady?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > So, not only does macOS lseek disagree with all other implementations, it e= ven disagrees with the Darwin documentation. Oh wow, that=E2=80=99s convoluted. > To work around this macOS problem I installed the attached further patch i= nto Gnulib and propagated it into coreutils. Please try the latest coreutils= version on Savannah, or you can simply run configure+make from the tarball t= hat is temporarily at: >=20 > https://web.cs.ucla.edu/~eggert/coreutils-9.0.28-6d0f0.tar.gz > <0001-lseek-port-around-macOS-SEEK_HOLE-glitch.patch> It looks like this patch fixes the problem, and a quick checksum verifies th= is.= From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 16 19:43:25 2021 Received: (at 51857-done) by debbugs.gnu.org; 17 Nov 2021 00:43:25 +0000 Received: from localhost ([127.0.0.1]:59473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mn92q-0001yl-R5 for submit@debbugs.gnu.org; Tue, 16 Nov 2021 19:43:24 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:57872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mn92o-0001yQ-Un for 51857-done@debbugs.gnu.org; Tue, 16 Nov 2021 19:43:23 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 49723160051; Tue, 16 Nov 2021 16:43:17 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id s0jFsI3O5gF4; Tue, 16 Nov 2021 16:43:16 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A5E30160071; Tue, 16 Nov 2021 16:43:16 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LuwhFloIJLXA; Tue, 16 Nov 2021 16:43:16 -0800 (PST) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 84F5C160051; Tue, 16 Nov 2021 16:43:16 -0800 (PST) Message-ID: Date: Tue, 16 Nov 2021 16:43:16 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: bug#51857: cross-filesystem copying broken on macOS with coreutils >= 9.0 Content-Language: en-US To: Sudhip Nashi References: <2402fd5b-bd0c-427e-1871-0eab91bda38b@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 51857-done Cc: =?UTF-8?Q?P=c3=a1draig_Brady?= , 51857-done@debbugs.gnu.org, Gnulib bugs , Cameron Katri X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) On 11/16/21 08:40, Sudhip Nashi via GNU coreutils Bug Reports wrote: > It looks like this patch fixes the problem, and a quick checksum verifies this. Thanks for checking. Closing the Coreutils bug report. From unknown Fri Aug 15 12:52:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 15 Dec 2021 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator