git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Error "fatal: cannot pread pack file: Success"

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 28, 2007, 17:13 UTC
Message-ID
<Pine.LNX.4.64.0702280910330.12485@woody.linux-foundation.org>
In-Reply-To
<17893.45903.748382.298137@lisa.zopyra.com>
On Wed, 28 Feb 2007, Bill Lear wrote:
Show 6 quoted lines
> >
> >Getting 305 bytes back when you asked for 207 is a bad bad bad thing. It's 
> >also really really odd and unexpected. 
> 
> You may have missed my admission that I screwed up the print: n is 0, obj->size
> was 305.
Ahh, ok. 

That means you got 0 back. That in turn means that the file seems to be truncated for some reason - the only valid reason to get 0 back is if the length of the file is smaller than the offset you're asking for data from.

Show 7 quoted lines
> >What filesystem? And could you strace this and actually see the pread() 
> >system call?
> 
> How can I tell which filesystem?  It's Linux all around, as far as I
> know.  Here is what mount tells me about this filesystem:
> 
> storage:/storage/disk1 on /austin type nfs (rw,addr=192.168.2.192)
Yes, that's how you get the filesystem type ;)
> >(use "strace -f -o tracefile" to follow all forks and to put the end 
> >result in a trace file)
> 
> Will do ...

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 ;)

		Linus
Previous: Bill LearNext: Nicolas Pitre
Message 30 of 34 in “Error "fatal: cannot pread pack file: Success"”
  1. Bill LearFeb 28, 2007
  2. Shawn O. PearceFeb 28, 2007
  3. Shawn O. PearceFeb 28, 2007
  4. Junio C HamanoFeb 28, 2007
  5. Linus TorvaldsFeb 28, 2007
  6. Bill LearFeb 28, 2007
  7. Bill LearFeb 28, 2007
  8. Shawn O. PearceFeb 28, 2007
  9. Bill LearFeb 28, 2007
  10. Bill LearFeb 28, 2007
  11. Shawn O. PearceFeb 28, 2007
  12. Bill LearFeb 28, 2007
  13. Shawn O. PearceFeb 28, 2007
  14. Morten WelinderFeb 28, 2007
  15. Shawn O. PearceFeb 28, 2007
  16. Bill LearFeb 28, 2007
  17. Shawn O. PearceFeb 28, 2007
  18. Bill LearFeb 28, 2007
  19. Shawn O. PearceFeb 28, 2007
  20. Nicolas PitreFeb 28, 2007
  21. Shawn O. PearceFeb 28, 2007
  22. Bill LearFeb 28, 2007
  23. Bill LearFeb 28, 2007
  24. Nicolas PitreFeb 28, 2007
  25. Bill LearMar 1, 2007
  26. Linus TorvaldsFeb 28, 2007
  27. Bill LearFeb 28, 2007
  28. Linus TorvaldsFeb 28, 2007
  29. Bill LearFeb 28, 2007
  30. Linus TorvaldsFeb 28, 2007
  31. Nicolas PitreFeb 28, 2007
  32. Linus TorvaldsFeb 28, 2007
  33. Nicolas PitreFeb 28, 2007
  34. Linus TorvaldsFeb 28, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.