delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/03/20/16:50:57

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 20 Mar 2012 21:50:03 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ftell() fails on files in shared folders
Message-ID: <20120320205003.GJ18032@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAJOtW+5qwWvN84mJJ=NR3TgZE5s7jz8jpLTaN=+h1hv5Ob29XQ AT mail DOT gmail DOT com> <20120318155829 DOT GA21914 AT calimero DOT vinschen DOT de> <CAJOtW+4fMX_EEOBWhn0d6VPU7oq+k_Rx1CGYe4O16ccsNRV4ZA AT mail DOT gmail DOT com> <CAJOtW+4ZCvk3NarGn1qOFF-A+ZbFjithPJE8Ms-7FNFMH63A7Q AT mail DOT gmail DOT com> <20120318191043 DOT GA32177 AT calimero DOT vinschen DOT de> <CAJOtW+4UcSdbOqfch8Kzjh90FJP5ebtx-JJ7t8pGV2QZXiQ69A AT mail DOT gmail DOT com> <20120319091408 DOT GA30682 AT calimero DOT vinschen DOT de> <CAJOtW+5Mf9uYfe6x8+HsDxWyUmT11DFvDAs1QE00uj5uOayfaA AT mail DOT gmail DOT com> <20120320120923 DOT GB20228 AT calimero DOT vinschen DOT de> <CAJOtW+5iABpBo3FSLHp6ESn-P6ZetT1Xe-gVT10n4G-1aJX4pA AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAJOtW+5iABpBo3FSLHp6ESn-P6ZetT1Xe-gVT10n4G-1aJX4pA@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Mar 21 00:12, Yuri Gribov wrote:
> > First of all, there's a bug in your testcase.
> 
> Nice catch. With fixed code O_RDWR and O_WRONLY no longer influence
> the result but the bug still remains.
> 
> > What filesystem is your remote FS?  Please run
> 
> Done. All nodes seem to have same volume attributes.
> 
> > You could also run the testcase under strace, like this:
> 
> Done, here's the relevant part: for local (successful) run:
>   write: write(3, 0x402080, 8)
>   write: 8 = write(3, 0x402080, 8)
>   fhandler_base::lseek: setting file pointer to 8
>   lseek64: 8 = lseek(0, 3, 0)
>   fhandler_base::lseek: setting file pointer to 8
>   lseek64: 8 = lseek(0, 3, 0)
> and for remote:
>   write: write(3, 0x402080, 8)
>   write: 8 = write(3, 0x402080, 8)
>   fhandler_base::lseek: setting file pointer to 0
>   lseek64: 0 = lseek(0, 3, 0)

Apart from the bug in Cygwin's debug output, the problem is obviously
that your remote filesystem returns 0 as the current file size.  I have
no idea why it does that, and why only on your system.  What OS are
your remote filesystems running on?  I tried on Windows 2008, 7, and
2008R2 in every from<->to combination.

Can anybody else on this list observe this behaviour?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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