# JVM corrupted with java agent 1.19.0 - CentOS

**URL:** <https://discuss.elastic.co/t/jvm-corrupted-with-java-agent-1-19-0-centos/257599>\
**Category:** APM\
**Tags:** java\
**Created:** [December 4, 2020, 12:34am UTC](https://discuss.elastic.co/t/jvm-corrupted-with-java-agent-1-19-0-centos/257599 "2020-12-04T00:34:50Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [December 6, 2020, 12:13pm UTC](https://discuss.elastic.co/t/jvm-corrupted-with-java-agent-1-19-0-centos/257599/5 "2020-12-06T12:13:38Z")

</div>

> [@bbking](#):
>
> I didn't see `async_profiler_safe_mode` in the [property reference doc](https://www.elastic.co/guide/en/apm/agent/java/master/config-reference-properties-file.html). It would be nice to add it in the doc

This config is not documented on purpose, but we may reconsider that. It is one we typically use only for analysis.

> [@bbking](#):
>
> Could you explain a bit more about what `async_profiler_safe_mode=16` does? What's the difference between mode 16 and 31?

The Async Profiler's area that deals with recovering stack trace frames is known to be sensitive in some systems. It is used as a bit mask with values between 0 and 31, where 0 enables all recovery attempts and 31 disables all five (corresponding 1, 2, 4, 8 and 16). See [comment by the async profiler author](https://github.com/jvm-profiling-tools/async-profiler/issues/377#issuecomment-739022933) on the corresponding GitHub, explaining why `16`.

> [@bbking](#):
>
> Does disabling it have the same effect of turning off stacktrace collection?

No. Using `31` means disabling the **recovery** of stack frames that failed to be obtained in the original stack trace capture. Using `16` means disabling it when occurs during GC.  
This has nothing to do with the stack trace capturing that the agent does for spans, it is only relevant for the Sampling-profiler mechanism.

---

_[View the full topic](https://discuss.elastic.co/t/jvm-corrupted-with-java-agent-1-19-0-centos/257599)._
