This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cvs checkout fails in directory that can be accessed via both textmode and binmode mounts


Jacek Trzmiel wrote:
> 
> Hi Pierre,
> 
> > In fact that's normal. When cygwin starts under strace it only knows
> > the Windows current directory.
> 
> Thanks for info.
> 
> > Please try
> > cd /
> > strace -o trace.txt sh -c "cd /testmnt/cygwin/test; cvs something"
> > choosing a "something" that displays the problem without
> > generating a huge trace.
> 
> Attached result of:
> sc0rp@sc0rp /
> $ strace -o ~/strace2.out sh -c "cd /testmnt/cygwin/test; cvs -d
> /testmnt/cvsrep co prj"
> : No such file or directoryirectory /testmnt/cvsrep/prj
> cvs checkout: skipping directory prj

You have exposed an old bug in Cygwin.
This is what happens

  245  146689 [main] cvs 696 open: open (./CVS/Entries, 0x602)

   65  146754 [main] cvs 696 normalize_posix_path: src ./CVS/Entries

   62  146816 [main] cvs 696 cwdstuff::get: posix /testmnt/cygwin/test/prj


CVS/Entries is opened in text mode and  /testmnt/cvsrep/prj is written to it

   65  156719 [main] cvs 696 open: open (., 0x0)

   68  156787 [main] cvs 696 normalize_posix_path: src .

   60  156847 [main] cvs 696 cwdstuff::get: posix /testmnt/cygwin/test/prj

   61  158197 [main] cvs 696 open: 6 = open (., 0x0)


   63  158260 [main] cvs 696 chdir: dir '/home/sc0rp'


   62  160106 [main] cvs 696 chdir: 0 = chdir() cygheap->cwd.posix '/test/prj' native 'c:\cygwin\test\prj'

   61  160167 [main] cvs 696 fchdir: 0 = fchdir (6)


The bug is that an fchdir does a chdir to the Windows path,
which gets mapped to the wrong Posix path.

   67  196039 [main] cvs 696 open: open (CVS/Entries, 0x0)

   62  196101 [main] cvs 696 normalize_posix_path: src CVS/Entries

   60  196161 [main] cvs 696 cwdstuff::get: posix /test/prj


This time CVS/Entries is opened in binary mode and the filename
is read with a final \r

The fix is easy.

I am wondering why the bug is not exposed in 1.5.9
Care to strace it? 

Pierre

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]