github/gollum — Issue #258: error: unpack failed: index-pack abnormal exit 
Author: dcsan
Created: 2011-12-26 12:13:05+00:00
State: open

I often get the error below when working on a git wiki LOCALLY (ie running the gollum server locally).
Text files get corrupted it seems - the end of the file is cutoff.
This is usually after i do a number of just local commits - and then cannot push back to github server.

~/dev/moso.wiki$ git push
Counting objects: 16, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (13/13), 1.36 KiB, done.
Total 13 (delta 5), reused 13 (delta 5)
error: unable to find 8b35ff00dfeffc9279185b1bbad3c8809c5f3d15
fatal: object of unexpected type
error: unpack failed: index-pack abnormal exit
To git@github.com:dcsan/moso.wiki.git
! [remote rejected] HEAD -> master (n/a (unpacker error))
error: failed to push some refs to 'git@github.com:dcsan/moso.wiki.git'

more info:

~/dev/moso.wiki$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 4 commits.
#
nothing to commit (working directory clean)
~/dev/moso.wiki$

~/dev/moso.wiki$ git repack
Nothing new to pack.

gollum server itself gives the following

Grit::GitRuby::Internal::LooseObjectError at /Themes
size mismatch
file: loose.rb location: get_raw_object line: 59

== Sinatra/1.3.1 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.3.1 codename Triple Espresso)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
Grit::GitRuby::Internal::LooseObjectError - size mismatch:
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/git-ruby/internal/loose.rb:59:in `get_raw_object'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/git-ruby/internal/loose.rb:32:in `[]'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/git-ruby/repository.rb:84:in `block in get_raw_object_by_sha1'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/git-ruby/repository.rb:83:in `each'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/git-ruby/repository.rb:83:in `get_raw_object_by_sha1'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/git-ruby/repository.rb:105:in `get_object_by_sha1'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/git-ruby/repository.rb:155:in `cat_file'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/git-ruby.rb:27:in `block in cat_file'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/git-ruby.rb:224:in `block in try_run'
/Users/dc/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:57:in `timeout'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/git-ruby.rb:223:in `try_run'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/git-ruby.rb:27:in `cat_file'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/grit-2.4.1/lib/grit/blob.rb:43:in `data'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/gollum-1.3.1/lib/gollum/page.rb:151:in `raw_data'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/gollum-1.3.1/lib/gollum/page.rb:160:in `text_data'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/gollum-1.3.1/lib/gollum/markup.rb:15:in `initialize'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/gollum-1.3.1/lib/gollum/page.rb:171:in `new'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/gollum-1.3.1/lib/gollum/page.rb:171:in `formatted_data'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/gollum-1.3.1/lib/gollum/frontend/app.rb:190:in `show_page_or_file'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/gollum-1.3.1/lib/gollum/frontend/app.rb:182:in `block in '
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `block in compile!'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `[]'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (3 levels) in route!'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in `route_eval'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (2 levels) in route!'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in `block in process_route'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `catch'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `process_route'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in `block in route!'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `each'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `route!'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in `dispatch!'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `block in call!'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `block in invoke'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `catch'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/rack-protection-1.1.4/lib/rack/protection/path_traversal.rb:16:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/rack-protection-1.1.4/lib/rack/protection/json_csrf.rb:17:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/rack-protection-1.1.4/lib/rack/protection/base.rb:47:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/rack-1.3.5/lib/rack/nulllogger.rb:9:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/rack-1.3.5/lib/rack/head.rb:9:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/showexceptions.rb:21:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in `block in call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:1403:in `synchronize'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `call'
/Users/dc/.rvm/gems/ruby-1.9.2-p180@trav/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `block in spawn_threadpool'