Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2017-07-13,master
commit 8dd98967b6f273cfb6c22c538ba40894cd8e558a Author: Marek Lindner mareklindner@neomailbox.ch Date: Mon Mar 29 10:10:23 2010 +0000
doc: batmand/Coredump
8dd98967b6f273cfb6c22c538ba40894cd8e558a batmand/Coredump.textile | 46 +++++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 27 deletions(-)
diff --git a/batmand/Coredump.textile b/batmand/Coredump.textile index c4831312..0a4d3165 100644 --- a/batmand/Coredump.textile +++ b/batmand/Coredump.textile @@ -1,41 +1,33 @@
-<pre> -<code class="div"> - - -h2. What is a coredump ? +{{{ +#!div style="width: 40em; text-align: justify"
+== What is a coredump ? ==
A coredump is the state of the programs memory when it crashed. It allows programmers to exactly nail down the line in the code which caused the segfault. See http://en.wikipedia.org/wiki/Coredump for more information.
- -h3. Why do I need ulimit and what does it do ? - +=== Why do I need ulimit and what does it do ? ===
As coredumps save the programs memory on the hard disk the coredump files can become quite large because some applications consume a lot of memory. On embedded devices (e.g. small routers) a coredump can fill the entire disk easily. Therefore the tool "ulimit" allows you to control what memory size is safe to be saved on disk. A "ulimit -c 20000" saves coredumps of up to 20MB, "ulimit -c unlimited" saves everything no matter how big it is. You can check your systems default by running "ulimit -c" without any value. If the setting is too small or coredumping is disabled you have to run "ulimit -c <value>" each time before you start batman.
+=== How to get a batman coredump ? ===
-h3. How to get a batman coredump ? - - -* log into a shell on your device -* set the ulimit value if necessary (see ulimit section of this document) -* start batman in this very shell but don't let it fork into the background + * log into a shell on your device + * set the ulimit value if necessary (see ulimit section of this document) + * start batman in this very shell but don't let it fork into the background using a debug level (-d 3 or -d 4) -* do not close the shell as it will kill the running batman -* make batman crash (depending on the bug you experience) -* retrieve the "core" file from the current directory - -*Don't forget to send the used batman binary along with the coredump. Without the correct binary the coredump is useless! * - + * do not close the shell as it will kill the running batman + * make batman crash (depending on the bug you experience) + * retrieve the "core" file from the current directory
-h3. I can't find the coredump ... +'''Don't forget to send the used batman binary along with the coredump. Without the correct binary the coredump is useless! '''
+=== I can't find the coredump ... ===
-* May be batman did not crash but just exited ? A coredump can be created only on a segmentation fault. Your system logs should contain a log entry similar to "Error - SIGSEGV received, trying to clean up ..." otherwise batman did not crash. -* Did you check the ulimit section ? -* The coredumping behaviour can be modified by changing some /proc parameters like /proc/sys/kernel/core_uses_pid and /proc/sys/kernel/core_pattern. In most cases the defaults are the right choice. Only modify them if you are sure what you are doing! -* Some distributions (especially for embedded devices) use busybox which allows to completely disable coredumping (even if ulimit is set). Look for the CONFIG_FEATURE_INIT_COREDUMPS option to learn more about it. [[OpenWRT]] allows to enable it via 'make menuconfig': Base system -> busybox -> Configuration -> Init Utilities -> Support dumping core for child processes. -* [[OpenWRT]] also may disable ELF core dumping in the kernel which you can activate by running "make kernel_menuconfig" -> General setup -> Configure standard kernel features (for small systems) -> Enable ELF core dumps -</code></pre> + * May be batman did not crash but just exited ? A coredump can be created only on a segmentation fault. Your system logs should contain a log entry similar to "Error - SIGSEGV received, trying to clean up ..." otherwise batman did not crash. + * Did you check the ulimit section ? + * The coredumping behaviour can be modified by changing some /proc parameters like /proc/sys/kernel/core_uses_pid and /proc/sys/kernel/core_pattern. In most cases the defaults are the right choice. Only modify them if you are sure what you are doing! + * Some distributions (especially for embedded devices) use busybox which allows to completely disable coredumping (even if ulimit is set). Look for the CONFIG_FEATURE_INIT_COREDUMPS option to learn more about it. OpenWRT allows to enable it via 'make menuconfig': Base system -> busybox -> Configuration -> Init Utilities -> Support dumping core for child processes. + * OpenWRT also may disable ELF core dumping in the kernel which you can activate by running "make kernel_menuconfig" -> General setup -> Configure standard kernel features (for small systems) -> Enable ELF core dumps +}}}