* multiple processes appending data to a single file
@ 2005-03-22 16:45 Joachim Worringen
2005-03-22 16:50 ` Trond Myklebust
0 siblings, 1 reply; 3+ messages in thread
From: Joachim Worringen @ 2005-03-22 16:45 UTC (permalink / raw)
To: nfs
Dear NFS experts,
I posted the problem description below to comp.protocols.nfs without a
real response (only one "it should work" reply - but it doesn't...). So,
here comes the problem, below are my questions.
Consider the situation of an empty file, and two processes A and B
concurrently write N bytes to this file via NFS. Process A writes to
offset 0, and process B lseeks() to offset N to write there.
Additionally, each process write-locks the range it is accessing before
actually doing so.
Please note that this is different from the "append-to-file-via-NFS"
problem that has been discussed to some degree already. Here, each
process seeks to a known (non-conflicting) position to write its data.
We have observed that for the described access pattern, it can happen
that after the write operations, the file contains all zeros for offsets
0..N-1, and the data of process B between N..2N-1. This means, the data
of process A is lost. Obviously, to comply with POSIX, the write
operation of process B implied filling up the "gap" between 0 and N-1
with zeros, overwriting the data of process A (although it locked it's
range!). This showed up with different NFS server implementations (Linux
being one of them) and a single NFS client implementation (SUPER-UX)
which makes us think that this might be a problem of the client. But on
the other hand, the client is not necessarily involved at all.
Some questions that we have in this context:
- Has anyone experienced this problem?
- Is the expected behaviour defined anywhere? I found nothing related on
the web, and neither in the NFSv3 RFC.
- Shouldn't the locking prevent the observed behaviour (meaning there's
a bug somewhere)?
- Which kind of request is generated for such an append situation by the
NFS client? Does it care at all if there's a gap?
- What does the server do - does it handle this gap in any way, or does
it rely on the underlying local file system?
thanks, Joachim
--
Joachim Worringen - NEC C&C research lab St.Augustin
fon +49-2241-9252.20 - fax .99 - http://www.ccrl-nece.de
-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: multiple processes appending data to a single file
2005-03-22 16:45 multiple processes appending data to a single file Joachim Worringen
@ 2005-03-22 16:50 ` Trond Myklebust
2005-03-22 17:39 ` Joachim Worringen
0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2005-03-22 16:50 UTC (permalink / raw)
To: Joachim Worringen; +Cc: nfs
ty den 22.03.2005 Klokka 17:45 (+0100) skreiv Joachim Worringen:
> Dear NFS experts,
>
> I posted the problem description below to comp.protocols.nfs without a
> real response (only one "it should work" reply - but it doesn't...). So,
> here comes the problem, below are my questions.
Can you post the offending code? I agree that a scheme such as you
describe can be made to work, but the devil is in the details...
Cheers,
Trond
--
Trond Myklebust <trond.myklebust@fys.uio.no>
-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: multiple processes appending data to a single file
2005-03-22 16:50 ` Trond Myklebust
@ 2005-03-22 17:39 ` Joachim Worringen
0 siblings, 0 replies; 3+ messages in thread
From: Joachim Worringen @ 2005-03-22 17:39 UTC (permalink / raw)
To: nfs
Trond Myklebust wrote:
> ty den 22.03.2005 Klokka 17:45 (+0100) skreiv Joachim Worringen:
>
>>Dear NFS experts,
>>
>>I posted the problem description below to comp.protocols.nfs without a
>>real response (only one "it should work" reply - but it doesn't...). So,
>>here comes the problem, below are my questions.
>
> Can you post the offending code? I agree that a scheme such as you
> describe can be made to work, but the devil is in the details...
Your request makes sense, but unfortunately, I can not post the code
right now (although it is straightforward) - unresolved IP issues... :-(
Joachim
--
Joachim Worringen - NEC C&C research lab St.Augustin
fon +49-2241-9252.20 - fax .99 - http://www.ccrl-nece.de
-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-03-22 17:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-22 16:45 multiple processes appending data to a single file Joachim Worringen
2005-03-22 16:50 ` Trond Myklebust
2005-03-22 17:39 ` Joachim Worringen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.