Skip to content

OverlappingFileLockException crashes with up to date libraries versions #1519

@JeremyR34

Description

@JeremyR34
  • 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)

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions