Re: Trouble with cygwin git
Corinna Vinschen corinna-cygwin at cygwin.com writes: [...] Could you create a simple, self-contained testcase in plain C, which allows to reproduce the problem? I did try to do this, and couldn't reproduce the failure. The failure only happens in the git context for whatever reason. Note: To try to reproduce the problem with a simple C program, I used exactly the same files and filenames git had chosen in exactly the same directories. From some older postings on this mailing list, I got the idea to try: MoveFileEx(existing, new, MOVEFILE_CREATE_HARDLINK); instead of: CreateHardLinkA(new, existing, NULL); in fhandler_disk_file.cc, and this actually worked for me. I'm currently running a cygwin1.dll with this local modification, and haven't seen problems yet. The funny thing is I have used canned git/cygwin successfully on other machines. Only with this particular machine have I seen this problem. Maybe it has to do with some interaction with a virus-checking program or other background process. Corinna PS I am using gmane to post this message, and cannot CC you directly; sorry about that. MP -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Trouble with cygwin git
On Jan 9 19:18, MP wrote: Only with this particular machine have I seen this problem. Maybe it has to do with some interaction with a virus-checking program or other background process. Corinna PS I am using gmane to post this message, and cannot CC you directly; sorry about that. I'm glad you can't. Did you read my signature? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Trouble with cygwin git
On Jan 2 19:35, MP wrote: I dug into this, and found that the failure happens here: res = fh-link (newpath); in the link() function of file src/winsup/cygwin/syscalls.cc. res is -1, and errno == EEXIST at this point. In the call above, newpath is: /cygdrive/c/git/git/.git/objects/pack/pack- d629a7029e3a941884c4bea2b33cc27e32f55779.pack Digging further, this line fails: if (CreateHardLinkA (newpc, pc, NULL)) goto success; in function fhandler_disk_file::link(), fhandler_disk_file.cc. CreateHardLinkA () returns 0, and GetLastError() returns 183 (ERROR_ALREADY_EXISTS: Cannot create a file when that file already exists). In the CreateHardLinkA() call above, newpc.get_win32() yields: c:\git\git\.git\objects\pack\pack-d629a7029e3a941884c4bea2b33cc27e32f55779.pack pc.get_win32() yields: c:\git\git\.git\objects\tmp_pack_btsO9s I know that the destination file (newpc) does not exist; so I am perplexed why CreateHardLinkA() is failing. In the CreateHardLink() documentation on MSDN, I see this comment: if you open a file that does not allow sharing, another application cannot share the file by creating a new hard link to the file However, I see that all calls to CreateFile() in XP Cygwin happen with: FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE Any ideas why CreateHardLinkA() could still be failing? Could you create a simple, self-contained testcase in plain C, which allows to reproduce the problem? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: Trouble with cygwin git
I'm having the problem cloning a git repository using Cygwin git 1.5.3.5: [...] fatal: failed to unpack tree object HEAD I dug into this, and found that the failure happens here: res = fh-link (newpath); in the link() function of file src/winsup/cygwin/syscalls.cc. res is -1, and errno == EEXIST at this point. In the call above, newpath is: /cygdrive/c/git/git/.git/objects/pack/pack- d629a7029e3a941884c4bea2b33cc27e32f55779.pack Digging further, this line fails: if (CreateHardLinkA (newpc, pc, NULL)) goto success; in function fhandler_disk_file::link(), fhandler_disk_file.cc. CreateHardLinkA () returns 0, and GetLastError() returns 183 (ERROR_ALREADY_EXISTS: Cannot create a file when that file already exists). In the CreateHardLinkA() call above, newpc.get_win32() yields: c:\git\git\.git\objects\pack\pack-d629a7029e3a941884c4bea2b33cc27e32f55779.pack pc.get_win32() yields: c:\git\git\.git\objects\tmp_pack_btsO9s I know that the destination file (newpc) does not exist; so I am perplexed why CreateHardLinkA() is failing. In the CreateHardLink() documentation on MSDN, I see this comment: if you open a file that does not allow sharing, another application cannot share the file by creating a new hard link to the file However, I see that all calls to CreateFile() in XP Cygwin happen with: FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE Any ideas why CreateHardLinkA() could still be failing? Thanks, MP -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Trouble with cygwin git
I'm having the problem cloning a git repository using Cygwin git 1.5.3.5: $ git clone git://git.kernel.org/pub/scm/git/git.git Initialized empty Git repository in /git/git/.git/ remote: Generating pack... remote: Counting objects: 4991 Done counting 67423 objects. remote: Deltifying 67423 objects... remote: 100% (67423/67423) done Indexing 67423 objects... remote: Total 67423 (delta 47516), reused 66055 (delta 46502) 100% (67423/67423) done Resolving 47516 deltas... 100% (47516/47516) done fatal: failed to unpack tree object HEAD Cygwin information: $ cygcheck -s [...] C:\cygwin / system binmode c:\DOCUME~1\xx\cvs /cvs system binmode c:\DOCUME~1\xx\git /git system binmode C:\cygwin/bin /usr/bin system binmode C:\cygwin/lib /usr/lib system binmode .. /cygdrive system binmode,cygdrive [...] Cygwin DLL version info: DLL version: 1.5.25 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 156 Shared data: 4 DLL identifier: cygwin1 Mount registry: 2 Cygnus registry name: Cygnus Solutions Cygwin registry name: Cygwin Program options name: Program Options Cygwin mount registry name: mounts v2 Cygdrive flags: cygdrive flags Cygdrive prefix: cygdrive prefix Cygdrive default prefix: Build date: Fri Dec 14 19:21:07 CET 2007 CVS tag: cr-0x5f1 Shared id: cygwin1S4 [...] Note above that all mounts are binary. In git, what is failing is the following fragment on sha1_file.c, link_temp_to_file(), around line 1968: if (!link(tmpfile, filename)) return 0; tmpfile: /git/git/.git/objects/tmp_pack_H4xHmD filename: /git/git/.git/objects/pack/pack-139482038782b17f70018a3222052c02c7254a01.pack errno upon return: EEXIST I don't think this part of sha1_file.c has changed in some time. Has Cygwin link() changed recently? FWIW, if I rewrite the above fragment as: if (!rename(tmpfile, filename)) return 0; I don't see the failure anymore. Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/