From ffd0153e6dffcc29cf79d0191860047dba0438bb Mon Sep 17 00:00:00 2001
From: Lukas Larsson
Date: Thu, 4 Dec 2014 11:09:06 +0100
Subject: erts: Improve crash dumps
This commit improves crash dumps in several ways:
* Suspends schedulers to get a current snapshot
* Dumps information about scheduler
* Dumps stack trace of current running process
(including Garbing processes)
---
erts/doc/src/crash_dump.xml | 88 ++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 84 insertions(+), 4 deletions(-)
(limited to 'erts/doc')
diff --git a/erts/doc/src/crash_dump.xml b/erts/doc/src/crash_dump.xml
index 2b5fc877c3..8291bf38b7 100644
--- a/erts/doc/src/crash_dump.xml
+++ b/erts/doc/src/crash_dump.xml
@@ -55,10 +55,12 @@
emulator or the operating system can be reconfigured to avoid the
crash, which is why interpreting the crash dump correctly is
important.
+ On systems that support OS signals, it is also possible to stop
+ the runtime system and generate a crash dump by sending the SIGUSR1.
The erlang crash dump is a readable text file, but it might not be
very easy to read. Using the Crashdump Viewer tool in the
application will simplify the task. This is an
- HTML based tool for browsing Erlang crash dumps.
+ wx-widget based tool for browsing Erlang crash dumps.
@@ -66,8 +68,9 @@
The first part of the dump shows the creation time for the dump,
a slogan indicating the reason for the dump, the system version,
of the node from which the dump originates, the compile time of
- the emulator running the originating node and the number of
- atoms in the atom table.
+ the emulator running the originating node, the number of
+ atoms in the atom table and the runtime system thread that caused
+ the crash dump to happen.
+
+
+ Scheduler information
+ Under the tag =scheduler information about the current state
+ and statistics of the schedulers in the runtime system is displayed.
+ On OSs that do allow instant suspension of other threads, the data within
+ this section will reflect what the runtime system looks like at the moment
+ when the crash happens.
+ The following fields can exist for a process:
+
+ =scheduler:id
+ - Header, states the scheduler identifier.
+ Scheduler Sleep Info Flags
+ - If empty the scheduler was doing some work.
+ If not empty the scheduler is either in some state of sleep,
+ or suspended. This entry is only present in a SMP enabled emulator
+ Scheduler Sleep Info Aux Work
+ - If not empty, a scheduler internal auxiliary work is scheduled
+ to be done.
+ Current Port
+ - The port identifier of the port that is currently being
+ executed by the scheduler.
+ Current Process
+ - The process identifier of the process that is currently being
+ executed by the scheduler. If there is such a process this entry is
+ followed by the State,Internal State,
+ Program Counter, CP of that same process. See
+ Process Information for a
+ description what the different entries mean. Keep in mind that
+ this is a snapshot of what the entries are exactly when the crash
+ dump is starting to be generated. Therefore they will most likely
+ be different (and more telling) then the entries for the same
+ processes found in the =proc section. If there is no currently
+ running process, only the Current Process entry will be printed.
+
+ Current Process Limited Stack Trace
+ - This entry only shows up if there is a current process. It is very
+ similar to =proc_stack,
+ except that only the function frames are printed (i.e. the stack variables
+ are omited). It is also limited to only print the top and bottom part
+ of the stack. If the stack is small (less that 512 slots) then the
+ entire stack will be printed. If not, an entry stating
+
skipping ## slots
will be printed where ## is
+ replaced by the number of slots that has been skipped.
+ Run Queue
+ - Displays statistics about how many processes and ports
+ of different priorities are scheduled on this scheduler.
+ ** crashed **
+ - This entry is normally not printed. It signifies that getting
+ the rest of the information about this scheduler failed for some reason.
+
+
+
+
Memory information
@@ -314,6 +371,9 @@
- The number of live argument registers. The argument registers,
if any are live, will follow. These may contain the arguments
of the function if they are not yet moved to the stack.
+ - Internal State
+ - A more detailed internal represantation of the state of
+ this process.
See also the section about process data.
@@ -339,18 +399,38 @@
Name
- The name of the table, regardless of whether it is a
or not.
- Buckets
+ Hash table, Buckets
- This occurs if the table is a hash table, i.e. if it is not an
.
+ Hash table, Chain Length
+ - Only applicable for hash tables. Contains statistics about the
+ hash table, such as the max, min and avg chain length. Having a max much
+ larger than the avg, and a std dev much larger that
+ the expected std dev is a sign that the hashing of the terms is
+ behaving badly for some reason.
Ordered set (AVL tree), Elements
- This occurs only if the table is an . (The
number of elements is the same as the number of objects in the
table.)
+ Fixed
+ - If the table is fixed using ets:safe_fixtable or some internal
+ mechanism.
Objects
- The number of objects in the table
Words
- The number of words (usually 4 bytes/word) allocated to data
in the table.
+ Type
+ - The type of the table, i.e. set, bag,
+ dublicate_bag or ordered_set.
+ Compressed
+ - If this table was compressed.
+ Protection
+ - The protection of this table.
+ Write Concurrency
+ - If write_concurrency was enabled for this table.
+ Read Concurrency
+ - If read_concurrency was enabled for this table.
--
cgit v1.2.3