git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Carsten Fuchs <carsten.fuchs@cafu.de>
To: "René Scharfe" <l.s.r@web.de>
Cc: git@vger.kernel.org
Subject: Re: git status --> Out of memory, realloc failed
Date: Fri, 3 Mar 2017 22:03:16 +0100	[thread overview]
Message-ID: <f0787f93-5bba-f79c-2211-1558b3886c09@cafu.de> (raw)
In-Reply-To: <6ba86c1a-87a9-f886-273b-7f94c30c4a95@web.de>

Hi René,

Am 02.03.2017 um 21:04 schrieb René Scharfe:
> When I use ulimit -v with lower and lower numbers I can provoke mmap failures on
> bigger pack files, but not the realloc failures that you're seeing.  And your
> packs should be only up to 20MB anyway (you can check that with "ls -l
> .git/objects/pack/*.pack").

Yes, there are 9 of them, all about 20 MB in size.

> So a shot in the dark: Do you have a lot of untracked files?  You could check by
> cloning your repository locally (which copies only tracked contents).  Does "git
> status" work on the clone?

I had about 40 modified or untracked files with a combined file size of 
about 5 MB.

Before I got your latest mail, I tried something else: Instead of 
connecting to the system with the repository via SSH as usual, I 
accessed the repository by mounting its file system via gvfs-mount onto 
my local desktop machine. Then I used my local, normally working Git to 
commit all modified and some untracked files (and deleted those that 
were left). Running `git status` and other commands took a very long 
time over a network connection of only 6 MBit/s, but eventually I got 
everything committed and pushed.

Quite in the spirit of your above words, getting rid of untracked files 
helped: Logging normally via SSH into the remote machine again, `git 
status` ran normally.

Only then did I see your mail and got another clone, where `git status` 
worked equally well – but then `git diff` failed in a similar manner, 
continuing the problems of `git status`:

(uiserver):p7715773:~/__TEST__$ git clone 
https://CarstenF@bitbucket.org/CarstenF/website-cafu.git
Cloning into 'website-cafu'...
Password for 'https://CarstenF@bitbucket.org':
remote: Counting objects: 44359, done.
remote: Compressing objects: 100% (28777/28777), done.
remote: Total 44359 (delta 19201), reused 38661 (delta 14143)
Receiving objects: 100% (44359/44359), 168.28 MiB | 20.95 MiB/s, done.
Resolving deltas: 100% (19201/19201), done.
Checking connectivity... done.
Checking out files: 100% (18524/18524), done.

(uiserver):p7715773:~/__TEST__$ cd website-cafu/

(uiserver):p7715773:~/__TEST__/website-cafu$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

(uiserver):p7715773:~/__TEST__/website-cafu$ git diff
fatal: unable to create threaded lstat

(uiserver):p7715773:~/__TEST__/website-cafu$ git diff
fatal: Out of memory, realloc failed
fatal: Out of memory, realloc failed
fatal: Out of memory, realloc failed
fatal: recursion detected in die handler

> Another one, darker yet: Does "git config core.preloadIndex 0" help?

That's it!  :-)

Once that was set, both `git status` and `git diff` worked normally again!

I cannot test `git status` right now in the same situation as before, as 
I no longer have a working directory that is "as dirty" as before, but 
the above setting seems to fix the problem promptly and thoroughly!

Many thanks for your help!   :-)

Best regards,
Carsten

      reply	other threads:[~2017-03-03 21:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25 10:13 git status --> Out of memory, realloc failed Carsten Fuchs
2017-03-01 10:02 ` René Scharfe
2017-03-01 20:12   ` Carsten Fuchs
2017-03-02  9:31     ` Duy Nguyen
2017-03-03 21:10       ` Carsten Fuchs
2017-03-02 20:04     ` René Scharfe
2017-03-03 21:03       ` Carsten Fuchs [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f0787f93-5bba-f79c-2211-1558b3886c09@cafu.de \
    --to=carsten.fuchs@cafu.de \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).