Skip to content
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

Resiliency in restoration of partially-corrupted backups #798

Open
t-m-w opened this issue Nov 14, 2024 · 1 comment
Open

Resiliency in restoration of partially-corrupted backups #798

t-m-w opened this issue Nov 14, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@t-m-w
Copy link
Collaborator

t-m-w commented Nov 14, 2024

When restoring an application's user data from a partially-corrupted backup, when a file with a wrong hash is encountered, the process appears to hang indefinitely (spinner next to the failing app). Perhaps it can be handled so the process can proceed.

logcat snippet
11-14 10:44:07.783 10174  2994 13779 D o.c.s.c.b.s.SafBackend: [binder:2994_C       ] load(Blob(repoId=dff3948cc16136325ec200a8611c15d06134881f6b9d28dbd2e67157975f0f41, name=7946e6940d23de52692533ca9a37e2d7514f32a0d3a43a9f1a373af9f75e7596))
11-14 10:44:07.807 10189  2712  2888 I MediaProvider: Open with lower FS for /storage/emulated/0/.SeedVaultAndroidBackup/dff3948cc16136325ec200a8611c15d06134881f6b9d28dbd2e67157975f0f41/79/7946e6940d23de52692533ca9a37e2d7514f32a0d3a43a9f1a373af9f75e7596. Uid: 10107
11-14 10:44:07.812 10174  2994 13779 E JavaBinder: *** Uncaught remote exception! Exceptions are not yet supported across processes. Client PID 0 UID 1000.
11-14 10:44:07.812 10174  2994 13779 E JavaBinder: com.stevesoltys.seedvault.repo.HashMismatchException: File had wrong SHA-256 hash: 7946e6940d23de52692533ca9a37e2d7514f32a0d3a43a9f1a373af9f75e7596
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.stevesoltys.seedvault.repo.Loader.loadFromStream(Loader.kt:86)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.stevesoltys.seedvault.repo.Loader.loadFile(Loader.kt:47)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.stevesoltys.seedvault.repo.Loader.loadFile$default(Loader.kt:42)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.stevesoltys.seedvault.repo.Loader$loadFiles$enumeration$1$nextElement$1.invokeSuspend(Loader.kt:68)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.stevesoltys.seedvault.repo.Loader$loadFiles$enumeration$1.nextElement(Loader.kt:68)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.stevesoltys.seedvault.repo.Loader$loadFiles$enumeration$1.nextElement(Loader.kt:60)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at java.io.SequenceInputStream.peekNextStream(SequenceInputStream.java:102)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at java.io.SequenceInputStream.nextStream(SequenceInputStream.java:97)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at java.io.SequenceInputStream.read(SequenceInputStream.java:203)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at java.io.InputStream.read(InputStream.java:218)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.stevesoltys.seedvault.transport.restore.FullRestore.copyInputStream(FullRestore.kt:194)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.stevesoltys.seedvault.transport.restore.FullRestore.getNextFullRestoreDataChunk(FullRestore.kt:163)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.stevesoltys.seedvault.transport.restore.RestoreCoordinator.getNextFullRestoreDataChunk(RestoreCoordinator.kt:435)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.stevesoltys.seedvault.transport.ConfigurableBackupTransport$getNextFullRestoreDataChunk$1.invokeSuspend(ConfigurableBackupTransport.kt:219)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.stevesoltys.seedvault.transport.ConfigurableBackupTransport.getNextFullRestoreDataChunk(ConfigurableBackupTransport.kt:218)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at android.app.backup.BackupTransport$TransportImpl.getNextFullRestoreDataChunk(BackupTransport.java:954)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at com.android.internal.backup.IBackupTransport$Stub.onTransact(IBackupTransport.java:820)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at android.os.Binder.execTransactInternal(Binder.java:1505)
11-14 10:44:07.812 10174  2994 13779 E JavaBinder:      at android.os.Binder.execTransact(Binder.java:1444)
11-14 10:44:07.812 10174  2994 13779 I IPCThreadState: oneway function results for code 25 on binder at 0xb400007ac26fa0e0 will be dropped but finished with status UNKNOWN_TRANSACTION
@grote
Copy link
Collaborator

grote commented Nov 14, 2024

HashMismatchException gets introduced in #785 so this issue isn't affect current android15 branch. Will add a fix to the PR.

@grote grote self-assigned this Nov 14, 2024
@grote grote added this to the Roadmap milestone Nov 14, 2024
@grote grote added bug and removed enhancement labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants