--- "Pierre A. Humblet" <[EMAIL PROTECTED]> wrote: > On Wed, Jun 16, 2004 at 12:14:49PM -0700, Rick Rankin wrote: > > --- "Pierre A. Humblet" <[EMAIL PROTECTED]> wrote: > > > On Wed, Jun 16, 2004 at 10:10:09AM -0700, Rick Rankin wrote: > > > > > > > > OK, it *must* be something specific to the particular share I've been > > > working > > > > with. I just mapped some other drives from other servers, tried the > same > > > tar > > > > command, and it worked just fine. The puzzling part is that on the > problem > > > > share, the *only* thing that fails is tar. I can create files with > touch, > > > cp, > > > > vim, etc., etc. and I can remove them with rm, so it doesn't appear to > be a > > > > permission problem. It's also not a space problem, so I'm back to > building > > > the > > > > debug versions... > > > > > > Try writing a one line program that opens the file with flags 0x601. > > > That's what tar does (from your strace) > > > 0 = fhandler_disk_file::open (m:\test.tar, 0x601) > > > > > > > OK, I gave that a try, and it behaves identically to tar, i.e., it works > > everywhare but on the one share. Not surprisingly, the strace output for a > run > > where it fails on that share is almost identical to the strace output for > when > > tar fails on that share, at least for the relevant section. > > > > FWIW, I've attached the C source and resulting strace output. > > > > Rick > > Due to the way the debug_printf are located in fhandler_base::open (PTC), > more information is displayed in case of success than in case of failure. > So it would be interesting to rerun strace after touching the file. > Doing a strace .... | fgrep NtCreateFile > should already give most of the useful info. > > Also, is 0x601 the only combination that fails? >
It seems to be the O_TRUNC flag that's causing the problem. If I remove it, the open succeeds when the file doesn't exist. Here's the output of 'strace opentest /cygdrive/m/foo | fgrep NtCreateFile' when /cygdrive/m/foo exists and with the O_TRUNC flag (1 line): 1081 154650 [main] opentest 1796 fhandler_base::open: 0 = NtCreateFile (0x32C, 40100080, m:\foo, io, NULL, 80, 7, 0, 20, NULL, 0) I can certainly attach the rest of the strace output if that would help. RIck -- 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/