aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/crash_dump.xml
blob: a9aeb1888c65598a9e2513c3782b3a77e425c9f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">

<chapter>
  <header>
    <copyright>
      <year>1999</year><year>2016</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
 
          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

    </legalnotice>

    <title>How to Interpret the Erlang Crash Dumps</title>
    <prepared>Patrik Nyblom</prepared>
    <responsible></responsible>
    <docno></docno>
    <approved></approved>
    <checked></checked>
    <date>1999-11-11</date>
    <rev>PA1</rev>
    <file>crash_dump.xml</file>
  </header>
  <p>This section describes the <c><![CDATA[erl_crash.dump]]></c> file
    generated upon abnormal exit of the Erlang runtime system.</p>

  <note>
    <p>The Erlang crash dump had a major facelift in Erlang/OTP R9C. The
      information in this section is therefore not directly applicable for
      older dumps. However, if you use <seealso marker="observer:crashdump_viewer">
      <c>crashdump_viewer(3)</c></seealso> on older dumps,
      the crash dumps are translated into a format similar to this.</p>
  </note>

  <p>The system writes the crash dump in the current directory of
    the emulator or in the file pointed out by the environment variable
    (whatever that means on the current operating system)
    <c>ERL_CRASH_DUMP</c>. For a crash dump to be written, a
    writable file system must be mounted.</p>

  <p>Crash dumps are written mainly for one of two reasons: either the
    built-in function <c><![CDATA[erlang:halt/1]]></c> is called explicitly
    with a string argument from running Erlang code, or the runtime
    system has detected an error that cannot be handled. The most
    usual reason that the system cannot handle the error is that the
    cause is external limitations, such as running out of memory. A
    crash dump caused by an internal error can be caused by the system
    reaching limits in the emulator itself (like the number of atoms
    in the system, or too many simultaneous ETS tables). Usually the
    emulator or the operating system can be reconfigured to avoid the
    crash, which is why interpreting the crash dump correctly is
    important.</p>

  <p>On systems that support OS signals, it is also possible to stop
    the runtime system and generate a crash dump by sending the <c>SIGUSR1</c>
    signal.</p>

  <p>The Erlang crash dump is a readable text file, but it can be difficult
    to read. Using the Crashdump Viewer tool in the
    <c><![CDATA[Observer]]></c> application simplifies the task. This is a
    wx-widget-based tool for browsing Erlang crash dumps.</p>

  <section>
    <marker id="general_info"></marker>
    <title>General Information</title>
    <p>The first part of the crash dump shows the following:</p>

    <list type="bulleted">
      <item>The creation time for the dump</item>
      <item>A slogan indicating the reason for the dump</item>
      <item>The system version of the node from which the dump originates</item>
      <item>The compile time of the emulator running the originating node</item>
      <item>The number of atoms in the atom table</item>
      <item>The runtime system thread that caused the crash dump</item>
    </list>

    <section>
      <title>Reasons for Crash Dumps (Slogan)</title>
      <p>The reason for the dump is shown in the beginning of the file as:</p>

      <pre>
Slogan: &lt;reason&gt;</pre>

      <p>If the system is halted by the BIF
        <c><![CDATA[erlang:halt/1]]></c>, the slogan is the string parameter
        passed to the BIF, otherwise it is a description generated by
        the emulator or the (Erlang) kernel. Normally the message
        is enough to understand the problem, but
        some messages are described here. Notice that the
        suggested reasons for the crash are <em>only suggestions</em>.
        The exact reasons for the errors can vary
        depending on the local applications and the underlying
        operating system.</p>

      <taglist>
        <tag><em>&lt;A&gt;: Cannot allocate &lt;N&gt; bytes of memory (of type
           "&lt;T&gt;")</em></tag>
        <item>
          <p>The system has run out of memory. &lt;A&gt; is the allocator that
            failed to allocate memory, &lt;N&gt; is the number of bytes that
            &lt;A&gt; tried to allocate, and &lt;T&gt; is the memory block
            type that the memory was needed for. The most common case is
            that a process stores huge amounts of data. In this case
            &lt;T&gt; is most often <c><![CDATA[heap]]></c>,
            <c><![CDATA[old_heap]]></c>, <c><![CDATA[heap_frag]]></c>, or
            <c><![CDATA[binary]]></c>. For more information on allocators, see
            <seealso marker="erts_alloc"><c>erts_alloc(3)</c></seealso>.</p>
        </item>
        <tag><em>&lt;A&gt;: Cannot reallocate &lt;N&gt; bytes of memory (of
          type "&lt;T&gt;")</em></tag>
        <item>
          <p>Same as above except that memory was reallocated
            instead of allocated when the system ran out of memory.</p>
        </item>
        <tag><em>Unexpected op code &lt;N&gt;</em></tag>
        <item>
          <p>Error in compiled code, <c><![CDATA[beam]]></c> file damaged, or
            error in the compiler.</p>
        </item>
        <tag><em>Module &lt;Name&gt; undefined <c><![CDATA[|]]></c> Function
          &lt;Name&gt; undefined <c><![CDATA[|]]></c> No function
          &lt;Name&gt;:&lt;Name&gt;/1 <c><![CDATA[|]]></c> No function
          &lt;Name&gt;:start/2</em></tag>
        <item>
          <p>The Kernel/STDLIB applications are
            damaged or the start script is damaged.</p>
        </item>
        <tag><em>Driver_select called with too large file descriptor
          <c><![CDATA[N]]></c></em></tag>
        <item>
          <p>The number of file descriptors for sockets
            exceeds 1024 (Unix only). The limit on file descriptors in
            some Unix flavors can be set to over 1024, but only 1024
            sockets/pipes can be used simultaneously by Erlang (because of
            limitations in the Unix <c><![CDATA[select]]></c> call). The number
            of open regular files is not affected by this.</p>
        </item>
        <tag><em>Received SIGUSR1</em></tag>
        <item>
          <p>Sending the <c>SIGUSR1</c> signal to an Erlang machine (Unix only)
            forces a crash dump. This slogan reflects that the Erlang machine
            crash-dumped because of receiving that signal.</p>
        </item>
        <tag><em>Kernel pid terminated (&lt;Who&gt;) (&lt;Exit
          reason&gt;)</em></tag>
        <item>
          <p>The kernel supervisor has detected a failure, usually that the
            <c><![CDATA[application_controller]]></c> has shut down
            (<c><![CDATA[Who]]></c> = <c><![CDATA[application_controller]]></c>,
            <c><![CDATA[Why]]></c> = <c><![CDATA[shutdown]]></c>).
            The application controller
            can have shut down for many reasons, the most usual
            is that the node name of the distributed Erlang node is
            already in use. A complete supervisor tree "crash" (that is,
            the top supervisors have exited) gives about the same
            result. This message comes from the Erlang code and not from
            the virtual machine itself. It is always because of some
            failure in an application, either within OTP or a
            "user-written" one. Looking at the error log for your
            application is probably the first step to take.</p>
        </item>
        <tag><em>Init terminating in do_boot ()</em></tag>
        <item>
          <p>The primitive Erlang boot sequence was terminated, most probably
            because the boot script has errors or cannot be read. This is
            usually a configuration error; the system can have been started
            with a faulty <c><![CDATA[-boot]]></c> parameter or with a boot
            script from the wrong OTP version.</p>
        </item>
        <tag><em>Could not start kernel pid (&lt;Who&gt;) ()</em></tag>
        <item>
          <p>One of the kernel processes could not start. This is probably
            because of faulty arguments (like errors in a
            <c><![CDATA[-config]]></c> argument)
            or faulty configuration files. Check that all files are in
            their correct location and that the configuration files (if
            any) are not damaged. Usually messages are also
            written to the controlling terminal and/or the error log
            explaining what is wrong.</p>
        </item>
      </taglist>

      <p>Other errors than these can occur, as the
        <c><![CDATA[erlang:halt/1]]></c> BIF can generate any message. If the
        message is not generated by the BIF and does not occur in the
        list above, it can be because of an error in the emulator. There
        can however be unusual messages, not mentioned here, which
        are still connected to an application failure. There is much
        more information available, so a thorough reading of the
        crash dump can reveal the crash reason. The size of processes,
        the number of ETS tables, and the Erlang data on each process
        stack can be useful to find the problem.</p>
    </section>

    <section>
      <title>Number of Atoms</title>
      <p>The number of atoms in the system at the time of the crash is
        shown as <em>Atoms: &lt;number&gt;</em>. Some ten thousands atoms is
        perfectly normal, but more can indicate that the BIF
        <c><![CDATA[erlang:list_to_atom/1]]></c> is used to generate many
        <em>different</em> atoms dynamically, which is never a good idea.</p>
    </section>
  </section>

  <section>
    <marker id="scheduler"></marker>
    <title>Scheduler Information</title>
    <p>Under the tag <em>=scheduler</em> is shown information about the current
      state and statistics of the schedulers in the runtime system. On
      operating systems that allow suspension of other threads, the
      data within this section reflects what the runtime system looks like
      when a crash occurs.</p>

    <p>The following fields can exist for a process:</p>

    <taglist>
      <tag><em>=scheduler:id</em></tag>
      <item>
        <p>Heading. States the scheduler identifier.</p>
      </item>
      <tag><em>Scheduler Sleep Info Flags</em></tag>
      <item>
        <p>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 an SMP-enabled
          emulator.</p>
      </item>
      <tag><em>Scheduler Sleep Info Aux Work</em></tag>
      <item>
        <p>If not empty, a scheduler internal auxiliary work is scheduled
          to be done.</p>
      </item>
      <tag><em>Current Port</em></tag>
      <item>
        <p>The port identifier of the port that is currently
          executed by the scheduler.</p>
      </item>
      <tag><em>Current Process</em></tag>
      <item>
        <p>The process identifier of the process that is currently
          executed by the scheduler. If there is such a process, this entry is
          followed by the <em>State</em>, <em>Internal State</em>,
          <em>Program Counter</em>, and <em>CP</em> of that same process.
          The entries are described in section
          <seealso marker="#processes">Process Information</seealso>.</p>
        <p>Notice that this is a snapshot of what the entries are exactly when
          the crash dump is starting to be generated. Therefore they are most
          likely different (and more telling) than the entries for the same
          processes found in the <em>=proc</em> section. If there is no
          currently running process, only the <em>Current Process</em> entry is
          shown.</p>
      </item>
      <tag><em>Current Process Limited Stack Trace</em></tag>
      <item>
        <p>This entry is shown only if there is a current process. It is
          similar to <seealso marker="#proc_data">
          <em>=proc_stack</em></seealso>, except that only the function frames
          are shown (that is, the stack variables are omitted).
          Also, only the top and bottom part of the stack are shown. If the
          stack is small (&lt; 512 slots), the entire stack is shown. Otherwise
          the entry <em>skipping ## slots</em> is shown, where <c>##</c>
          is replaced by the number of slots that has been skipped.</p>
      </item>
      <tag><em>Run Queue</em></tag>
      <item>
        <p>Shows statistics about how many processes and ports
          of different priorities are scheduled on this scheduler.</p>
      </item>
      <tag><em>** crashed **</em></tag>
      <item>
        <p>This entry is normally not shown. It signifies that getting the rest
          of the information about this scheduler failed for some reason.</p>
      </item>
    </taglist>
  </section>

  <section>
    <marker id="memory"></marker>
    <title>Memory Information</title>
    <p>Under the tag <em>=memory</em> is shown information similar
      to what can be obtainted on a living node with
      <seealso marker="erts:erlang#erlang:memory/0">
      <c>erlang:memory()</c></seealso>.</p>
  </section>

  <section>
    <marker id="internal_tables"></marker>
    <title>Internal Table Information</title>
    <p>Under the tags <em>=hash_table:&lt;table_name&gt;</em> and
      <em>=index_table:&lt;table_name&gt;</em> is shown internal
      tables. These are mostly of interest for runtime system developers.</p>
  </section>

  <section>
    <marker id="allocated_areas"></marker>
    <title>Allocated Areas</title>
    <p>Under the tag <em>=allocated_areas</em> is shown information
      similar to what can be obtained on a living node with
      <seealso marker="erts:erlang#system_info_allocated_areas">
      <c>erlang:system_info(allocated_areas)</c></seealso>.</p>
  </section>

  <section>
    <marker id="allocator"></marker>
    <title>Allocator</title>
    <p>Under the tag <em>=allocator:&lt;A&gt;</em> is shown
      various information about allocator &lt;A&gt;. The information
      is similar to what can be obtained on a living node with
      <seealso marker="erts:erlang#system_info_allocator_tuple">
      <c>erlang:system_info({allocator, &lt;A&gt;})</c></seealso>.
      For more information, see also
      <seealso marker="erts_alloc"><c>erts_alloc(3)</c></seealso>.</p>
  </section>

  <section>
    <marker id="processes"></marker>
    <title>Process Information</title>
    <p>The Erlang crashdump contains a listing of each living Erlang
      process in the system. The following fields can exist for a process:</p>

    <taglist>
      <tag><em>=proc:&lt;pid&gt;</em></tag>
      <item>
        <p>Heading. States the process identifier.</p>
      </item>
      <tag><em>State</em></tag>
      <item>
        <p>The state of the process. This can be one of the following:</p>
        <taglist>
          <tag><em>Scheduled</em></tag>
          <item>The process was scheduled to run
            but is currently not running ("in the run queue").</item>
          <tag><em>Waiting</em></tag>
          <item>The process was waiting for
            something (in <c><![CDATA[receive]]></c>).</item>
          <tag><em>Running</em></tag>
          <item>The process was currently running.
            If the BIF <c><![CDATA[erlang:halt/1]]></c> was called, this was
            the process calling it.</item>
          <tag><em>Exiting</em></tag>
          <item>The process was on its way to exit.</item>
          <tag><em>Garbing</em></tag>
          <item>This is bad luck, the process was
            garbage collecting when the crash dump was written. The rest
            of the information for this process is limited.</item>
          <tag><em>Suspended</em></tag>
          <item>The process is suspended, either
            by the BIF <c><![CDATA[erlang:suspend_process/1]]></c> or because
            it tries to write to a busy port.</item>
        </taglist>
      </item>
      <tag><em>Registered name</em></tag>
      <item>
        <p>The registered name of the process, if any.</p>
      </item>
      <tag><em>Spawned as</em></tag>
      <item>
        <p>The entry point of the process, that is, what function was
          referenced in the <c><![CDATA[spawn]]></c> or
          <c><![CDATA[spawn_link]]></c> call that
          started the process.</p>
      </item>
      <tag><em>Last scheduled in for | Current call</em></tag>
      <item>
        <p>The current function of the process. These fields do not
          always exist.</p>
      </item>
      <tag><em>Spawned by</em></tag>
      <item>
        <p>The parent of the process, that is, the process that executed
          <c><![CDATA[spawn]]></c> or <c><![CDATA[spawn_link]]></c>.</p>
      </item>
      <tag><em>Started</em></tag>
      <item>
        <p>The date and time when the process was started.</p>
      </item>
      <tag><em>Message queue length</em></tag>
      <item>
        <p>The number of messages in the process' message queue.</p>
      </item>
      <tag><em>Number of heap fragments</em></tag>
      <item>
        <p>The number of allocated heap fragments.</p>
      </item>
      <tag><em>Heap fragment data</em></tag>
      <item>
        <p>Size of fragmented heap data. This is data either created by
          messages sent to the process or by the Erlang BIFs. This
          amount depends on so many things that this field is utterly
          uninteresting.</p>
      </item>
      <tag><em>Link list</em></tag>
      <item>
        <p>Process IDs of processes linked to this one. Can also contain
          ports. If process monitoring is used, this field also tells in
          which direction the monitoring is in effect. That is, a link
          "to" a process tells you that the "current" process was
          monitoring the other, and a link "from" a process tells you
         that the other process was monitoring the current one.</p>
      </item>
      <tag><em>Reductions</em></tag>
      <item>
        <p>The number of reductions consumed by the process.</p>
      </item>
      <tag><em>Stack+heap</em></tag>
      <item>
        <p>The size of the stack and heap (they share memory segment).</p>
      </item>
      <tag><em>OldHeap</em></tag>
      <item>
        <p>The size of the "old heap". The Erlang virtual machine uses
          generational garbage collection with two generations. There is
          one heap for new data items and one for the data that has
          survived two garbage collections. The assumption (which is
          almost always correct) is that data surviving two garbage
          collections can be "tenured" to a heap more seldom garbage
          collected, as they will live for a long period. This is a
          usual technique in virtual machines. The sum of the
          heaps and stack together constitute most of the
          allocated memory of the process.</p>
      </item>
      <tag><em>Heap unused, OldHeap unused</em></tag>
      <item>
        <p>The amount of unused memory on each heap. This information is
          usually useless.</p>
      </item>
      <tag><em>Memory</em></tag>
      <item>
        <p>The total memory used by this process. This includes call stack,
          heap, and internal structures. Same as
          <seealso marker="erlang#process_info-2">
          <c>erlang:process_info(Pid,memory)</c></seealso>.</p>
      </item>
      <tag><em>Program counter</em></tag>
      <item>
        <p>The current instruction pointer. This is only of interest for
          runtime system developers. The function into which the program
          counter points is the current function of the process.</p>
      </item>
      <tag><em>CP</em></tag>
      <item>
        <p>The continuation pointer, that is, the return address for the
          current call. Usually useless for other than runtime system
          developers. This can be followed by the function into which
          the CP points, which is the function calling the current
          function.</p>
      </item>
      <tag><em>Arity</em></tag>
      <item>
        <p>The number of live argument registers. The argument registers
          if any are live will follow. These can contain the arguments
          of the function if they are not yet moved to the stack.</p>
      </item>
      <tag><em>Internal State</em></tag>
      <item>
        <p>A more detailed internal representation of the state of
          this process.</p>
      </item>
    </taglist>
    <p>See also section <seealso marker="#proc_data">Process Data</seealso>.</p>
  </section>

  <section>
    <marker id="ports"></marker>
    <title>Port Information</title>
    <p>This section lists the open ports, their owners, any linked
      processes, and the name of their driver or external process.</p>
  </section>

  <section>
    <marker id="ets_tables"></marker>
    <title>ETS Tables</title>
    <p>This section contains information about all the ETS tables in
      the system. The following fields are of interest for each table:</p>

    <taglist>
      <tag><em>=ets:&lt;owner&gt;</em></tag>
      <item>
        <p>Heading. States the table owner (a process identifier).</p>
      </item>
      <tag><em>Table</em></tag>
      <item>
        <p>The identifier for the table. If the table is a
          <c><![CDATA[named_table]]></c>, this is the name.</p>
      </item>
      <tag><em>Name</em></tag>
      <item>
        <p>The table name, regardless of if it is a
          <c><![CDATA[named_table]]></c> or not.</p>
      </item>
      <tag><em>Hash table, Buckets</em></tag>
      <item>
        <p>If the table is a hash table, that is, if it is not an
          <c><![CDATA[ordered_set]]></c>.</p>
      </item>
      <tag><em>Hash table, Chain Length</em></tag>
      <item>
        <p>If the table is a hash table. Contains statistics about the
          table, such as the maximum, minimum, and average chain length.
          Having a maximum much larger than the average, and a standard
          deviation much larger than the expected standard deviation is
          a sign that the hashing of the terms
          behaves badly for some reason.</p>
      </item>
      <tag><em>Ordered set (AVL tree), Elements</em></tag>
      <item>
        <p>If the table is an <c><![CDATA[ordered_set]]></c>. (The
          number of elements is the same as the number of objects in the
          table.)</p>
      </item>
      <tag><em>Fixed</em></tag>
      <item>
        <p>If the table is fixed using
          <seealso marker="stdlib:ets#safe_fixtable/2">
          <c>ets:safe_fixtable/2</c></seealso> or some internal mechanism.</p>
      </item>
      <tag><em>Objects</em></tag>
      <item>
        <p>The number of objects in the table.</p>
      </item>
      <tag><em>Words</em></tag>
      <item>
        <p>The number of words (usually 4 bytes/word) allocated to data
          in the table.</p>
      </item>
      <tag><em>Type</em></tag>
      <item>
        <p>The table type, that is, <c>set</c>, <c>bag</c>,
          <c>dublicate_bag</c>, or <c>ordered_set</c>.</p>
      </item>
      <tag><em>Compressed</em></tag>
      <item>
        <p>If the table was compressed.</p>
      </item>
      <tag><em>Protection</em></tag>
      <item>
        <p>The protection of the table.</p>
      </item>
      <tag><em>Write Concurrency</em></tag>
      <item>
        <p>If <c>write_concurrency</c> was enabled for the table.</p>
      </item>
      <tag><em>Read Concurrency</em></tag>
      <item>
        <p>If <c>read_concurrency</c> was enabled for the table.</p>
      </item>
    </taglist>
  </section>

  <section>
    <marker id="timers"></marker>
    <title>Timers</title>
    <p>This section contains information about all the timers started
      with the BIFs <c><![CDATA[erlang:start_timer/3]]></c> and
      <c><![CDATA[erlang:send_after/3]]></c>. The following fields exist
      for each timer:</p>

    <taglist>
      <tag><em>=timer:&lt;owner&gt;</em></tag>
      <item>
        <p>Heading. States the timer owner (a process identifier),
          that is, the process to receive the message when the timer
          expires.</p>
      </item>
      <tag><em>Message</em></tag>
      <item>
        <p>The message to be sent.</p>
      </item>
      <tag><em>Time left</em></tag>
      <item>
        <p>Number of milliseconds left until the message would have been
          sent.</p>
      </item>
    </taglist>
  </section>

  <section>
    <marker id="distribution_info"></marker>
    <title>Distribution Information</title>
    <p>If the Erlang node was alive, that is, set up for communicating
      with other nodes, this section lists the connections that were
      active. The following fields can exist:</p>

    <taglist>
      <tag><em>=node:&lt;node_name&gt;</em></tag>
      <item>
        <p>The node name.</p>
      </item>
      <tag><em>no_distribution</em></tag>
      <item>
        <p>If the node was not distributed.</p>
      </item>
      <tag><em>=visible_node:&lt;channel&gt;</em></tag>
      <item>
        <p>Heading for a visible node, that is, an alive node with a
          connection to the node that crashed. States the channel number
          for the node.</p>
      </item>
      <tag><em>=hidden_node:&lt;channel&gt;</em></tag>
      <item>
        <p>Heading for a hidden node. A hidden node is the same as a
          visible node, except that it is started with the <c>"-hidden"</c>
          flag. States the channel number for the node.</p>
      </item>
      <tag><em>=not_connected:&lt;channel&gt;</em></tag>
      <item>
        <p>Heading for a node that was connected to the crashed
          node earlier. References (that is, process or port identifiers)
          to the not connected node existed at the time of the crash.
          States the channel number for the node.</p>
      </item>
      <tag><em>Name</em></tag>
      <item>
        <p>The name of the remote node.</p>
      </item>
      <tag><em>Controller</em></tag>
      <item>
        <p>The port controlling communication with the remote node.</p>
      </item>
      <tag><em>Creation</em></tag>
      <item>
        <p>An integer (1-3) that together with the node name identifies
          a specific instance of the node.</p>
      </item>
      <tag><em>Remote monitoring: &lt;local_proc&gt;  &lt;remote_proc&gt;</em>
      </tag>
      <item>
        <p>The local process was monitoring the remote process at the
          time of the crash.</p>
      </item>
      <tag><em>Remotely monitored by: &lt;local_proc&gt;
        &lt;remote_proc&gt;</em></tag>
      <item>
        <p>The remote process was monitoring the local process at the
          time of the crash.</p>
      </item>
      <tag><em>Remote link: &lt;local_proc&gt; &lt;remote_proc&gt;</em></tag>
      <item>
        <p>A link existed between the local process and the remote
          process at the time of the crash.</p>
      </item>
    </taglist>
  </section>

  <section>
    <marker id="loaded_modules"></marker>
    <title>Loaded Module Information</title>
    <p>This section contains information about all loaded modules.</p>

    <p>First, the memory use by the loaded code is summarized:</p>

    <taglist>
      <tag><em>Current code</em></tag>
      <item>
        <p>Code that is the current latest version of the modules.</p>
      </item>
      <tag><em>Old code</em></tag>
      <item>
        <p>Code where there exists a newer version in the
          system, but the old version is not yet purged.</p>
      </item>
    </taglist>

    <p>The memory use is in bytes.</p>

    <p>Then, all loaded modules are listed. The following fields exist:</p>

    <taglist>
      <tag><em>=mod:&lt;module_name&gt;</em></tag>
      <item>
        <p>Heading. States the module name.</p>
      </item>
      <tag><em>Current size</em></tag>
      <item>
        <p>Memory use for the loaded code, in bytes.</p>
      </item>
      <tag><em>Old size</em></tag>
      <item>
        <p>Memory use for the old code, if any.</p>
      </item>
      <tag><em>Current attributes</em></tag>
      <item>
        <p>Module attributes for the current code. This field is decoded
          when looked at by the Crashdump Viewer tool.</p>
      </item>
      <tag><em>Old attributes</em></tag>
      <item>
        <p>Module attributes for the old code, if any. This field is
          decoded when looked at by the Crashdump Viewer tool.</p>
      </item>
      <tag><em>Current compilation info</em></tag>
      <item>
        <p>Compilation information (options) for the current code. This
          field is decoded when looked at by the Crashdump Viewer tool.</p>
      </item>
      <tag><em>Old compilation info</em></tag>
      <item>
        <p>Compilation information (options) for the old code, if
          any. This field is decoded when looked at by the Crashdump
          Viewer tool.</p>
      </item>
    </taglist>
  </section>

  <section>
    <marker id="funs"></marker>
    <title>Fun Information</title>
    <p>This section lists all funs. The following fields exist for each fun:</p>

    <taglist>
      <tag><em>=fun</em></tag>
      <item>
        <p>Heading.</p>
      </item>
      <tag><em>Module</em></tag>
      <item>
        <p>The name of the module where the fun was defined.</p>
      </item>
      <tag><em>Uniq, Index</em></tag>
      <item>
        <p>Identifiers.</p>
      </item>
      <tag><em>Address</em></tag>
      <item>
        <p>The address of the fun's code.</p>
      </item>
      <tag><em>Native_address</em></tag>
      <item>
        <p>The address of the fun's code when HiPE is enabled.</p>
      </item>
      <tag><em>Refc</em></tag>
      <item>
        <p>The number of references to the fun.</p>
      </item>
    </taglist>
  </section>

  <section>
    <marker id="proc_data"></marker>
    <title>Process Data</title>
    <p>For each process there is at least one <em>=proc_stack</em>
      and one <em>=proc_heap</em> tag, followed by the raw memory
      information for the stack and heap of the process.</p>

    <p>For each process there is also a <em>=proc_messages</em>
      tag if the process message queue is non-empty, and a
      <em>=proc_dictionary</em> tag if the process dictionary (the
      <c><![CDATA[put/2]]></c> and <c><![CDATA[get/1]]></c> thing) is
      non-empty.</p>

    <p>The raw memory information can be decoded by the Crashdump
      Viewer tool. You can then see the stack dump, the
      message queue (if any), and the dictionary (if any).</p>

    <p>The stack dump is a dump of the Erlang process stack. Most of
      the live data (that is, variables currently in use) are placed on
      the stack; thus this can be interesting. One has to
      "guess" what is what, but as the information is symbolic,
      thorough reading of this information can be useful. As an
      example, we can find the state variable of the Erlang primitive
      loader online <c><![CDATA[(5)]]></c> and <c><![CDATA[(6)]]></c>
      in the following example:</p>

    <code type="none"><![CDATA[
(1)  3cac44   Return addr 0x13BF58 (<terminate process normally>)
(2)  y(0)     ["/view/siri_r10_dev/clearcase/otp/erts/lib/kernel/ebin",
(3)            "/view/siri_r10_dev/clearcase/otp/erts/lib/stdlib/ebin"]
(4)  y(1)     <0.1.0>
(5)  y(2)     {state,[],none,#Fun<erl_prim_loader.6.7085890>,undefined,#Fun<erl_prim_loader.7.9000327>,
(6)            #Fun<erl_prim_loader.8.116480692>,#Port<0.2>,infinity,#Fun<erl_prim_loader.9.10708760>}
(7)  y(3)     infinity    ]]></code>

    <p>When interpreting the data for a process, it is helpful to know
      that anonymous function objects (funs) are given the following:</p>

    <list type="bulleted">
      <item>A name constructed from the name of the function in which they are
        created
      </item>
      <item>A number (starting with 0) indicating the number of that fun within
        that function
      </item>
    </list>
  </section>

  <section>
    <marker id="atoms"></marker>
    <title>Atoms</title>
    <p>This section presents all the atoms in the system. This is only
      of interest if one suspects that dynamic generation of atoms can
      be a problem, otherwise this section can be ignored.</p>

    <p>Notice that the last created atom is shown first.</p>
  </section>

  <section>
    <title>Disclaimer</title>
    <p>The format of the crash dump evolves between OTP releases.
      Some information described here may not apply to your
      version. A description like this will never be complete; it is meant as
      an explanation of the crash dump in general and as a help
      when trying to find application errors, not as a complete
      specification.</p>
  </section>
</chapter>