www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/01/14/05:14:17

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 50EAEGng3252613
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 50EAEGng3252613
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=MbvziSA4
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 005A7385700A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1736849655;
bh=TI2HzDgFNaAtcYtfTIgQIc58/zMG6mbz3gKR/EvpkXM=;
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=MbvziSA43AJSe6fdRnZAy9bp/gYqK4wa4iGEQT2AX5wlA3mccddN4wWiW/xI0X/wM
F0lpijWwdvHergC6NKZJcpphxdQipDoQSHZgmENUukD3Kww8pYHPu3kwrvQeN1RKJ6
dibmsZY8ScX5h2Y2UFPg/NCcG/eCXoYBm027M3Nc=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 273DC385700A
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 273DC385700A
ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1736849625; cv=pass;
b=LaPnTGNr0CrLSwB7juKV/K1HrMshxVSCZv9zCPChSBp8xxCzgGr08VwSIArNxrxbz9flgSu2e/NsjDQtY24Dkqjsu/6jyV/EVqZjGVRmWoJV21wYoXh6R+LWydhgWDB0P91BU15MKbm8zu41EWfwE7uHIkXJlxT/5SfWsR1zOhY=
ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key;
t=1736849625; c=relaxed/simple;
bh=RovV7zdXehXEw38RdfnKYJyJr1ADV27hHFsEqoBphMA=;
h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;
b=N38byhIXcgWmv4EgJcaNUc/6OhxMKzuG6vdOiNJfu9G24njE6vEph9tID+BegeSwdbx50/Yrw6OCxS3qZnb754CT+hx4WMJVLrFOtlP66AVTrzwWTNffBzux8QkF3/iF74cLVNNjN0kCB4/N39jqtMw9ZnulWZOkhn8R3gIZCGM=
ARC-Authentication-Results: i=2; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 273DC385700A
X-Sender-Id: dreamhost|x-authsender|gisburn AT nrubsig DOT org
ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1736849623; a=rsa-sha256;
cv=none;
b=DXk5wxq3fkpCbUhrCR+L3/y2a7vUAXGVFNwzQ0yWFFsyQpileebpky7JoTMQ9x3wFdCHt5
KoybxRJocVSdnWB91bparI5jSJ6YU67RxqCBbJwr4NE63n41gqWd8LM5iOAAUE5ei+MMa0
0+2UM+Z747x2pnn+3rDq36w7liGiFXcXgAvDMtC0iQO8NH5IgqTTvNiRBE5Ltk24u+VipE
nVE8c/F1VRszYYNs/SnOToKSRugCuSwMkE7gForcnvMvX8yJDIwLIShPVONjCkv8Tws9Sq
o3N4r377iZLgYifxQ8p4Mz+ts+nNgsQ8W+6WMQ4Ae3VY1iGFBo1R3mQTEeIZPQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=mailchannels.net; s=arc-2022; t=1736849623;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=pepZZQOHXmWpUkf+qWV1QfrxtxU0gTxrPJqfOiQpSR0=;
b=C4cIrEgWipCbD5PZGPFoe14G79GgOjRGqklvFhDOkT/o5eg5SUXCwQl8NRImfkueK7Tgc+
W/D0S1GTGSXcuQE/YWjTO9jSPdr4cRhLiMK7LLAyprA6zkyVp1TTcHQ3MMdm2GcfC0/ldt
u8NTwl3vkYJ8VJPC18i8Sh1I1P+MkFfhLerXS3FGqpmpuL06heJRJ4FOWkGFgEw0hBDj2Y
4+N5PMVLa4LC57z36V3WXWlUjFZQ4zRZVdXTtbuaqiy9+fDMDji+nuPIpFY+0qM1p0Uq3o
pDlySZO+Xd7KjF46FuGbe7t8Wv+LimYnJ6xqDvJBT1Is3/pPOEEcX9QFS6w7Gw==
ARC-Authentication-Results: i=1; rspamd-7df4dcbd86-pz5cf;
auth=pass smtp.auth=dreamhost smtp.mailfrom=roland DOT mainz AT nrubsig DOT org
X-Sender-Id: dreamhost|x-authsender|gisburn AT nrubsig DOT org
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|gisburn AT nrubsig DOT org
X-MailChannels-Auth-Id: dreamhost
X-Share-Exultant: 70f501ca33350947_1736849624017_1483286617
X-MC-Loop-Signature: 1736849624017:724013466
X-MC-Ingress-Time: 1736849624017
X-Gm-Message-State: AOJu0YwSg7PWo9uF7QDu7rfKpJAxTd+F9rkRIhN3Lhcz6YvecYdbYPJ/
HKCwnpyqFIxqMwYDXPzzPjo+Mpik9nOgice+U1LzQ9D5hrwIvP/bVzmBhifoEyFw3SF5RQjZPSa
s5FWvaO4bHrVun8wI5oY7K6Je/6M=
X-Google-Smtp-Source: AGHT+IGT+b/FSLyWQstJAWi5nISYLvHMPEFyo/2LH8DMA25Xgda+AnXsQU1XxUzFBEJIidvgch/q8Lq3PlwD0MOpYbo=
X-Received: by 2002:a5d:64cc:0:b0:386:366d:5d0b with SMTP id
ffacd0b85a97d-38a8732098dmr20580607f8f.55.1736849621858; Tue, 14 Jan 2025
02:13:41 -0800 (PST)
MIME-Version: 1.0
References: <CAKAoaQmwna7sSfpYFn0OUsqpdXAgJ5FyaNkhKv6K+otr0Oa5QA AT mail DOT gmail DOT com>
<4712dcf7-1d4d-4d27-b7c1-b705d3a0a553 AT SystematicSW DOT ab DOT ca>
In-Reply-To: <4712dcf7-1d4d-4d27-b7c1-b705d3a0a553@SystematicSW.ab.ca>
Date: Tue, 14 Jan 2025 11:13:15 +0100
X-Gmail-Original-Message-ID: <CAKAoaQ=aj+xB2J65Rgv1tV4oSK9fq0tk8Bq6ZoXAoOG_hBR5eA AT mail DOT gmail DOT com>
X-Gm-Features: AbW1kvZKiRF84IXbylYqFml_7nMci_lNYFGhKYmTx1UksLgcgxHLEUc6J6PK4rc
Message-ID: <CAKAoaQ=aj+xB2J65Rgv1tV4oSK9fq0tk8Bq6ZoXAoOG_hBR5eA@mail.gmail.com>
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
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-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: Roland Mainz via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Roland Mainz <roland DOT mainz AT nrubsig DOT org>
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 50EAEGng3252613

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?

See https://nrubsig.kpaste.net/70f1c8

> What is the exact size of the file and what device type is it on: SSD or HDD?

"Virtual SSD", which is VMware's NVME emulation

> What is the allocation size of the file and how many 4KB holes (zeroed blocks)
> are in the file?
>
> Could you please try running the command under strace to see what it is doing
> before it gets in to that cycle?

See https://nrubsig.kpaste.net/70f1c8 for the strace log.

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)"
(
       filename='C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client-kofemannvacation\build.vc19\x64\Debug\nfs41_driver.pdb'
       CreationTime=133812707624654816
       LastAccessTime=133813220892976366
       LastWriteTime=133812707639811081
       ChangeTime=133812707639811081
       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

----

Bye,
Roland
-- 
  __ .  . __
 (o.\ \/ /.o) roland DOT mainz AT nrubsig DOT org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

-- 
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