From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: [cygwin] Cygwin's git says "error: failed to read delta-pack base object"
Date: Fri, 05 Dec 2014 11:35:00 -0000 [thread overview]
Message-ID: <20141205113528.GK3810@calimero.vinschen.de> (raw)
In-Reply-To: <20141204224253.GA25789@dinwoodie.org>
[-- Attachment #1: Type: text/plain, Size: 4012 bytes --]
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
> >
> > (That comes from "strace git clone
> > https://github.com/nerdfever/pic32mx-bmf >strace.txt")
> >
> > I'm still stumped.
>
> 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.
>
> 616 12330609 [main] git 2348 unlink_nt: Trying to delete \??\Z:\pic32mx-bmf\.git\objects\30, isdir = 1
> 3190 12333799 [main] git 2348 unlink_nt: Setting delete disposition on \??\Z:\pic32mx-bmf\.git\objects\30 failed, status = 0xC0000101
> 6362 12340161 [main] git 2348 unlink_nt: Try-to-bin \??\Z:\pic32mx-bmf\.git\objects\30
> 24341 12364502 [main] git 2348 try_to_bin: \??\Z:\pic32mx-bmf\.git\objects\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 = 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 = 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
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-12-05 11:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 21:28 Dave Lindbergh
2014-12-04 22:43 ` Adam Dinwoodie
2014-12-05 11:35 ` Corinna Vinschen [this message]
2014-12-05 17:39 ` Dave L
2014-12-07 10:11 ` Corinna Vinschen
2014-12-05 8:46 ` Csaba Raduly
-- strict thread matches above, loose matches on Subject: below --
2014-12-03 20:30 Dave L
[not found] ` <BCA71D26F26F4EC487E0D811F70EC4F5@black>
2014-12-03 23:07 ` [cygwin] " Dave Lindbergh
2014-12-04 9:53 ` Corinna Vinschen
2014-12-05 5:05 ` Andrey Repin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141205113528.GK3810@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).