From: Paul Smith <psmith@gnu.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Andi Kleen <andi@firstfloor.org>, gdb@sourceware.org
Subject: Re: Partial cores using Linux "pipe" core_pattern
Date: Mon, 18 May 2009 14:32:00 -0000 [thread overview]
Message-ID: <1242657103.2800.170.camel@homebase.localnet> (raw)
In-Reply-To: <m27i0ejzbi.fsf@igel.home>
On Mon, 2009-05-18 at 15:49 +0200, Andreas Schwab wrote:
> Apparently the ELF core dumper cannot handle short writes (see
> dump_write in fs/binfmt_elf.c). You should probably use a read buffer
> of at least a page, which is the most the kernel tries to write at once.
This is good info; thanks. But, my read buffer is 256K:
const int bufsize = 1024 * 256;
char *buf = (char *)malloc(bufsize);
if (!buf) {
_vlog(LOG_ERR, "Failed to allocate read buffer size %d\n", bufsize);
exit(1);
}
(this is compiled with g++ for hysterical raisins, in case that wasn't
obvious). I didn't check to see what the "normal" read sizes are.
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@gnu.org> Find some GNU make tips at:
http://www.gnu.org http://make.mad-scientist.us
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
next prev parent reply other threads:[~2009-05-18 14:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-18 1:23 Paul Smith
2009-05-18 6:05 ` Paul Pluzhnikov
2009-05-18 13:22 ` Paul Smith
2009-05-18 7:25 ` Andi Kleen
2009-05-18 13:29 ` Paul Smith
2009-05-18 13:49 ` Andreas Schwab
2009-05-18 14:32 ` Paul Smith [this message]
2009-05-21 16:32 ` Paul Smith
2009-05-26 19:26 ` Paul Smith
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=1242657103.2800.170.camel@homebase.localnet \
--to=psmith@gnu.org \
--cc=andi@firstfloor.org \
--cc=gdb@sourceware.org \
--cc=schwab@linux-m68k.org \
/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