Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generational parser does not seem to handle GC Cause included in young event. #352

Open
Bluetopia opened this issue May 1, 2024 · 1 comment
Assignees

Comments

@Bluetopia
Copy link

Describe the bug
When processing a line like:
5.374: [GC (Allocation Failure) [PSYoungGen: 262144K->28340K(305664K)] 262144K->28364K(1005056K), 0.0146665 secs] [Times: user=0.08 sys=0.00, real=0.01 secs]
GenerationalHeapParser.psYoungGen(GCLogTrace, String) is called and the offset (5) appears to not take into account the cause, resulting in:

May 01, 2024 10:03:19 AM com.microsoft.gctoolkit.parser.GCLogTrace getOccupancyBeforeAfterWithMemoryPoolSizeSummary
WARNING: Unable to calculate generational memory pool summary.
vert.x-eventloop-thread-0, not implemented: 5.374: [GC (Allocation Failure) [PSYoungGen: 262144K->28340K(305664K)] 262144K->28364K(1005056K), 0.0146665 secs]2024-05-01 10:03:19,806 [vert.x-eventloop-thread-0] INFO STDOUT: vert.x-eventloop-thread-0, not implemented: 5.374: [GC (Allocation Failure) [PSYoungGen: 262144K->28340K(305664K)] 262144K->28364K(1005056K), 0.0146665 secs]

with the following groups:

1: 5.374
2: null
3: null
4: 5.374
5: null
6: (Allocation Failure)
7: PSYoungGen
8: 262144
9: K
10: 28340
11: K
12: 305664
13: K
14: 262144
15: K
16: 28364
17: K
18: 1005056
19: K
20: 0.0146665

getOccupancyBeforeAfterWithMemoryPoolSizeSummary tries to convert null (5), "PSYoungGen" (7), and "K" to KByte values, which generates a NumberFormatException, and causing the notYetImplemented() logging.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
GCToolkit is able to properly parse the GC event.

Desktop (please complete the following information):

  • OS: Windows 11
  • Java 11 (Amazon Corretto)
  • GCToolkit tip (April 30, 2024)

Additional context
This is an older log file from Java 8/CMS that likely won't come up as frequently anymore, so it may be a lower priority. It's not clear if this should be a feature request instead due to the fact this triggers "Not yet implemented" logging.

@Bluetopia
Copy link
Author

Similar issues with another file, slightly different in format.

218982.552: [GC [PSYoungGen: 463514K->98518K(531328K)] 2167820K->1805185K(2239360K), 0.0933556 secs]

parallel_simple_nostamps.zip

Sample file attached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants