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
Dead lock happens when calling Runtime.getRuntime().exit(0); #1328
Labels
Comments
beeender
added a commit
that referenced
this issue
Jul 29, 2015
1. Create a service in a standalone process. 2. Make helpers to play with the service for testing. 3. Watch dog support for the testing. 4. Test case to reproduce #1328, Process is deadly locked when exit(0) called.
beeender
added a commit
that referenced
this issue
Jul 29, 2015
To fix #1328 When System.exit(0) called, shutdown hook will be run. There is no guarantee in this case GC will collect everything. So a dead lock will happen here. Remove this part of code since the core side can ensure the integrity of db file when other resource is not released.
beeender
added a commit
that referenced
this issue
Aug 4, 2015
1. Create a service in a standalone process. 2. Make helpers to play with the service for testing. 3. Watch dog support for the testing. 4. Test case to reproduce #1328, Process is deadly locked when exit(0) called.
beeender
added a commit
that referenced
this issue
Aug 4, 2015
To fix #1328 When System.exit(0) called, shutdown hook will be run. There is no guarantee in this case GC will collect everything. So a dead lock will happen here. Remove this part of code since the core side can ensure the integrity of db file when other resource is not released.
beeender
added a commit
that referenced
this issue
Aug 4, 2015
1. Create a service in a standalone process. 2. Make helpers to play with the service for testing. 3. Watch dog support for the testing. 4. Test case to reproduce #1328, Process is deadly locked when exit(0) called.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue first reported on SO http://stackoverflow.com/questions/31583359/realm-and-runtime-getruntime-exit0 .
When calling
Runtime.getRuntime().exit(0);
with Realm opened before, finalizer won't stop running. Lock is waiting forever, process cannot exist.Below code to reproduce this error:
And in the logcat, infinity logs comes as below:
The text was updated successfully, but these errors were encountered: