Skip to content

Do not stop profiling on fatal exceptions#1421

Merged
mar-kolya merged 2 commits into
masterfrom
mar-kolya/do-not-stop-profiling-on-fatal-exceptions
May 4, 2020
Merged

Do not stop profiling on fatal exceptions#1421
mar-kolya merged 2 commits into
masterfrom
mar-kolya/do-not-stop-profiling-on-fatal-exceptions

Conversation

@mar-kolya
Copy link
Copy Markdown
Contributor

@mar-kolya mar-kolya commented May 1, 2020

Make sure that profiling continues to run even after fatal exceptions in its loop - e.g. OutOfMemoryError

@mar-kolya mar-kolya requested a review from a team as a code owner May 1, 2020 17:13
Copy link
Copy Markdown
Member

@jpbempel jpbempel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

throw t;
/*
Try to continue even after fatal exception. It seems to be useful to attempt to store profile when this happens.
For example JVM maybe out of heap and throwing OutOfMemoryError - we probably still would want to continue and
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For OOME usually it is not really good to try and and log exception - the memory is stretched already and the logging statement can throw its own OOME and propagate the exception we are trying to mask to the caller.

I would suggest handling OOME differently and just silently ignore it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, I'll just wrap the whole logging statement in try/catch

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to try the log if possible!

@mar-kolya mar-kolya merged commit b3782fa into master May 4, 2020
@mar-kolya mar-kolya deleted the mar-kolya/do-not-stop-profiling-on-fatal-exceptions branch May 4, 2020 12:03
@github-actions github-actions Bot added this to the 0.51.0 milestone May 4, 2020
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

Successfully merging this pull request may close these issues.

4 participants