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

[BUG] malloc error when using large file.

From
EPEmmanuel Puerto <emmanuel.puerto@maxim-ic.com>
Date
Jun 22, 2009, 09:54 UTC
Message-ID
<B03A893ADFE80748942D13AFAF2845190C2D5D388A@ITSVLEX06.it.maxim-ic.internal>
Hi All,

I use Git with some Virtual Machine and I have an issue with 2 of them. When I use some VM I have created with a "pre-allocated" disk split into a 2Go file. For example a "ls" give:

-rwx------ 1 epuerto epuerto 2147221504 juin 18 17:05 All-f001.vmdk -rwx------ 1 epuerto epuerto 2147221504 juin 18 17:05 All-f002.vmdk -rwx------ 1 epuerto epuerto 2147221504 juin 18 12:07 All-f003.vmdk -rwx------ 1 epuerto epuerto 2147221504 juin 18 17:05 All-f004.vmdk -rwx------ 1 epuerto epuerto 2147221504 juin 18 17:05 All-f005.vmdk -rwx------ 1 epuerto epuerto 2147221504 juin 18 12:07 All-f006.vmdk -rwx------ 1 epuerto epuerto 2147221504 juin 18 12:07 All-f007.vmdk -rwx------ 1 epuerto epuerto 1835008 mars 10 21:44 All-f008.vmdk -rwx------ 1 epuerto epuerto 1007 juin 18 09:30 All.vmdk -rw------- 1 epuerto epuerto 548 juin 18 09:40 devel -rw------- 1 epuerto epuerto 1538850816 juin 18 17:05 devel-s001 -rw------- 1 epuerto epuerto 1125384192 juin 18 17:05 devel-s002 -rw------- 1 epuerto epuerto 1384382464 juin 18 17:05 devel-s003 -rw------- 1 epuerto epuerto 1632763904 juin 18 17:05 devel-s004 -rw------- 1 epuerto epuerto 1572864 juin 18 17:05 devel-s005 -rwx------ 1 epuerto epuerto 8684 juin 18 17:07 Ubuntu.nvram -rw------- 1 epuerto epuerto 536870912 juin 18 17:06 Ubuntu.vmem -rwx------ 1 epuerto epuerto 0 mars 10 21:31 Ubuntu.vmsd -rw------- 1 epuerto epuerto 135732052 juin 18 17:07 Ubuntu.vmss -rwx------ 1 epuerto epuerto 2908 juin 18 17:07 Ubuntu.vmx -rwx------ 1 epuerto epuerto 261 mars 10 21:31 Ubuntu.vmxf

So if I just do a "git init" and after do a "git add -A" I have the following error: fatal: Out of memory, malloc failed

no more information is given if I use the verbose option of git (git add -v -A).
In fact the error appear when I try to add file name "all-f00?.vmdk"

It appears that this size of file is not accepted by git. If I do the same with other VM that they have a biggest size or a smallest size, all it is ok

For example: -rw------- 1 epuerto epuerto 8684 avril 6 15:56 CentOs 5.2 Dev.nvram -rw------- 1 epuerto epuerto 8684 juin 18 11:36 CentOs 5.3 Dev.nvram -rw------- 1 epuerto epuerto 536870912 juin 18 11:36 CentOs 5.3 Dev.vmem -rw------- 1 epuerto epuerto 0 avril 3 12:26 CentOs 5.3 Dev.vmsd -rw------- 1 epuerto epuerto 18408288 juin 18 11:36 CentOs 5.3 Dev.vmss -rwxr-xr-x 1 epuerto epuerto 2239 juin 18 11:36 CentOs 5.3 Dev.vmx -rw------- 1 epuerto epuerto 269 avril 6 10:43 CentOs 5.3 Dev.vmxf -rw------- 1 epuerto epuerto 1766981632 juin 18 11:36 sda-s001.vmdk -rw------- 1 epuerto epuerto 2094596096 juin 18 11:36 sda-s002.vmdk -rw------- 1 epuerto epuerto 1808138240 juin 18 11:36 sda-s003.vmdk -rw------- 1 epuerto epuerto 1429667840 juin 18 11:36 sda-s004.vmdk -rw------- 1 epuerto epuerto 65536 juin 18 11:36 sda-s005.vmdk -rw------- 1 epuerto epuerto 907 juin 18 10:57 sda.vmdk

OR

-rwxrwxrwx 1 epuerto epuerto 8684 juin 17 21:08 FreeBSD 64-bit.nvram -rwxrwxrwx 1 epuerto epuerto 1114112 mars 27 2008 FreeBSD 64-bit.vmdk -rwxrwxrwx 1 epuerto epuerto 0 mars 27 2008 FreeBSD 64-bit.vmsd -rwxrwxrwx 1 epuerto epuerto 1652 juin 17 19:48 FreeBSD 64-bit.vmx -rwxrwxrwx 1 epuerto epuerto 269 mars 27 2008 FreeBSD 64-bit.vmxf -rwxrwxrwx 1 epuerto epuerto 9118810112 juin 17 21:08 hdd.vmdk

My primary OS (where I use Git) is $uname -a Linux epuerto-FC10.innova-card.internal 2.6.27.24-170.2.68.fc10.x86_64 #1 SMP Wed May 20 22:47:23 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

And my git version is: $ git --version git version 1.6.0.6

my config is: ThinkPad T400 with a Intel(R) Core(TM)2 Duo CPU T9400 and 4Go

Thanks by advance for your help.

Best regards, Emmanuel.

Before you print Think about ENVIRONMENTAL responsibility and commitment

Emmanuel PUERTO Senior MTS, Field Applications (Microcontroller) Linux Embedded Architect

MAXIM Integrated Products, Inc. ZI Athelia IV - Le Forum, Bat A Quartier Roumagoua 13600 La Ciotat - France Phone : +33 44 298 1338 Fax   : +33 44 208 3319 Email : emmanuel.puerto@maxim-ic.com Web   : www.maxim-ic.com

Next: Jeff King
Message 1 of 6 in “[BUG] malloc error when using large file.”
  1. Emmanuel PuertoJun 22, 2009
  2. Jeff KingJun 22, 2009
  3. Emmanuel PuertoJun 23, 2009
  4. Jeff KingJun 23, 2009
  5. Linus TorvaldsJun 23, 2009
  6. Emmanuel PuertoJun 24, 2009

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.