question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

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:closed
  • Created 3 years ago
  • Comments:52 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
ankitaj224commented, Sep 29, 2020

@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.

1reaction
luhongwucommented, Sep 28, 2020

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

image

image

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found