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

If you kill the app while a heap analysis is running, LC breaks #1312

Closed
SUPERCILEX opened this issue Apr 29, 2019 · 2 comments · Fixed by #1315
Closed

If you kill the app while a heap analysis is running, LC breaks #1312

SUPERCILEX opened this issue Apr 29, 2019 · 2 comments · Fixed by #1315
Milestone

Comments

@SUPERCILEX
Copy link

For example, if I install a new version of the app while an analysis is running, future heap dumps won't occur because it thinks there's still a pending analysis in progress:

Checking retained references because had pending heap dump
Leak Analysis in progress, will retry in 20000 ms

These files should be cleaned up on app start to prevent this scenario.

@SUPERCILEX
Copy link
Author

Oh, and this is the alpha BTW.

@pyricau pyricau added this to the 2.0 Next Release milestone Apr 29, 2019
@pyricau
Copy link
Member

pyricau commented Apr 29, 2019

Thanks! I believe I recently fixed this on master, I need to double check.

pyricau added a commit that referenced this issue Apr 29, 2019
Previously, we looked for a `*_pending.hprof` file younger than 10 minutes on the filesystem to detect if an analysis was in progress, and skip heap dumps to avoid constantly doing heap dumps.

This meant that if the process died (e.g. crash) during an analysis, no heap dumps would happen in the next 10 minutes.

Heap analysis is now fast, it finds many leaks at once, it's serial and in a single process. This means we can remove this behavior and just dump the heap whenever thresholds are met and then enqueue work to the serial service.

If the process is killed during an analysis, it won't resume but it's easy enough to import the hprof again, from the sd card.

Fixes #1312
pyricau added a commit that referenced this issue Apr 29, 2019
Previously, we looked for a `*_pending.hprof` file younger than 10 minutes on the filesystem to detect if an analysis was in progress, and skip heap dumps to avoid constantly doing heap dumps.

This meant that if the process died (e.g. crash) during an analysis, no heap dumps would happen in the next 10 minutes.

Heap analysis is now fast, it finds many leaks at once, it's serial and in a single process. This means we can remove this behavior and just dump the heap whenever thresholds are met and then enqueue work to the serial service.

If the process is killed during an analysis, it won't resume but it's easy enough to import the hprof again, from the sd card.

Fixes #1312
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 a pull request may close this issue.

2 participants