delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/12/05/06:35:49

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=rN6fuD5slktnZhS36LAZ/3hV7KS0jgQGJ+jdZxLWXVN2peTbTaIVi
eYTyzLb48nH+2khCbV6KBazY00wN+zg2L2SXB7ieNKtpJHGbG26OFq130y025Bqw
KnERKaTqkPNXru9zF6cD7GY3s7HUI8j+tEv1GgYAQBT4H+DbLxK6n4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=m5F3wKKFmPHg7+5KNEjfPfBqCkk=; b=mUMotlXHyyMnbKcCoWnouutSSbId
cCyJhuiExzmcasZvn9gQYrhLvCKPbsJ8+1Oan/T2JVcN1QFGm4nMOtx7A9TC5jcj
Fec2aFpuWhd8WQrUG2wuWUzQm12Eu/g4+W3/cPpfzeBiiA2LcgtTdn+drCdFXfX7
fZglLen97sRLSug=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Fri, 5 Dec 2014 12:35:28 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [cygwin] Cygwin's git says "error: failed to read delta-pack base object"
Message-ID: <20141205113528.GK3810@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAOOocNnOK9cRt=zbVZqL=ao1fG7kZGgxc+Qxn9VLUU48uHL1vQ AT mail DOT gmail DOT com> <20141204224253 DOT GA25789 AT dinwoodie DOT org>
MIME-Version: 1.0
In-Reply-To: <20141204224253.GA25789@dinwoodie.org>
User-Agent: Mutt/1.5.23 (2014-03-12)

--15Rf4wGOrHmWCZoK
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Dec  4 22:42, Adam Dinwoodie wrote:
> On Thu, Dec 04, 2014 at 04:27:51PM -0500, Dave Lindbergh wrote:
> > You are more than welcome to read the strace output if that'll give
> > you a clue (it doesn't give me one). All 1.7 MBytes of it are at
> > http://nerdfever.com/files/strace.txt
> >=20
> > (That comes from "strace git clone
> > https://github.com/nerdfever/pic32mx-bmf >strace.txt")
> >=20
> > I'm still stumped.
>=20
> Okay, I'm looking through this trace in the hope of finding something.
> The below looks suspicious, but I'm not sufficiently familiar with
> either Git or Cygwin internals to know (a) whether this is a problem at
> all or (b) if it is a problem, whether it's a symptom of an earlier
> problem I haven't spotted on my brief skim.
>=20
>       616 12330609 [main] git 2348 unlink_nt: Trying to delete \??\Z:\pic=
32mx-bmf\.git\objects\30, isdir =3D 1
>      3190 12333799 [main] git 2348 unlink_nt: Setting delete disposition =
on \??\Z:\pic32mx-bmf\.git\objects\30 failed, status =3D 0xC0000101
>      6362 12340161 [main] git 2348 unlink_nt: Try-to-bin \??\Z:\pic32mx-b=
mf\.git\objects\30
>     24341 12364502 [main] git 2348 try_to_bin: \??\Z:\pic32mx-bmf\.git\ob=
jects\30, return bin_status 3
>       645 12365147 [main] git 2348 unlink_nt: Try \??\Z:\pic32mx-bmf\.git=
\objects\30 again
>     12250 12377397 [main] git 2348 unlink_nt: Setting delete disposition =
on \??\Z:\pic32mx-bmf\.git\objects\30 failed, status =3D 0xC0000101
>     22680 12400077 [main] git 2348 unlink_nt: Try \??\Z:\pic32mx-bmf\.git=
\objects\30 again
>      8487 12408564 [main] git 2348 unlink_nt: Setting delete disposition =
on \??\Z:\pic32mx-bmf\.git\objects\30 failed, status =3D 0xC0000101
>      1903 12410467 [main] git 2348 unlink_nt: Try \??\Z:\pic32mx-bmf\.git=
\objects\30 again
>     <above two lines repeated several more times>

First a sharing violation (not visible in the above snippet), then
directory not empty.

This seems to be the result of an earlier problem.  What I found in
the strace is this:

- Create file Z:\pic32mx-bmf\.git\objects\30\tmp_obj_YljwNZ

- open file, write something, close file.

- link (Z:\pic32mx-bmf\.git\objects\30\tmp_obj_YljwNZ,
	Z:\pic32mx-bmf\.git\objects\30\0bdeb2fd209d24afb865584da10b78aa8fefc4)
  succeeds.

- unlink (Z:\pic32mx-bmf\.git\objects\30\tmp_obj_YljwNZ) succeeds

- Trying to open
  Z:\pic32mx-bmf\.git\objects\30\0bdeb2fd209d24afb865584da10b78aa8fefc4
  but the file doesn't exist and NtCreateFile fails with status
  0xC0000034, STATUS_OBJECT_NAME_NOT_FOUND --> ENOENT.

- Subsequent unlink (Z:\pic32mx-bmf\.git\objects\30) fails with a
  STATUS_DIRECTORY_NOT_EMPTY --> ENOTEMPTY.

- git seems to be prepared for such a case, the parent process calls
  opendir/readdir on the directory.  Enumerating the files in
  Z:\pic32mx-bmf\.git\objects\30 shows the entries ".", ".." and
  "0bdeb2fd209d24afb865584da10b78aa8fefc4".

- Then git calls lstat on the file, which results in NtOpenFile
  returning status STATUS_OBJECT_NAME_NOT_FOUND again.

- From a POSIX POV this means "somebody else" deleted the file,
  so the dir is empty now.  Git tries to delete the directory again,
  which again results in STATUS_DIRECTORY_NOT_EMPTY --> ENOTEMPTY
  and, internally, a sharing violation which disallows to move the
  directory out of the way.

This looks suspiciously like a bug in the remote filesystem.  Link
succeeded, so there are two links to the same file in the directory.
Unlinking link 1 succeeds, so there's still one link to the file in the
directory, but link 2 is inaccessible as if the file has been deleted
completely.  Thus, a full POSIX git on this drive is broken.

Can you please run

  /usr/lib/csih/getVolInfo /cygdrive/z

and paste the output here?  Maybe I can workaround this in the next
Cygwin version.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--15Rf4wGOrHmWCZoK
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUgZiAAAoJEPU2Bp2uRE+gRZEP/0np7sdHen05fQcPpxfQJfMq
OP2CXbdFfn/rFclNcwtuZiIxdoCIhtr3dDEahuhLw+gBR754ClxQ6etkmQ3Tc131
rgB0YoCK9Kj8PlxmQQsWjVNB3R0/9+vFn+e0poA4i/m+xHpPhiSP3tXnNuuwuuyw
kLRQMJpTW/rPss/ShTq6dsalF0WXK5jRWmmDhTROJPuWdn5UwObVoBPN9hnI8ejI
tIiNWaSnITbCCfdMXBZnDSjBqN1+Va/KPtP1qgqpfXkvfuhTXp0uMOP4zzapm3g8
omH07bumaymniz58LLWwBR348gT1erIjVZ0F+L19fMqlXNJoSlFa8r/FXTeylSz+
sVSzjmpT0W6C4xVq2a22AxK6QlVmqwFzPEjoMa0CQ+ftxl5C1XdWbdB39FC69Uhu
F3DUsRAB4gb1s4rme9y0KwVaAhkckUCk7NhI9/faA5pfL30LlDAppgXrdrbr4AiV
tMbK8uRN9ZWzaTOOv4g2jHMjjqSTdaU4e5EDTjX907J40Tfb7MkgVKy59ybtCjf4
ayavRcaajumoxj8jxx3+sWmQyGOUOcdMMGDixrjb2CEDki7Tz0zTh+fMpij4sNta
IRieFhZOUje8cwA/2IusbchNWKHNjREMBs4MTQobF0aTHuJBOjD6/voJFO4dwNUP
7Jzi0RKyFlhqNOv1D+nv
=dV8O
-----END PGP SIGNATURE-----

--15Rf4wGOrHmWCZoK--

- Raw text -


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