What are "Events" in hs_err_pid.log?
Asked Answered
R

1

2

I've found these in my hs_err_pid.log.

Events (10 events):
Event: 2603309.010 Thread 0x00007ff2c800c000 DEOPT UNPACKING pc=0x00007ff34aaddf69 sp=0x00007ff3409e88a8 mode 2
Event: 2603310.108 Thread 0x00007ff362229000 DEOPT PACKING pc=0x00007ff34b25ce6c sp=0x00007ff340ceb660
Event: 2603310.122 Thread 0x00007ff2c8009800 Uncommon trap: trap_request=0xffffff65 fr.pc=0x00007ff34b890e40
Event: 2603310.124 Thread 0x00007ff2c8009800 DEOPT PACKING pc=0x00007ff34b890e40 sp=0x00007ff3408e7790
Event: 2603310.124 Thread 0x00007ff2c8009800 DEOPT UNPACKING pc=0x00007ff34aaddf69 sp=0x00007ff3408e7680 mode 2
Event: 2603310.125 Thread 0x00007ff2c8009800 Uncommon trap: trap_request=0xffffff65 fr.pc=0x00007ff34b850fe4
Event: 2603310.125 Thread 0x00007ff2c8009800 DEOPT PACKING pc=0x00007ff34b850fe4 sp=0x00007ff3408e7560
Event: 2603310.125 Thread 0x00007ff2c8009800 DEOPT UNPACKING pc=0x00007ff34aaddf69 sp=0x00007ff3408e72d8 mode 2
Event: 2603310.126 Thread 0x00007ff362229000 DEOPT UNPACKING pc=0x00007ff34aaddf69 sp=0x00007ff340ceb628 mode 2
Event: 2603310.935 Thread 0x00007ff2d8001000 Thread added: 0x00007ff2d8001000

And I have no idea about these infomations and I'am curious even though it may not help me analyze the crash.

  1. What does the number like "2603309.010" mean ?
  2. What does the descriptions mean ? including DEOPT, UNPACKING/PACKING, Uncommon trap, trap_request, pc and sp ?
Rocketeer answered 8/4, 2018 at 10:3 Comment(0)
M
4

This is a history of last 10 VM runtime events (other than compilation and GC).

2603309.010 is a timestamp - number of seconds since VM start.

Uncommon trap is a situation when a speculative precondition in the compiled code fails. It usually results in deoptimization - switching from compiled code back to interpreter. Deoptimization first collects the information about virtual frames (packing) and then unrolls these frames onto the stack in the interpreter format (unpacking). pc and sp are program counter and stack pointer.

From HotSpot Glossary of Terms:

uncommon trap

When code generated by C2 reverts back to the interpreter for further execution. C2 typically compiles for the common case, allowing it to focus on optimization of frequently executed paths. For example, C2 inserts an uncommon trap in generated code when a class that is uninitialized at compile time requires run time initialization.

deoptimization

The process of converting an compiled (or more optimized) stack frame into an interpreted (or less optimized) stack frame. Also describes the discarding of an nmethod whose dependencies (or other assumptions) have been broken. Deoptimized nmethods are typically recompiled to adapt to changing application behavior. Example: A compiler initially assumes a reference value is never null, and tests for it using a trapping memory access. Later on, the application uses null values, and the method is deoptimized and recompiled to use an explicit test-and-branch idiom to detect such nulls.

Molloy answered 8/4, 2018 at 10:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.