Skip to content

Conversation

@Jongy
Copy link
Contributor

@Jongy Jongy commented Dec 1, 2021

Description

We want the ability to be very strict on error detection. This is possibly too strict (segfaults in non-profiled processes are most likely not related to us...) but we'll start very strict and lower the bar as we go.
The "PID in message" check will help us identify if our regex on OOM/signals miss anything (or if there's any other type of bad message we should be looking at). I hope it won't catch too many false positives.

How Has This Been Tested?

  • Triggered an OOM with docker run -it -m 6m python and made sure Java profiling stops
  • Triggered a segfault with main(){*(int*)0=0;} and made sure Java profiling stops
  • Wrote a profiled PID to the kernel log (echo 374075 | sudo tee /dev/kmsg) and made sure Java profiling stops. It's funny that it works - the kernel does flag messages coming from usermode, we should check this flag and ignore such messages as we really care only about kernel messages.

@Jongy Jongy added enhancement New feature or request runtime/java labels Dec 1, 2021
@Jongy Jongy requested a review from d3dave December 1, 2021 10:45
@Jongy Jongy mentioned this pull request Dec 1, 2021
self._disable_profiling() # paranoia
continue

if self._java_safemode:
Copy link
Contributor

Choose a reason for hiding this comment

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

if java safemode and profiling enabled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is on purpose actually, The system-wide things - I want to continue collecting them also after profiling was stopped (so I can understand whether it was an anomaly or not)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I won't have profiled PIDs anymore, that's true

@Jongy Jongy requested a review from d3dave December 1, 2021 16:27
@Jongy Jongy merged commit 719adaf into master Dec 1, 2021
@Jongy Jongy deleted the stricter-java-safemode branch December 1, 2021 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request runtime/java

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants