Fatal Protocol Error Bad Pack Header
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more fatal: the remote end hung up unexpectedly fatal: protocol error: bad pack header about Stack Overflow the company Business Learn more about hiring developers or posting fatal: internal server error remote: internal server error fatal: protocol error: bad pack header ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack
Git Fatal: Internal Server Error
Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up git fetch fails due to pack-object failure up vote 5 down
Gerrit Fatal: Protocol Error: Bad Pack Header
vote favorite 1 When I add our remote repository as upstream and try to fetch it , it fails as below : $ git fetch upstream remote: Counting objects: 11901, done. remote: aborting due to possible repository corruption on the remote side. error: pack-objects died of signal 9 error: git upload-pack: git-pack-objects died with error. fatal: git upload-pack: aborting due to possible repository corruption on the re mote side. git remote internal server error fatal: protocol error: bad pack header I understand that it fails due to having huge files in the repository( which we do have) , but why does it Not fail when I clone the same repository? Because I am able to clone the repository successfully. Shouldn't The same objects be packed at the time of a clone request? git git-clone git-fetch share|improve this question edited Jan 26 '14 at 5:07 asked Jan 26 '14 at 4:39 nikel 78031432 add a comment| 2 Answers 2 active oldest votes up vote 9 down vote accepted To expand a bit on VonC's answer... First, it may help to note that signal 9 refers to SIGKILL and tends to occur because the remote in question is a Linux host and the process is being destroyed by the Linux "OOM killer" (although some non-Linux systems behave similarly). Next, let's talk about objects and pack-files. A git "object" is one of the four types of items that are found in a git repository: a "blob" (a file); a "tree" (a list of blobs, their modes, and their names-as-stored-in-a-directory: i.e., what will become a directory or folder on when a commit is unpacked); a "commit" (which gives the commit author, messag
[IncrementalPinger1 ] fisheye OneOffPingRequest-doRequest
Remote: Warning: Suboptimal Pack - Out Of Memory
- Exception during FishEye Incremental Indexing of GITREPO: fatal: fetch-pack: unable to fork off sideband demultiplexer Unable to fetch from remote repository: file:///mnt/git/GITREPO.git - [error: pack-objects died pack-objects died of signal 9 of signal 7, error: git upload-pack: git-pack-objects died with error., fatal: git upload-pack: aborting due to possible repository corruption http://stackoverflow.com/questions/21359777/git-fetch-fails-due-to-pack-object-failure on the remote side., remote: aborting due to possible repository corruption on the remote side., fatal: protocol error: bad pack header] Cause This often indicates memory problems on the server. Resolution Log in to the server as https://confluence.atlassian.com/fishkb/git-indexing-fails-due-to-bad-pack-header-371360062.html the SSH user used to connect to the repo and run the commands below: git config --global pack.windowMemory "100m" git config --global pack.SizeLimit "100m" git config --global pack.threads "1" Was this helpful? Yes No Thanks for your feedback! Why was this unhelpful? It wasn't accurate It wasn't clear It wasn't relevant Submit feedback Cancel Have a question about this article? See questions about this article Powered by Confluence and Scroll Viewport Atlassian Support Ask the community Provide product feedback Contact technical support Atlassian Privacy Policy Terms of use Security Copyright © 2016 Atlassian Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 2.5 Australia License.
Starred by 4 users Reported by fredrik....@sonyericsson.com, Jan 19 2010 Back to list Status: Duplicate Merged: issue 390 Owner: ---- Closed: Feb 2010 https://bugs.chromium.org/p/gerrit/issues/detail?id=394 Priority-Blocker Type-Bug Blocking: issue 390 Sign in to add a comment Affected Version: Gerrit 2.1.1.1 Environment: Ubuntu 8.10 64 bit, 16GB RAM Date: Around noon, the 18th. The initial report from the users is this: Initializing project platform/frameworks/base ... warning: no common commits fatal: internal server error fatal: The remote end hung up unexpectedly fatal: protocol error: bad protocol error pack header error: Cannot fetch platform/frameworks/base This is repeatable, several clients get the same output. On the server, everything looks dandy. To be safe I run a gc: platform/frameworks/base.git$ git gc Counting objects: 146059, done. Compressing objects: 100% (49024/49024), done. Writing objects: 100% (146059/146059), done. Total 146059 (delta 83409), reused 145995 (delta 83345) platform/frameworks/base.git$ Latest commit according to git bad pack header log --all Date: Sat Jan 16 16:10:45 2010 +0100 Once git gc has completed, the sync now works as expected! But this doesn't last long, in the same sync I get the same output for another internal git means running git gc once more: $ git gc Counting objects: 94, done. Compressing objects: 100% (28/28), done. Writing objects: 100% (94/94), done. Total 94 (delta 44), reused 94 (delta 44) Lasest commit: Date: Fri Dec 18 18:48:37 2009 +0100 This should mean that a lot of gcs has run weekly and sometimes daily since then. And still we get a repack! After very short time a new batch of gits "turn bad". By now patience is over, so I restart the gerrit service. But first some stats: $ ps Tuxa | grep java gerrit2 1039 76.7 52.1 9066324 8473312 pts/1 Sl Jan15 3194:58 GerritCodeReview -Xmx8g -Djavax.net.ssl.trustStore=/some/files - Djavax.net.ssl.trustStorePassword=passwd -jar /srv/gerrit2/bin/gerrit.war daemon -d /srv/gerrit2 -> internal ps shows: Name Max |Object Count | AvgGet |Hit Ratio | Age | Disk Mem Cnt| |Disk Mem Agg | -------------------------+