www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/02/14/09:15:45

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51EEFiJ91577646
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 51EEFiJ91577646
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=xUZeFaY+
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 150F63858C3A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1739542543;
bh=GyyASCcoAHIF8VNNoINFFaYULcUvBNvcV1MB6xbg+rE=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=xUZeFaY+dWVKE9/IS/tPlGkxnxOPJTnnkWA50xRl9U1QG2PPokneAq/SFAM2TpVA9
FPrvZZtFZ4aknUDhbVh8BDtA2CCG8alpmxOAc6VZlrCFvtn+tCMz2NTMHHF682uG8d
kwX/DuF33ZRYR4Z8r2yiEM9FVuDWA3HfhEZyUGXE=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B891F3858C78
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B891F3858C78
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1739542465; cv=none;
b=BlOYVLtSE9dOyO0aHJ/4z0h6V63bLMtL6M31vWXRi2f1++uN5cgw2PxLv1j/fQ8L3xuPrhtc3LDFbloKkYLeLcofQevWrpgHvfUK0UG4YZ3HRYwHiglIV6DmA5jmbADOB1ArhHFZ6zKc/8Hd9uNNrC5GmDKp5VE5cE49GD6tlU0=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1739542465; c=relaxed/simple;
bh=jEzjqH2g/J+1skMoPSFhjz4vNM8b1Z9IYolDTKK3gk8=;
h=Subject:To:From:Message-ID:Date:MIME-Version;
b=ZCJgyGqRwGOHIV7LhSoRuFst7Vmw4BY0e/YtmDEwbYjnX6RhkJUwKS4gEzlfUOoi+2SUOnpok0mMLA4vcb2UGd+aynyMM7ueP+975IbHQvDD9xTW+UIENhOxDB1iGXOqwRSAR78vsNBb4A8a8SzHrNDmOpKln6KEdM2AyVt09zg=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B891F3858C78
Subject: Re: Cygwin 3.6 /usr/bin/cp from "coreutils" version 9.5-1 stuck in an
endless loop...
To: cygwin AT cygwin DOT com
References: <CAKAoaQmwna7sSfpYFn0OUsqpdXAgJ5FyaNkhKv6K+otr0Oa5QA AT mail DOT gmail DOT com>
<4712dcf7-1d4d-4d27-b7c1-b705d3a0a553 AT SystematicSW DOT ab DOT ca>
<CAKAoaQ=aj+xB2J65Rgv1tV4oSK9fq0tk8Bq6ZoXAoOG_hBR5eA AT mail DOT gmail DOT com>
Message-ID: <7ddec979-98cd-69a3-6b51-74bb1b1e9e71@t-online.de>
Date: Fri, 14 Feb 2025 15:14:10 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101
SeaMonkey/2.53.20
MIME-Version: 1.0
In-Reply-To: <CAKAoaQ=aj+xB2J65Rgv1tV4oSK9fq0tk8Bq6ZoXAoOG_hBR5eA@mail.gmail.com>
X-TOI-EXPURGATEID: 150726::1739542449-F17F9A89-AB6224ED/0/0 CLEAN NORMAL
X-TOI-MSGID: e0273203-ee72-4dae-93ed-29ff01f181ba
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Christian Franke via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Christian Franke <Christian DOT Franke AT t-online DOT de>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 51EEFiJ91577646

On Tue, Jan 14, 2025, Roland Mainz via Cygwin wrote:
> On Tue, Jan 14, 2025 at 7:19 AM Brian Inglis via Cygwin
> <cygwin AT cygwin DOT com> wrote:
>> On 2025-01-13 13:10, Roland Mainz via Cygwin wrote:
>>> I just hit an endless loop with /usr/bin/cp from "coreutils" version
>>> 9.5-1 copying a larger *.pdb file (it seems that only this specific
>>> file is affected...) from Visual Studio 19.
>>>
>>> Using strace -p $pid_of_cp I get this output:
>>> ---- snip ----
>>> ...
>>>     212 11917852 [main] cp 1319 fhandler_base::lseek: setting file
>>> pointer to 1708032
>>>     200 11918052 [main] cp 1319 lseek: 1708032 = lseek(4, 1708032, 3)
>>>     239 11918291 [main] cp 1319 fhandler_base::lseek: setting file
>>> pointer to 1708032
>>>     266 11918557 [main] cp 1319 lseek: 1708032 = lseek(4, 1708032, 4)
>>>     160 11918717 [main] cp 1319 fhandler_base::lseek: setting file
>>> pointer to 1708032
> [snip]
>>> ...
>>>    ---- snip ----
>>> This never stops, even after a couple of hours, but cp(1) can be
>>> killed with <CTRL-C>
>>>
>>> Downgrading to "coreutils" version 9.0-1 fixes the problem.
>>>
>>> Cygwin version itself is
>>> "CYGWIN_NT-10.0-19045 chickenmonster 3.6.0-0.304.g264544bf72f6.x86_64 2025-01-13 10:15 UTC x86_64 Cygwin"
>> The command is not simply looping, it is repeating 4 SEEK_HOLE, 0 SEEK_SET, 3
>> SEEK_DATA, at the same file offset, which looks like some kind of retry cycle,
>> but each of the operations are succeeding.
>>
>> What is the exact command you are running and what are the source and target
>> filesystems?
> ...
> I think I found the problem:
> The *.pdb file uses NTFS compression:
> ---- snip ----
> /bin/winfsinfo filebasicinfo "$(cygpath -w
> $PWD/../build.vc19/x64/Debug/nfs41_driver.pdb)"
> (
>         ...
>         typeset -a FileAttributes=(
>                 FILE_ATTRIBUTE_ARCHIVE
>                 FILE_ATTRIBUTE_COMPRESSED
>         )
> )
> ---- snip ----
>
> If I remove the "FILE_ATTRIBUTE_COMPRESSED" flag /bin/cp works without problems.
> I think the issues here are:
> 1. Coreutils 9.5-1 /bin/cp erroneously assumes that a file is sparse
> if the number of blocks is smaller than $((filesize / fs_blocksize)) -
> but in this case the file is NOT sparse, just compressed.
> 2. The loop to copy a sparse file is faulty because there are no holes
> in that file. That itself is IMHO already a bad idea to have a
> separate codepath for sparse files, just the normal codepath should
> use SEEK_HOLE and just skip those in the destination

The infinite loop occurs because SEEK_DATA behaves different from Linux 
and POSIX, see:
https://sourceware.org/pipermail/cygwin/2025-February/257330.html

-- 
Regards,
Christian


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019