{"thread":{"id":"7644","subject":"fatal: Out of memory, malloc failed","startedAt":"2007-04-13T17:25:22Z","lastAt":"2007-04-16T09:21:15Z","messageCount":11,"participants":["Alan Larkin","Linus Torvalds","Alex Riesen","Julian Phillips"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"39301","messageId":"461FBD02.6050105@eircom.net","threadId":"7644","inReplyTo":null,"subject":"fatal: Out of memory, malloc failed","fromName":"Alan Larkin","fromEmail":"nobrow@eircom.net","sentAt":"2007-04-13T17:25:22Z","receivedAt":"2007-04-13T17:25:22Z","isPatch":false,"sender":{"key":"nobrow@eircom.net","avatar":null},"body":"Hello,\n\nIts not a huge push Im trying to do here (<about 150Mb) but always malloc fails!\n\n$ git push upload master\nFetching remote heads...\n  refs/\n  refs/heads/\n  refs/tags/\nupdating 'refs/heads/master'\n  from 0000000000000000000000000000000000000000\n  to   4dc5525d0cc8ca24883c3fa1d5c29b3a105b4610\n    sending 1024 objects\nfatal: Out of memory, malloc failed\n\nAny ideas? Thanks.\n"},{"id":"39302","messageId":"Pine.LNX.4.64.0704131143130.28042@woody.linux-foundation.org","threadId":"7644","inReplyTo":"461FBD02.6050105@eircom.net","subject":"Re: fatal: Out of memory, malloc failed","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-04-13T18:53:43Z","receivedAt":"2007-04-13T18:53:43Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 13 Apr 2007, Alan Larkin wrote:\n> \n> Its not a huge push Im trying to do here (<about 150Mb) but always malloc fails!\n\nAny huge objects?\n\nAlso, it might be interesting to run it under gdb, and put a breakpoint on \nthe \"die\" function, so that it stops where it runs out of memory. Then. at \nthat point, you can:\n\n - do a \"where\" in gdb to see what allocation it is (and ask it how big \n   it was by printing out the value of \"size\").\n\n   It may be something totally uninteresting (just some random object that \n   happened to push things over the limit), but statistically, malloc \n   failures tend to happen to big objects, and sometimes just because \n   somebody needed a huge area that won't fit in the virtual address \n   space.\n\n - check with \"ps\" what the size of the process is. Maybe you even just \n   have some process limit set that causes brk/mmap to return failure \n   earlier than necessary..\n\n   (It can also be interesting to look at /proc/<pid>/maps, in case\n   there are big mmaps that fill up the VM etc)\n\nSometimes it's also a good idea to have a swap file.  You may not even\n*need* to actually page, but it gives thew VM layer much more freedom,\nespecially if your distro has set the flags to disable memory \"overcommit\".\n\n\t\tLinus\n"},{"id":"39383","messageId":"462277CD.5020609@eircom.net","threadId":"7644","inReplyTo":"Pine.LNX.4.64.0704131143130.28042@woody.linux-foundation.org","subject":"Re: fatal: Out of memory, malloc failed","fromName":"Alan Larkin","fromEmail":"nobrow@eircom.net","sentAt":"2007-04-15T19:06:53Z","receivedAt":"2007-04-15T19:06:53Z","isPatch":false,"sender":{"key":"nobrow@eircom.net","avatar":null},"body":"Linus Torvalds wrote:\n> \n> On Fri, 13 Apr 2007, Alan Larkin wrote:\n>> Its not a huge push Im trying to do here (<about 150Mb) but always malloc fails!\n> \n> Any huge objects?\n> \n> Also, it might be interesting to run it under gdb, and put a breakpoint on \n> the \"die\" function, so that it stops where it runs out of memory. Then. at \n> that point, you can:\n> \n>  - do a \"where\" in gdb to see what allocation it is (and ask it how big \n>    it was by printing out the value of \"size\").\n> \n>    It may be something totally uninteresting (just some random object that \n>    happened to push things over the limit), but statistically, malloc \n>    failures tend to happen to big objects, and sometimes just because \n>    somebody needed a huge area that won't fit in the virtual address \n>    space.\n> \n>  - check with \"ps\" what the size of the process is. Maybe you even just \n>    have some process limit set that causes brk/mmap to return failure \n>    earlier than necessary..\n> \n>    (It can also be interesting to look at /proc/<pid>/maps, in case\n>    there are big mmaps that fill up the VM etc)\n> \n> Sometimes it's also a good idea to have a swap file.  You may not even\n> *need* to actually page, but it gives thew VM layer much more freedom,\n> especially if your distro has set the flags to disable memory \"overcommit\".\n> \n> \t\tLinus\n> \n> \n\nThere were a couple of big files. I removed a 72Mb one (making 47Mb the biggest one left in the\nproject) and made the push and it worked. I later pulled the project down to a different machine,\nadded the 72Mb file back in, and pushed to the server and it worked. So apparently it's a platform\nspecific problem. If anybody's particularly interested I could replicate it under gdb and pass on\nany info, but if not I wont ... job's done, Im happy.\n"},{"id":"39409","messageId":"20070415214050.GA4417@steel.home","threadId":"7644","inReplyTo":"462277CD.5020609@eircom.net","subject":"Re: fatal: Out of memory, malloc failed","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-04-15T21:40:50Z","receivedAt":"2007-04-15T21:40:50Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Alan Larkin, Sun, Apr 15, 2007 21:06:53 +0200:\n> >> Its not a huge push Im trying to do here (<about 150Mb) but\n> >> always malloc fails!\n> > \n> > Any huge objects?\n> > \n> \n> There were a couple of big files. I removed a 72Mb one (making 47Mb\n> the biggest one left in the project) and made the push and it\n> worked. I later pulled the project down to a different machine,\n> added the 72Mb file back in, and pushed to the server and it worked.\n> So apparently it's a platform specific problem. If anybody's\n> particularly interested I could replicate it under gdb and pass on\n> any info, but if not I wont ... job's done, Im happy.\n\n72Mb is nothing. Is it Windows/cygwin, by any chance? (I see the\nproblem there sometimes. Tried debugging it, got into some ugly\ncygwin-windows interactions, threw up, did the same you did and tried\nto forget it all).\n"},{"id":"39483","messageId":"462329D8.4020302@eircom.net","threadId":"7644","inReplyTo":"20070415214050.GA4417@steel.home","subject":"Re: fatal: Out of memory, malloc failed","fromName":"Alan Larkin","fromEmail":"nobrow@eircom.net","sentAt":"2007-04-16T07:46:32Z","receivedAt":"2007-04-16T07:46:32Z","isPatch":false,"sender":{"key":"nobrow@eircom.net","avatar":null},"body":"Alex Riesen wrote:\n> Alan Larkin, Sun, Apr 15, 2007 21:06:53 +0200:\n>>>> Its not a huge push Im trying to do here (<about 150Mb) but\n>>>> always malloc fails!\n>>> Any huge objects?\n>>>\n>> There were a couple of big files. I removed a 72Mb one (making 47Mb\n>> the biggest one left in the project) and made the push and it\n>> worked. I later pulled the project down to a different machine,\n>> added the 72Mb file back in, and pushed to the server and it worked.\n>> So apparently it's a platform specific problem. If anybody's\n>> particularly interested I could replicate it under gdb and pass on\n>> any info, but if not I wont ... job's done, Im happy.\n> \n> 72Mb is nothing. Is it Windows/cygwin, by any chance? (I see the\n> problem there sometimes. Tried debugging it, got into some ugly\n> cygwin-windows interactions, threw up, did the same you did and tried\n> to forget it all).\n> \n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n> \n\nThats what I thought, but malloc continued to fail until the 72Mb file was removed.\n\nNo, my server is running Debian. I had the push problem when logged in on that. It worked when I\npushed it from a Gentoo box.\n"},{"id":"39488","messageId":"Pine.LNX.4.64.0704160853050.7680@beast.quantumfyre.co.uk","threadId":"7644","inReplyTo":"462329D8.4020302@eircom.net","subject":"Re: fatal: Out of memory, malloc failed","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-04-16T07:54:04Z","receivedAt":"2007-04-16T07:54:04Z","isPatch":false,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"On Mon, 16 Apr 2007, Alan Larkin wrote:\n\n> Alex Riesen wrote:\n>> Alan Larkin, Sun, Apr 15, 2007 21:06:53 +0200:\n>>>>> Its not a huge push Im trying to do here (<about 150Mb) but\n>>>>> always malloc fails!\n>>>> Any huge objects?\n>>>>\n>>> There were a couple of big files. I removed a 72Mb one (making 47Mb\n>>> the biggest one left in the project) and made the push and it\n>>> worked. I later pulled the project down to a different machine,\n>>> added the 72Mb file back in, and pushed to the server and it worked.\n>>> So apparently it's a platform specific problem. If anybody's\n>>> particularly interested I could replicate it under gdb and pass on\n>>> any info, but if not I wont ... job's done, Im happy.\n>>\n>> 72Mb is nothing. Is it Windows/cygwin, by any chance? (I see the\n>> problem there sometimes. Tried debugging it, got into some ugly\n>> cygwin-windows interactions, threw up, did the same you did and tried\n>> to forget it all).\n>>\n>> -\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>>\n>>\n>\n> Thats what I thought, but malloc continued to fail until the 72Mb file was removed.\n>\n> No, my server is running Debian. I had the push problem when logged in on that. It worked when I\n> pushed it from a Gentoo box.\n\na problem with ulimit -m on the server?\n\n-- \nJulian\n\n  ---\nNo skis take rocks like rental skis!\n"},{"id":"39493","messageId":"81b0412b0704160100y35d0f86csd2196fb2864a7037@mail.gmail.com","threadId":"7644","inReplyTo":"462329D8.4020302@eircom.net","subject":"Re: fatal: Out of memory, malloc failed","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-04-16T08:00:04Z","receivedAt":"2007-04-16T08:00:04Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 4/16/07, Alan Larkin <nobrow@eircom.net> wrote:\n> > 72Mb is nothing. Is it Windows/cygwin, by any chance? (I see the\n> > problem there sometimes. Tried debugging it, got into some ugly\n> > cygwin-windows interactions, threw up, did the same you did and tried\n> > to forget it all).\n>\n> Thats what I thought, but malloc continued to fail until the 72Mb file was removed.\n>\n> No, my server is running Debian. I had the push problem when logged in on that.\n> It worked when I pushed it from a Gentoo box.\n\nOk, now _that_ is interesting... Any limits on that server?\nWhat git version?  There were some memory leaks fixed recently...\n"},{"id":"39494","messageId":"46232DB0.3010303@eircom.net","threadId":"7644","inReplyTo":"Pine.LNX.4.64.0704160853050.7680@beast.quantumfyre.co.uk","subject":"Re: fatal: Out of memory, malloc failed","fromName":"Alan Larkin","fromEmail":"nobrow@eircom.net","sentAt":"2007-04-16T08:02:56Z","receivedAt":"2007-04-16T08:02:56Z","isPatch":false,"sender":{"key":"nobrow@eircom.net","avatar":null},"body":"Julian Phillips wrote:\n> On Mon, 16 Apr 2007, Alan Larkin wrote:\n> \n>> Alex Riesen wrote:\n>>> Alan Larkin, Sun, Apr 15, 2007 21:06:53 +0200:\n>>>>>> Its not a huge push Im trying to do here (<about 150Mb) but\n>>>>>> always malloc fails!\n>>>>> Any huge objects?\n>>>>>\n>>>> There were a couple of big files. I removed a 72Mb one (making 47Mb\n>>>> the biggest one left in the project) and made the push and it\n>>>> worked. I later pulled the project down to a different machine,\n>>>> added the 72Mb file back in, and pushed to the server and it worked.\n>>>> So apparently it's a platform specific problem. If anybody's\n>>>> particularly interested I could replicate it under gdb and pass on\n>>>> any info, but if not I wont ... job's done, Im happy.\n>>>\n>>> 72Mb is nothing. Is it Windows/cygwin, by any chance? (I see the\n>>> problem there sometimes. Tried debugging it, got into some ugly\n>>> cygwin-windows interactions, threw up, did the same you did and tried\n>>> to forget it all).\n>>>\n>>> -\n>>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>>> the body of a message to majordomo@vger.kernel.org\n>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>>>\n>>>\n>>\n>> Thats what I thought, but malloc continued to fail until the 72Mb file\n>> was removed.\n>>\n>> No, my server is running Debian. I had the push problem when logged in\n>> on that. It worked when I\n>> pushed it from a Gentoo box.\n> \n> a problem with ulimit -m on the server?\n> \n\nUnlimited ...\n"},{"id":"39495","messageId":"81b0412b0704160103p15924e94idfaa445a30fe8e81@mail.gmail.com","threadId":"7644","inReplyTo":"Pine.LNX.4.64.0704160853050.7680@beast.quantumfyre.co.uk","subject":"Re: fatal: Out of memory, malloc failed","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-04-16T08:03:48Z","receivedAt":"2007-04-16T08:03:48Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 4/16/07, Julian Phillips <julian@quantumfyre.co.uk> wrote:\n> >\n> > Thats what I thought, but malloc continued to fail until the 72Mb file was removed.\n> >\n> > No, my server is running Debian. I had the push problem when logged in on that.\n> > It worked when I pushed it from a Gentoo box.\n>\n> a problem with ulimit -m on the server?\n>\n\nNah, a process gets killed in case of a limit hit.\nHe gets malloc returning NULL.\n"},{"id":"39496","messageId":"46232FAC.4080506@eircom.net","threadId":"7644","inReplyTo":"81b0412b0704160100y35d0f86csd2196fb2864a7037@mail.gmail.com","subject":"Re: fatal: Out of memory, malloc failed","fromName":"Alan Larkin","fromEmail":"nobrow@eircom.net","sentAt":"2007-04-16T08:11:24Z","receivedAt":"2007-04-16T08:11:24Z","isPatch":false,"sender":{"key":"nobrow@eircom.net","avatar":null},"body":"Alex Riesen wrote:\n> On 4/16/07, Alan Larkin <nobrow@eircom.net> wrote:\n>> > 72Mb is nothing. Is it Windows/cygwin, by any chance? (I see the\n>> > problem there sometimes. Tried debugging it, got into some ugly\n>> > cygwin-windows interactions, threw up, did the same you did and tried\n>> > to forget it all).\n>>\n>> Thats what I thought, but malloc continued to fail until the 72Mb file\n>> was removed.\n>>\n>> No, my server is running Debian. I had the push problem when logged in\n>> on that.\n>> It worked when I pushed it from a Gentoo box.\n> \n> Ok, now _that_ is interesting... Any limits on that server?\n> What git version?  There were some memory leaks fixed recently...\n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n> \n\nAh, perhaps youre on to something there. The version Im running on the server is 1.4.4.4 (from apt\npackage manager), but on my own machine (from whence the push was successful) its 1.5.0.5. Still,\nyoud expect the problem to have effected more people if its a leak or something in the older version.\n"},{"id":"39515","messageId":"81b0412b0704160221o269fbd6al133a44148c75e38a@mail.gmail.com","threadId":"7644","inReplyTo":"46232FAC.4080506@eircom.net","subject":"Re: fatal: Out of memory, malloc failed","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-04-16T09:21:15Z","receivedAt":"2007-04-16T09:21:15Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 4/16/07, Alan Larkin <nobrow@eircom.net> wrote:\n> >> > 72Mb is nothing. Is it Windows/cygwin, by any chance? (I see the\n> >> > problem there sometimes. Tried debugging it, got into some ugly\n> >> > cygwin-windows interactions, threw up, did the same you did and tried\n> >> > to forget it all).\n> >>\n> >> Thats what I thought, but malloc continued to fail until the 72Mb file\n> >> was removed.\n> >>\n> >> No, my server is running Debian. I had the push problem when logged in\n> >> on that.\n> >> It worked when I pushed it from a Gentoo box.\n> >\n> > Ok, now _that_ is interesting... Any limits on that server?\n> > What git version?  There were some memory leaks fixed recently...\n>\n> Ah, perhaps youre on to something there. The version Im running on the server is\n> 1.4.4.4 (from apt package manager), but on my own machine (from whence the push\n> was successful) its 1.5.0.5. Still, youd expect the problem to have effected more\n> people if its a leak or something in the older version.\n\nThat's how the leaks were found: people were affected and complained :)\nBut it also a bit of unusual repo you have: not many have objects more\nthe 10Mb in their sources. Anyway, give the new version a try. Maybe it\nwas fixed, or maybe we have a chance to improve the current version.\n"}]}