{"thread":{"id":"24800","subject":"Out of memory error during git push","startedAt":"2010-08-20T09:11:00Z","lastAt":"2010-08-20T21:21:02Z","messageCount":8,"participants":["Thomas Jampen","Jonathan Nieder","Nicolas Pitre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"148515","messageId":"4C6E46A4.8050502@kinet.ch","threadId":"24800","inReplyTo":null,"subject":"Out of memory error during git push","fromName":"Thomas Jampen","fromEmail":"jampen@kinet.ch","sentAt":"2010-08-20T09:11:00Z","receivedAt":"2010-08-20T09:11:00Z","isPatch":false,"sender":{"key":"jampen@kinet.ch","avatar":null},"body":"Hi all\n\nI'm experiencing the following error while pushing a git repo (home\ndirectory) to my QNAP TS-210:\n\nuser@mypc:~$ git push origin master\nCounting objects: 12532, done.\nDelta compression using up to 2 threads.\nCompressing objects: 100% (8974/8974), done.\nfatal: Out of memory, malloc failed, 986.06 MiB | 1.65 MiB/s\nerror: pack-objects died of signal 13\nerror: pack-objects died with strange error\nerror: failed to push some refs to\n'ssh://nas//share/MD0_DATA/user/repositories/backup.mypc'\n\nI've searched the internet and found suggestions to try to repack with\nlower values for 'depth', 'window' and 'windowMemory'. I used 3, 3, 50\nrespectively, but a push after the repack command resulted in the same\nerror.\n\nI tried git fsck which reported a few dangling blobs only and I got the\nsame error again during the next push.\n\nI watched /proc/meminfo and /proc/swaps on the NAS while pushing and saw\nthat there are always 20-50MB of free RAM and that from 512MB swap space\nonly about 180MB are used.\n\nWhat else can I try to successfully push my repo to my NAS?\n\nThanks for your help,\nTom\n"},{"id":"148554","messageId":"20100820125119.GA9762@burratino","threadId":"24800","inReplyTo":"4C6E46A4.8050502@kinet.ch","subject":"Re: Out of memory error during git push","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-20T12:51:19Z","receivedAt":"2010-08-20T12:51:19Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"(+cc: Nicolas, who knows the packing code pretty well)\n\nHi,\n\nThomas Jampen wrote:\n\n> I'm experiencing the following error while pushing a git repo (home\n> directory) to my QNAP TS-210:\n> \n> user@mypc:~$ git push origin master\n> Counting objects: 12532, done.\n> Delta compression using up to 2 threads.\n> Compressing objects: 100% (8974/8974), done.\n> fatal: Out of memory, malloc failed, 986.06 MiB | 1.65 MiB/s\n> error: pack-objects died of signal 13\n\nWhat version of git are you using?  Do you have overcommit accounting\nenabled?\n\nI am not sure this is the problem you are running into, but pack-objects\nlike many other parts of git uses mmap() to read packfiles, which can\nmake the address space usage high.\n\n> I've searched the internet and found suggestions to try to repack with\n> lower values for 'depth', 'window' and 'windowMemory'. I used 3, 3, 50\n> respectively, but a push after the repack command resulted in the same\n> error.\n> \n> I tried git fsck which reported a few dangling blobs only and I got the\n> same error again during the next push.\n> \n> I watched /proc/meminfo and /proc/swaps on the NAS while pushing and saw\n> that there are always 20-50MB of free RAM and that from 512MB swap space\n> only about 180MB are used.\n\nI don't know --- this is out of my depth. :)\n\nGood luck,\nJonathan\n"},{"id":"148571","messageId":"23639398.583.1282314377177.JavaMail.root@hermes","threadId":"24800","inReplyTo":"20100820125119.GA9762@burratino","subject":"Re: Out of memory error during git push","fromName":"Thomas Jampen","fromEmail":"jampen@kinet.ch","sentAt":"2010-08-20T14:26:17Z","receivedAt":"2010-08-20T14:26:17Z","isPatch":false,"sender":{"key":"jampen@kinet.ch","avatar":null},"body":"Hi\n\n>> I'm experiencing the following error while pushing a git repo (home\n>> directory) to my QNAP TS-210:\n>>\n>> user@mypc:~$ git push origin master\n>> Counting objects: 12532, done.\n>> Delta compression using up to 2 threads.\n>> Compressing objects: 100% (8974/8974), done.\n>> fatal: Out of memory, malloc failed, 986.06 MiB | 1.65 MiB/s\n>> error: pack-objects died of signal 13\n> \n> What version of git are you using?  Do you have overcommit accounting\n> enabled?\n\nI'm using git version 1.7.0.4 on my Kubuntu 10.04 Laptop and git version\n1.7.1.1 on my QNAP NAS.\n\nOn my Laptop and on the NAS, when I execute: sudo sysctl vm.overcommit_memory\nI get:\nvm.overcommit_memory = 0\n\nDo you propose to set this to '2' in order to disable overcommitting? If yes, where (on the Laptop and/or on the NAS)?\n\nThanks,\nTom\n"},{"id":"148574","messageId":"20100820145011.GF16190@burratino","threadId":"24800","inReplyTo":"23639398.583.1282314377177.JavaMail.root@hermes","subject":"Re: Out of memory error during git push","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-20T14:50:11Z","receivedAt":"2010-08-20T14:50:11Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Thomas Jampen wrote:\n\n> vm.overcommit_memory = 0\n> \n> Do you propose to set this to '2' in order to disable overcommitting?\n\nIt might be interesting to try\n\n echo 1 >/proc/sys/vm/overcommit_memory\n\nbut 0 is generally the only sane setting.\n"},{"id":"148578","messageId":"15798303.640.1282320117609.JavaMail.root@hermes","threadId":"24800","inReplyTo":"20100820145011.GF16190@burratino","subject":"Re: Out of memory error during git push","fromName":"Thomas Jampen","fromEmail":"jampen@kinet.ch","sentAt":"2010-08-20T16:01:57Z","receivedAt":"2010-08-20T16:01:57Z","isPatch":false,"sender":{"key":"jampen@kinet.ch","avatar":null},"body":"> > vm.overcommit_memory = 0\n> >\n> > Do you propose to set this to '2' in order to disable\n> > overcommitting?\n> \n> It might be interesting to try\n> \n> echo 1 >/proc/sys/vm/overcommit_memory\n> \n> but 0 is generally the only sane setting.\n\nI set the value on both (Laptop and NAS) and got the following error:\nCounting objects: 13051, done.\nDelta compression using up to 2 threads.\nwarning: suboptimal pack - out of memory\nCompressing objects: 100% (9848/9848), done.\nerror: index-pack died of signal 9), 1.27 GiB | 308 KiB/s\nerror: pack-objects died of signal 13\nerror: pack-objects died with strange error\nerror: failed to push some refs to 'ssh://...'\n\nAny ideas?\nTom\n"},{"id":"148585","messageId":"alpine.LFD.2.00.1008201324440.622@xanadu.home","threadId":"24800","inReplyTo":"20100820145011.GF16190@burratino","subject":"Re: Out of memory error during git push","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2010-08-20T17:26:02Z","receivedAt":"2010-08-20T17:26:02Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Fri, 20 Aug 2010, Jonathan Nieder wrote:\n\n> Thomas Jampen wrote:\n> \n> > vm.overcommit_memory = 0\n> > \n> > Do you propose to set this to '2' in order to disable overcommitting?\n> \n> It might be interesting to try\n> \n>  echo 1 >/proc/sys/vm/overcommit_memory\n> \n> but 0 is generally the only sane setting.\n\nDon't know the meaning for specific values, but you definitively don't \nwant to turn off memory overcommit.\n\n\nNicolas\n"},{"id":"148608","messageId":"alpine.LFD.2.00.1008201327120.622@xanadu.home","threadId":"24800","inReplyTo":"20100820125119.GA9762@burratino","subject":"Re: Out of memory error during git push","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2010-08-20T20:59:58Z","receivedAt":"2010-08-20T20:59:58Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Fri, 20 Aug 2010, Jonathan Nieder wrote:\n\n> (+cc: Nicolas, who knows the packing code pretty well)\n> \n> Hi,\n> \n> Thomas Jampen wrote:\n> \n> > I'm experiencing the following error while pushing a git repo (home\n> > directory) to my QNAP TS-210:\n> > \n> > user@mypc:~$ git push origin master\n> > Counting objects: 12532, done.\n> > Delta compression using up to 2 threads.\n> > Compressing objects: 100% (8974/8974), done.\n> > fatal: Out of memory, malloc failed, 986.06 MiB | 1.65 MiB/s\n> > error: pack-objects died of signal 13\n\nHow much memory is there on the machine where the pushed data is going?\n\n\nNicolas\n"},{"id":"148610","messageId":"4C6EF1BE.6040603@kinet.ch","threadId":"24800","inReplyTo":"alpine.LFD.2.00.1008201327120.622@xanadu.home","subject":"Re: Out of memory error during git push","fromName":"Thomas Jampen","fromEmail":"jampen@kinet.ch","sentAt":"2010-08-20T21:21:02Z","receivedAt":"2010-08-20T21:21:02Z","isPatch":false,"sender":{"key":"jampen@kinet.ch","avatar":null},"body":"\n\nOn 20.08.2010 22:59, Nicolas Pitre wrote:\n> On Fri, 20 Aug 2010, Jonathan Nieder wrote:\n> \n>> (+cc: Nicolas, who knows the packing code pretty well)\n>>\n>> Hi,\n>>\n>> Thomas Jampen wrote:\n>>\n>>> I'm experiencing the following error while pushing a git repo (home\n>>> directory) to my QNAP TS-210:\n>>>\n>>> user@mypc:~$ git push origin master\n>>> Counting objects: 12532, done.\n>>> Delta compression using up to 2 threads.\n>>> Compressing objects: 100% (8974/8974), done.\n>>> fatal: Out of memory, malloc failed, 986.06 MiB | 1.65 MiB/s\n>>> error: pack-objects died of signal 13\n> \n> How much memory is there on the machine where the pushed data is going?\n\nMy NAS has 256MB RAM. While the push is running, there is between\n20-50MB RAM available according to MemFree reported by 'head\n/proc/meminfo'. The harddrive space should not be an issue, its about 2TB.\n"}]}