Skip to content

Cannot parse gc log where first line does not have a timestamp #196

@dsgrieve

Description

@dsgrieve

Describe the bug
Log file begins with

 [Times: user=0.45 sys=0.00, real=0.05 secs] 
2021-12-17T19:04:11.194+0000: 302396.015: [GC pause (G1 Evacuation Pause) (young)
Desired survivor size 742391808 bytes, new threshold 15 (max 15)
- age   1:   27289544 bytes,   27289544 total

Parsing silently fails with

Dec 17, 2021 3:05:57 PM com.microsoft.gctoolkit.event.g1gc.G1Trap trap
INFO: Internal EventSource Error @ @0.000
Dec 17, 2021 3:05:57 PM com.microsoft.gctoolkit.parser.PreUnifiedG1GCParser record
WARNING: Parsing Error: Attempt to record Trap @0.0

Removing the first line of the log resolves the issue, but gctoolkit should be able to handle this.

I have asked the originator of this issue to attach the log file here.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions