From: "Shawn O. Pearce" <spearce@spearce.org>
To: "R. Tyler Ballance" <tyler@slide.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add support for changing packed_git_window_size at process start time
Date: Fri, 26 Dec 2008 13:36:04 -0800 [thread overview]
Message-ID: <20081226213604.GA20356@spearce.org> (raw)
In-Reply-To: <1229927143.14882.17.camel@starfruit>
"R. Tyler Ballance" <tyler@slide.com> wrote:
> Ah, gotcha, sounds like a good idea. I went ahead and added the change
> and I'm still getting the memory issues.
:-|
> I'm not as familiar with using gdb(1), so I'm having trouble tracking
> down the issue in a limited session, I get loads of issues like the
> following when trying to step through an execution of `git log`
>
> Is there a means in which I can cause a core dump on an ENOMEM error passed back from mmap(2)? That or a way to impose these limits on the gdb git-subprocess but not on the gdb process?
Look at xmmap in git's code. All of our mmap calls go through that
function and try to release pack windows if we get an error back
from mmap(), then it retries the mmap request. xmalloc likewise
does the same thing for malloc requests; xcalloc for calloc, xstrdup
for strdup. We have a number of these x variant functions to handle
memory allocation.
You might be be able to put a setrlimit call into main() in git.c to
drop the rlimit for Git to a lower limit than it inherited from gdb,
allowing you to start gdb with a much higher ulimit so it doesn't
barf when trying to inspect the git child.
--
Shawn.
prev parent reply other threads:[~2008-12-26 21:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-21 21:37 Dynamically adjusting packed_git_window_size R. Tyler Ballance
2008-12-21 21:37 ` [PATCH] Add support for changing packed_git_window_size at process start time R. Tyler Ballance
2008-12-21 21:37 ` [PATCH] Style changes per suggestions from Junio in #git R. Tyler Ballance
2008-12-21 22:03 ` Matthieu Moy
2008-12-21 22:22 ` Shawn O. Pearce
2008-12-21 22:28 ` [PATCH] Add support for changing packed_git_window_size at process start time Shawn O. Pearce
2008-12-22 6:25 ` R. Tyler Ballance
2008-12-26 21:36 ` Shawn O. Pearce [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081226213604.GA20356@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=tyler@slide.com \
/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.
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 NNTP newsgroup(s).