-
Notifications
You must be signed in to change notification settings - Fork 177
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
OverlappingFileLockException in 0.10.3 #93
Comments
Just FYI reverting to 0.10.1 has fixed the issue for now. Also, attempting to change the readLock() to a |
I've been talking to @jbettcher on the side about the issue, but just to fill everyone else in, we now think the issue is actually in
This isn't an issue on 0.10.1 (the version we are currently on) because in Checking for nullability to early exit prior to grabbing the write lock is a perfectly reasonable optimization here, I think we just need to double check that I'll have a separate PR up shortly to address the issue, I'm just trying to test a bit more before putting it up (getting Buck set up on my M1 was.. an interesting adventure to say the least 😆). /cc @passy since you mentioned you were looking to route @jbettcher's original PR. |
I'm using SoLoader in an app that makes multi-threaded
SoLoader.init()
andSoLoader.loadLibrary()
calls for several different native SO libraries during application startup. The application recently switched from0.10.1
to0.10.3
, and it looks like the crash below happens somewhat randomly (likely a race condition) after upgrading.If I had to guess, it looks like anything that calls
SoSource#prepare
needs to hold asSoSourcesLock.writeLock()
. However,loadLibraryBySoNameImpl
seems to only hold a read lock while callingbackupSoSource.prepare
. I'm not an expert on this code, but I think multiple threads can acquire a read lock at the same time.The text was updated successfully, but these errors were encountered: