OverlappingFileLockException crashes with up to date libraries versions
See original GitHub issue- Android Studio version: 3.6.3
- Firebase Components & versions: com.google.firebase:firebase-core 17.4.0 com.google.firebase:firebase-analytics 17.4.0 com.google.firebase:firebase-messaging 20.1.6 com.crashlytics.sdk.android:crashlytics 2.10.1 com.google.firebase:firebase-dynamic-links 19.1.0 com.google.firebase:firebase-database 19.3.0 com.google.firebase:firebase-config 19.1.4
Describe the problem
After releasing a new version ni production with up to date Firebase libraries we have many new crashes (Google Play developer console & Firebase Crashlytics).
Steps to reproduce:
Up-to-date libraries versions. Notes
- it seems to happen only on Android 7 & 8 devices.
- it may be related to this: https://github.com/firebase/firebase-android-sdk/pull/1234
Relevant Code:
Fatal Exception: java.nio.channels.OverlappingFileLockException
at sun.nio.ch.SharedFileLockTable.checkList(SharedFileLockTable.java:255)
at sun.nio.ch.SharedFileLockTable.add(SharedFileLockTable.java:152)
at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1080)
at java.nio.channels.FileChannel.lock(FileChannel.java:1053)
at com.google.firebase.installations.CrossProcessLock.acquire(CrossProcessLock.java:52)
at com.google.firebase.installations.FirebaseInstallations.getPrefsWithGeneratedIdMultiProcessSafe(FirebaseInstallations.java:376)
at com.google.firebase.installations.FirebaseInstallations.doNetworkCall(FirebaseInstallations.java:327)
at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationInternal$0(FirebaseInstallations.java:323)
at com.google.firebase.installations.FirebaseInstallations$$Lambda$5.run(FirebaseInstallations.java:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Another kind of new crashes we have that seems also related (FirebaseInstallations):
Fatal Exception: java.lang.Error: java.io.IOException: Bad file descriptor
at sun.nio.ch.FileKey.create(FileKey.java:46)
at sun.nio.ch.SharedFileLockTable.<init>(SharedFileLockTable.java:120)
at sun.nio.ch.FileLockTable.newSharedFileLockTable(FileLockTable.java:47)
at sun.nio.ch.FileChannelImpl.fileLockTable(FileChannelImpl.java:993)
at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1015)
at java.nio.channels.FileChannel.lock(FileChannel.java:875)
at com.google.firebase.installations.CrossProcessLock.acquire(CrossProcessLock.java:52)
at com.google.firebase.installations.FirebaseInstallations.getPrefsWithGeneratedIdMultiProcessSafe(FirebaseInstallations.java:376)
at com.google.firebase.installations.FirebaseInstallations.doNetworkCall(FirebaseInstallations.java:327)
at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationInternal$0(FirebaseInstallations.java:323)
at com.google.firebase.installations.FirebaseInstallations$$Lambda$5.run(FirebaseInstallations.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)
Caused by java.io.IOException: Bad file descriptor
at sun.nio.ch.FileKey.init(FileKey.java)
at sun.nio.ch.FileKey.create(FileKey.java:44)
at sun.nio.ch.SharedFileLockTable.<init>(SharedFileLockTable.java:120)
at sun.nio.ch.FileLockTable.newSharedFileLockTable(FileLockTable.java:47)
at sun.nio.ch.FileChannelImpl.fileLockTable(FileChannelImpl.java:993)
at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1015)
at java.nio.channels.FileChannel.lock(FileChannel.java:875)
at com.google.firebase.installations.CrossProcessLock.acquire(CrossProcessLock.java:52)
at com.google.firebase.installations.FirebaseInstallations.getPrefsWithGeneratedIdMultiProcessSafe(FirebaseInstallations.java:376)
at com.google.firebase.installations.FirebaseInstallations.doNetworkCall(FirebaseInstallations.java:327)
at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationInternal$0(FirebaseInstallations.java:323)
at com.google.firebase.installations.FirebaseInstallations$$Lambda$5.run(FirebaseInstallations.java)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:760)
Issue Analytics
- State:
- Created 3 years ago
- Comments:52 (23 by maintainers)
Top Results From Across the Web
OverlappingFileLockException Error during Workflow Execution
Solution. OverlappingFileLockException error occurs, when the lookup file is accessed multiple times by the Lookup Builder. The situation can occur when one ...
Read more >Crash and/or data corruption upon attempting to save a world ...
The bug. Attempting to save a world with a world border center over 30 million blocks causes the player to be unable to...
Read more >CVMServer crashes - Apple Community
I purchased my Mac mini M1 last December. After having experienced both hard and soft crashes (hard being defined as an automatic reboot,...
Read more >Firebase Android SDK Release Notes - Google
To learn which library versions are mapped to a specific BoM version, ... Fixed the UP-TO-DATE check for the mapping file ID injection...
Read more >The game crashed whilst mouseclicked event handler Error ...
Whenever I start up the game and try to choose the 'Singleplayer' option, ... Backend library: LWJGL version 3.2.2 build 10
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JeremyR34 Really sorry for the inconvenience. I have raised the priority of this issue with my team and should have some update by early next week. I understand that catching the OverlappingFileLockException is a quick fix. However, we need to evaluate what the impact of catching this exception will be on the Firebase Installation service.
Thanks for sharing the timelines with us. I will keep that in mind when addressing this issue.
I saw a fix in firebase-installations:16.3.1 that try to catch the error but actually failed? the OverlappingFileLockException not match IOException or Error. https://github.com/firebase/firebase-android-sdk/pull/1521/commits/c3d4b09c11fdda469d34796ad701a5e47ad1426c