Re: Error "fatal: cannot pread pack file: Success"
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Feb 28, 2007, 18:37 UTC
- Message-ID
- <Pine.LNX.4.64.0702281031490.12485@woody.linux-foundation.org>
- In-Reply-To
- <alpine.LRH.0.82.0702281315480.29426@xanadu.home>
On Wed, 28 Feb 2007, Nicolas Pitre wrote:
Show 16 quoted lines
> > On Wed, 28 Feb 2007, Linus Torvalds wrote: > > > Well, if the return value was 0, it wasn't as odd any more, and the reason > > seems to be a file truncate error. Shawn seems to be on that one. > > > > (The "return 305 when asked for 207" seemed like a kernel bug, which was > > why I got really interested ;) > > I wouldn't dismiss a kernel bug just yet. > > Bill already said the same operation, when not performed over NFS, works > just fine. > > He also mentioned that version 1.4.4, which uses mmap() instead of > pread(), works also fine even over NFS.
Hmm.. Good point.
I'm addign Trond, Chuck and Neil to the list, just in case there might be some known problem where NFS might use f_pos instead of the passed-in position, causing problems with pread(). Not that I can imagine how that could even happen or not be noticed..
Guys, this is a oldish 2.6.x kernel: "2.6.9-34.0.2.ELsmp #1 SMP Fri Jul 7", and for some reason we have a file that appears truncated to pread() (returns 0) but worked with mmap and the same test-case apparently works on non-NFS filesystems. Any ideas? Some known bug that got fixed since?
Bill, can you make the whole strace available somewhere?
Linus