* Core file size?
@ 2006-11-30 4:44 linux err
2006-12-01 14:40 ` Jesper Juhl
0 siblings, 1 reply; 3+ messages in thread
From: linux err @ 2006-11-30 4:44 UTC (permalink / raw)
To: linux-kernel
Does anyone know what determines the size of a core
dump? I have a process running out of memory (it
allocates about 3GB) - but the size of core varies
(between 2-3GB) depending on how much the process
wrote on the allocated memory.
Also, the time it takes to write the core (same size)
varies??
I briefly looked at elf_core_dump and get_user_pages()
in binfmt_elf.c. Is there any documentation on this?
Or anyone knows how it works?
TIA
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Core file size?
2006-11-30 4:44 Core file size? linux err
@ 2006-12-01 14:40 ` Jesper Juhl
2006-12-01 15:47 ` linux err
0 siblings, 1 reply; 3+ messages in thread
From: Jesper Juhl @ 2006-12-01 14:40 UTC (permalink / raw)
To: linux err; +Cc: linux-kernel
On 30/11/06, linux err <linux_err@yahoo.com> wrote:
> Does anyone know what determines the size of a core
> dump? I have a process running out of memory (it
> allocates about 3GB) - but the size of core varies
> (between 2-3GB) depending on how much the process
> wrote on the allocated memory.
>
Makes perfect sense. The core dump contains the memory of the process,
so if the process has 3GB in use then the core file will be 3GB.
You can limit the size of core dumps with "ulimit -c"
> Also, the time it takes to write the core (same size)
> varies??
>
Could be many reasons for that. If the load on the machine varies the
time to perform any given action will vary as well.
> I briefly looked at elf_core_dump and get_user_pages()
> in binfmt_elf.c. Is there any documentation on this?
> Or anyone knows how it works?
>
http://x86.ddj.com/ftp/manuals/tools/elf.pdf
http://en.wikipedia.org/wiki/Core_dump
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Core file size?
2006-12-01 14:40 ` Jesper Juhl
@ 2006-12-01 15:47 ` linux err
0 siblings, 0 replies; 3+ messages in thread
From: linux err @ 2006-12-01 15:47 UTC (permalink / raw)
To: linux-kernel
This patch fixed it.
http://lkml.org/lkml/2005/6/13/204
The ELF core dump code has one use of off_t when
writing out segments. Some
of the segments may be passed the 2GB limit of an
off_t, even on a 32-bit
system, so it's important to use loff_t instead. This
fixes a corrupted
core dump in the bigcore test in GDB's testsuite.
Signed-off-by: Daniel Jacobowitz
<dan@codesourcery.com>
Index: linux-2.6.11/fs/binfmt_elf.c
===================================================================
--- linux-2.6.11.orig/fs/binfmt_elf.c 2005-06-09
16:38:17.000000000 -0400
+++ linux-2.6.11/fs/binfmt_elf.c 2005-06-10
00:10:52.000000000 -0400
@@ -1125,7 +1125,7 @@ static int dump_write(struct
file *file,
return file->f_op->write(file, addr, nr,
&file->f_pos) == nr;
}
-static int dump_seek(struct file *file, off_t off)
+static int dump_seek(struct file *file, loff_t off)
{
if (file->f_op->llseek) {
if (file->f_op->llseek(file, off, 0) != off)
--
--- Jesper Juhl <jesper.juhl@gmail.com> wrote:
> On 30/11/06, linux err <linux_err@yahoo.com> wrote:
> > Does anyone know what determines the size of a
> core
> > dump? I have a process running out of memory (it
> > allocates about 3GB) - but the size of core varies
> > (between 2-3GB) depending on how much the process
> > wrote on the allocated memory.
> >
>
> Makes perfect sense. The core dump contains the
> memory of the process,
> so if the process has 3GB in use then the core file
> will be 3GB.
>
> You can limit the size of core dumps with "ulimit
> -c"
>
>
> > Also, the time it takes to write the core (same
> size)
> > varies??
> >
> Could be many reasons for that. If the load on the
> machine varies the
> time to perform any given action will vary as well.
>
>
> > I briefly looked at elf_core_dump and
> get_user_pages()
> > in binfmt_elf.c. Is there any documentation on
> this?
> > Or anyone knows how it works?
> >
> http://x86.ddj.com/ftp/manuals/tools/elf.pdf
> http://en.wikipedia.org/wiki/Core_dump
>
>
> --
> Jesper Juhl <jesper.juhl@gmail.com>
> Don't top-post
> http://www.catb.org/~esr/jargon/html/T/top-post.html
> Plain text mails only, please
> http://www.expita.com/nomime.html
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-12-01 15:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-30 4:44 Core file size? linux err
2006-12-01 14:40 ` Jesper Juhl
2006-12-01 15:47 ` linux err
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®