mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: "Bron Gondwana" <brong@fastmail.fm>
Cc: "Michael Kerrisk" <mtk.manpages@gmail.com>,
	"Philippe De Muyter" <phdm@macqel.be>,
	linux-kernel@vger.kernel.org, robm@fastmail.fm
Subject: Re: mmap'ed memory in core files ?
Date: Wed, 2 Jul 2008 07:14:22 +0200	[thread overview]
Message-ID: <cfd18e0f0807012214o78353faal84a5fa764d3210bf@mail.gmail.com> (raw)
In-Reply-To: <20080701214423.GA29875@brong.net>

On Tue, Jul 1, 2008 at 11:44 PM, Bron Gondwana <brong@fastmail.fm> wrote:
> On Tue, Jul 01, 2008 at 08:16:11PM +0200, Michael Kerrisk wrote:
>> On 7/1/08, Philippe De Muyter <phdm@macqel.be> wrote:
>> > Hello everybody,
>> >
>> >  I develop video acquisition software using the video1394 interface.
>> >  The images grabbed by the camera and iee1394 bus are kept in kernel
>> >  memory and made available to the user program through a mmap call done
>> >  in the libdc1394 library :
>> >
>> >  dma_ring_buffer= mmap(0, vmmap.nb_buffers * vmmap.buf_size,
>> >                 PROT_READ|PROT_WRITE,MAP_SHARED, craw->capture.dma_fd, 0);
>> >
>> >  Sometimes, my program crashes and produces a core file :)  It seems to
>> >  me that the core file does not contain the mmap'ed memory and hence
>> >  I cannot replay my program with the same image for debugging purpose.
>> >
>> >  Is it possible to configure the kernel through /proc, or through the mmap
>> >  system call to have that mmapped segment in the core file, or do I need
>> >  to modify the kernel itself to obtain the behaviour I want ?  If I
>> >  need to modify the kernel, can some kind soul provide me some pointers ?
>>
>>
>> Have a look at the section "Controlling which mappings are written to
>> the core dump" in a recent core.5 man page:
>> http://www.kernel.org/doc/man-pages/online/pages/man5/core.5.html
>
> Interesting (and somewhat off topic to your conversation here) - it
> appears that when dumping mappings, the kernel ignores the maximum
> core size set with "limit".
>
> This is particularly interesting on a 64 bit kernel where a bug in
> your code causes you to try to read something about 2Gb into your
> alleged mmaped file (actual size ~500 bytes) and the segfault causes
> a coredump.

Do you have a ssimple example program for this?

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html

  reply	other threads:[~2008-07-02  5:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01 13:21 Philippe De Muyter
2008-07-01 18:16 ` Michael Kerrisk
2008-07-01 21:44   ` Bron Gondwana
2008-07-02  5:14     ` Michael Kerrisk [this message]
2008-07-02  6:35       ` Rob Mueller
2008-07-02 11:07         ` Andi Kleen
2008-07-02 11:52           ` Bron Gondwana
2008-07-02 10:50   ` Philippe De Muyter
2008-07-02 10:58     ` Michael Kerrisk
2008-07-02 11:04       ` Philippe De Muyter
2008-07-02 12:24         ` Stefan Richter
2008-07-02 13:16           ` Philippe De Muyter
2008-07-03  3:51       ` Hidehiro Kawai
2008-07-03  9:22         ` Philippe De Muyter
2008-07-04  5:50           ` Hidehiro Kawai
2008-07-04  6:33             ` Stefan Richter
2008-07-04 11:25               ` Philippe De Muyter
2008-07-04 14:29               ` Hugh Dickins
2008-07-04 11:13             ` Philippe De Muyter
2008-07-03  9:37         ` Philippe De Muyter
2008-07-03 16:52           ` [PATCH] ieee1394 : dump mmapped video1394 buffers in core files Philippe De Muyter
2008-07-04 18:33             ` Stefan Richter
2008-07-04 20:49               ` Philippe De Muyter
2008-07-02 13:30     ` mmap'ed memory in core files ? Christoph Hellwig
2008-07-02 11:01   ` Philippe De Muyter

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=cfd18e0f0807012214o78353faal84a5fa764d3210bf@mail.gmail.com \
    --to=mtk.manpages@googlemail.com \
    --cc=brong@fastmail.fm \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=phdm@macqel.be \
    --cc=robm@fastmail.fm \
    /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

Powered by JetHome