Home > Archive > Unix Programming > August 2006 > mmap core file suppression in Linux
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
mmap core file suppression in Linux
|
|
| smith4894@excite.com 2006-08-29, 7:01 pm |
| If a process has a mmap'd file in memory and crashes, the contents of
the mmap seem to be dumped to the core file as well (Linux). This is
undesirable for us, especially if the mmap'd file is large. Is there
any way to suppress dumping the mmap contents to the core file? On
FreeBSD, there is a flag available to use in the mmap() call to do this
(MAP_NOCORE), doesn't seem to be available as per the Linux man pages
though...
suggestions please?!
-Thanks!
| |
| bwaichu@yahoo.com 2006-08-29, 7:01 pm |
|
smith4894@excite.com wrote:
> If a process has a mmap'd file in memory and crashes, the contents of
> the mmap seem to be dumped to the core file as well (Linux). This is
> undesirable for us, especially if the mmap'd file is large. Is there
> any way to suppress dumping the mmap contents to the core file? On
> FreeBSD, there is a flag available to use in the mmap() call to do this
> (MAP_NOCORE), doesn't seem to be available as per the Linux man pages
> though...
>
> suggestions please?!
>
> -Thanks!
setrlimit(2)
| |
| smith4894@excite.com 2006-08-30, 4:00 am |
|
bwaichu@yahoo.com wrote:
> smith4894@excite.com wrote:
>
> setrlimit(2)
setrlimit() is close.. but not quite there. I'd like to suppress the
contents of the mmap file from being dumped to the core, setrlimit()
allows me to set an upper limit on the size of the core file as a
whole. Any other linux calls available that might help me achieve this
(as with FreeBSD's MAP_NOCORE flag for mmap()? )
| |
| Maxim Yegorushkin 2006-08-30, 4:00 am |
| smith4894@excite.com wrote:
> bwaichu@yahoo.com wrote:
>
> setrlimit() is close.. but not quite there. I'd like to suppress the
> contents of the mmap file from being dumped to the core, setrlimit()
> allows me to set an upper limit on the size of the core file as a
> whole. Any other linux calls available that might help me achieve this
> (as with FreeBSD's MAP_NOCORE flag for mmap()? )
If there is no better solution, you could munmap() it in the signal
handler first, and only then dump core.
| |
| Nils O. Selåsdal 2006-08-30, 4:00 am |
| Maxim Yegorushkin wrote:
> smith4894@excite.com wrote:
>
> If there is no better solution, you could munmap() it in the signal
> handler first, and only then dump core.
I'd be more concerned about fixing the bug that lead to the crash,
than figuring out how to disable mmap dumpings. Perpahs it's just me :-)
| |
| Maxim Yegorushkin 2006-08-30, 8:00 am |
|
Nils O. Sel=E5sdal wrote:
> Maxim Yegorushkin wrote:
his[color=darkred]
>
> I'd be more concerned about fixing the bug that lead to the crash,
> than figuring out how to disable mmap dumpings. Perpahs it's just me :-)
If I were asked if I would bet my montly salary that my app never dumps
core, I would not. (I have to use 3rd party binary only libraries, they
do not disclose their source codes, thus I can't claim it is rock
stable).
Would you?
|
|
|
|
|