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
Fails to use JVM ballooning #1038
Comments
@glommer ? |
This seems like the same issue, yes. Unfortunately I don't have a lot of time to look into it these days |
I think I have found the reason.In the vm_fault function there are locked by vma_list_mutex.for_read() Line 1326 in 4e425d4
Line 1335 in 4e425d4
and in the scope of vma_list_mutex.for_read() the function jvm_balloon_fault will be called Line 352 in 4e425d4
this time vma will be delete ,and the destructor will call map_anon(),which will access the vma_list_mutex.for_write().Apparently it cannot access this because the same thread hold read lock. Line 1570 in 4e425d4
So I simply solve this problem by replacing the read lock with write lock and now I can use this function.I think there will be a nicer method |
@nozohono Honestly I am not too familiar with this code (yet:-)). Which version of JVM (8, ..., 12) have you tested it with (I am assuming it worked for you)? Have you seen these two commits - e69fa2b and 4bd8720. I wonder if they may help you validate your solution and makes sure it does not break other thinks. |
I also think this issue is a duplicate of #796. |
Linking #796 (comment) and #796 (comment) as useful information. |
I just want to use Jvm Balloon to run applications and osv will hang when partial copy completes.I find that osv hangs because it cannot access vma_list_rwlock.write() .I guess that this may be caused by mprotect——because mprotect is the last function that accsess vma_list_rwlock.write().
The text was updated successfully, but these errors were encountered: