-
Notifications
You must be signed in to change notification settings - Fork 176
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
Fix OverlappingFileLockException #95
Conversation
Hi @jbettcher! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Hi Jon! It's been a while since I've run into your code at the ol' Bird Factory. I'm not the best person to review this but if you could sign the CLA, I'd be happy to import this and have someone internally take a look. |
Pascal! Good to run into you again - it has been a while :-) Thanks for popping over on this one to take a look. I just signed the CLA so I think that part is good to go. Not immediately on fire but it would be a nice thing to fix since I suspect folks will start to run into this runtime crasher as adoption picks up (especially if they use SoLoader to init multiple native libs on different threads). |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
@passy has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Hi @passy - any updates on this one? Looks like there are some internal checks that are failing. Let me know if there is anything I can do to help |
@jbettcher Sorry, took a while to find a reviewer and was then on PTO. Is this still relevant with #99? Should we merge both? |
no worries! I think we can discard this one in favor of #99. We're testing that internally this week and it should address the root of the issue (multithreaded race condition in |
Sounds good. I'll close this for now but please reopen in case it becomes relevant again. |
This is a potential fix for #93. I'm not 100% this is the right fix: the fundamental issue seems to be that multiple threads may be trying to lock the
soDirectory
at the same time. This change will catch theOverlappingFileLockException
and allow execution to continue, althoughtryLock
will return null in this case.In my testing this does resolve the crash and seems to allow SoLoader to continue loading all of our native libs, but I'd like someone familiar with the code to vet the change in case there are edge cases I'm unfamiliar with.