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

Re: tree corrupted on disk quota full

From
MTMichael S. Tsirkin <mst@mellanox.co.il>
Date
Jan 11, 2007, 21:11 UTC
Message-ID
<20070111211143.GG17999@mellanox.co.il>
In-Reply-To
<Pine.LNX.4.64.0701111023090.3594@woody.osdl.org>
Show 23 quoted lines
> >
> > I hit a quota limit on a disk my tree was on, but did not notice.
> > Doing git pull on a tree seems to have corrupted it.
> > Now I have:
> > 
> > $ git-fsck-objects
> > error: 4d4d30be967d3284cbf59afd4fba6ab536e295f5: object not found
> > error: c03590b581d51d5fa43adbef9415e935d0229412: object not found
> > missing tree 10147d79b2418168d9433067b6439971bd4f1261
> > broken link from  commit 322a6c93ad86d2a151dd97a4c6b0e014a4893437
> >               to    tree 10147d79b2418168d9433067b6439971bd4f1261
> > dangling commit 322a6c93ad86d2a151dd97a4c6b0e014a4893437
> > 
> > The tree can not be pulled into, or from.
> 
> That's nasty, but something as simple a "git reset --hard ORIG_HEAD" 
> should fix it (of course, if the disk-full happened earlier, or you've 
> done some other reset or something else that over-write your ORIG_HEAD, 
> you'd need to find the most recent commit that wasn't broken).
> 
> The good news is that there's no way your old data got corrupted. You just 
> need to _find_ it (and normally ORIG_HEAD points to it, so it's trivial to 
> find).
I did lots of resets and they did not seems to help.

Then, on a hunch, I just did git prune and it cleaned the tree so I can pull/push fine.

How come?
mst@mst-lt:~/tmp/libmthca_bad$ git --version
git version 1.5.0.rc0.g244a7
mst@mst-lt:~/tmp/libmthca_bad$ git pull ~/scm/libmthca/
remote: Generating pack...
remote: Done counting 18 objects.
Result has 11 objects.
remote: Deltifying 11 objects.
remote:  100% (11/11) done
remote: Total 11 (delta 8), reused 1 (delta 1)
Unpacking 11 objects
error: failed to read delta-pack base object 4d4d30be967d3284cbf59afd4fba6ab536e295f5
fatal: unpack-objects died with error code 1
Fetch failure: /home/mst/scm/libmthca/
mst@mst-lt:~/tmp/libmthca_bad$ git prune
mst@mst-lt:~/tmp/libmthca_bad$ git pull ~/scm/libmthca/
remote: Generating pack...
remote: Done counting 18 objects.
Result has 11 objects.
Deltifying 11 objects.
 10remote: 0% (11/11) done
Total 11 (delta 8), reused 1 (delta 1)
Unpacking 11 objects
 100% (11/11) done
Updating 732a507..322a6c9
Fast forward
 Makefile.am      |   25 +++++++++++++++++--------
 configure.in     |   16 ++++++++++++++--
 debian/changelog |    4 +---
 mthca.driver     |    1 +
 src/mthca.c      |   23 ++++++++++++-----------
 5 files changed, 45 insertions(+), 24 deletions(-)
 create mode 100644 mthca.driver

So it seems the tree was more or less fine (it just has some useless objects because of the disk full failure), the bug seems to be that pull/push fail.

I made a backup of the bad tree so that if someone wants to play with it, here it is: http://www.openfabrics.org/~mst/libmthca_bad.tgz

-- 
MST
Previous: Linus TorvaldsNext: Linus Torvalds
Message 17 of 24 in “tree corrupted on disk quota full”
  1. Michael S. TsirkinJan 11, 2007
  2. Andreas EricssonJan 11, 2007
  3. Andy WhitcroftJan 11, 2007
  4. Michael S. TsirkinJan 11, 2007
  5. Andreas EricssonJan 11, 2007
  6. Linus TorvaldsJan 11, 2007
  7. Linus TorvaldsJan 11, 2007
  8. Linus TorvaldsJan 11, 2007
  9. Junio C HamanoJan 11, 2007
  10. Andy WhitcroftJan 11, 2007
  11. Junio C HamanoJan 11, 2007
  12. Better error messages for corrupt databasesLinus Torvalds, Jan 11, 2007
  13. Shawn O. PearceJan 12, 2007
  14. Linus TorvaldsJan 11, 2007
  15. Andy WhitcroftJan 11, 2007
  16. Linus TorvaldsJan 11, 2007
  17. Michael S. TsirkinJan 11, 2007
  18. Linus TorvaldsJan 11, 2007
  19. Michael S. TsirkinJan 11, 2007
  20. Linus TorvaldsJan 11, 2007
  21. Michael S. TsirkinJan 11, 2007
  22. Linus TorvaldsJan 12, 2007
  23. Shawn O. PearceJan 12, 2007
  24. Junio C HamanoJan 13, 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.