seedvault icon indicating copy to clipboard operation
seedvault copied to clipboard

LineageOS 19 / Seedvault 12-3.0 / WebDAV Davx5 failing with EPIPE

Open afflux opened this issue 2 years ago • 10 comments

Nextcloud backup didn't work, so I gave Davx5 a try. This is reproducibly failing to backup the AirBnb app.

Logcat when the failure occurs:
01-15 11:21:43.630 10874 10889 I FullBackup_native: measured [/data/data/com.airbnb.android/files/nezha/eden0/landingPage-searchSuggestion.js] at 15360
01-15 11:21:43.632 10874 10889 I file_backup_helper:    Name: apps/com.airbnb.android/f/nezha/eden0/landingPage-index.js
01-15 11:21:44.312  2602  2632 E FullBackup: Error handling backup data for com.airbnb.android:
01-15 11:21:44.312  2602  2632 E FullBackup: java.io.IOException: write failed: EPIPE (Broken pipe)
01-15 11:21:44.312  2602  2632 E FullBackup:    at libcore.io.IoBridge.write(IoBridge.java:654)
01-15 11:21:44.312  2602  2632 E FullBackup:    at java.io.FileOutputStream.write(FileOutputStream.java:401)
01-15 11:21:44.312  2602  2632 E FullBackup:    at com.google.crypto.tink.subtle.StreamingAeadEncryptingStream.write(StreamingAeadEncryptingStream.java:85)
01-15 11:21:44.312  2602  2632 E FullBackup:    at com.google.crypto.tink.subtle.StreamingAeadEncryptingStream.write(StreamingAeadEncryptingStream.java:59)
01-15 11:21:44.312  2602  2632 E FullBackup:    at com.stevesoltys.seedvault.transport.backup.FullBackup.sendBackupData(FullBackup.kt:166)
01-15 11:21:44.312  2602  2632 E FullBackup:    at com.stevesoltys.seedvault.transport.backup.BackupCoordinator.sendBackupData(BackupCoordinator.kt:291)
01-15 11:21:44.312  2602  2632 E FullBackup:    at com.stevesoltys.seedvault.transport.ConfigurableBackupTransport$sendBackupData$1.invokeSuspend(ConfigurableBackupTransport.kt:190)
01-15 11:21:44.312  2602  2632 E FullBackup:    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
01-15 11:21:44.312  2602  2632 E FullBackup:    at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
01-15 11:21:44.312  2602  2632 E FullBackup:    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:270)
01-15 11:21:44.312  2602  2632 E FullBackup:    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
01-15 11:21:44.312  2602  2632 E FullBackup:    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
01-15 11:21:44.312  2602  2632 E FullBackup:    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
01-15 11:21:44.312  2602  2632 E FullBackup:    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
01-15 11:21:44.312  2602  2632 E FullBackup:    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
01-15 11:21:44.312  2602  2632 E FullBackup:    at com.stevesoltys.seedvault.transport.ConfigurableBackupTransport.sendBackupData(ConfigurableBackupTransport.kt:189)
01-15 11:21:44.312  2602  2632 E FullBackup:    at android.app.backup.BackupTransport$TransportImpl.sendBackupData(BackupTransport.java:765)
01-15 11:21:44.312  2602  2632 E FullBackup:    at com.android.internal.backup.IBackupTransport$Stub.onTransact(IBackupTransport.java:766)
01-15 11:21:44.312  2602  2632 E FullBackup:    at android.os.Binder.execTransactInternal(Binder.java:1184)
01-15 11:21:44.312  2602  2632 E FullBackup:    at android.os.Binder.execTransact(Binder.java:1143)
01-15 11:21:44.312  2602  2632 E FullBackup: Caused by: android.system.ErrnoException: write failed: EPIPE (Broken pipe)
01-15 11:21:44.312  2602  2632 E FullBackup:    at libcore.io.Linux.writeBytes(Native Method)
01-15 11:21:44.312  2602  2632 E FullBackup:    at libcore.io.Linux.write(Linux.java:296)
01-15 11:21:44.312  2602  2632 E FullBackup:    at libcore.io.ForwardingOs.write(ForwardingOs.java:951)
01-15 11:21:44.312  2602  2632 E FullBackup:    at libcore.io.BlockGuardOs.write(BlockGuardOs.java:447)
01-15 11:21:44.312  2602  2632 E FullBackup:    at libcore.io.ForwardingOs.write(ForwardingOs.java:951)
01-15 11:21:44.312  2602  2632 E FullBackup:    at libcore.io.IoBridge.write(IoBridge.java:649)
01-15 11:21:44.312  2602  2632 E FullBackup:    ... 19 more
01-15 11:21:44.332  3171 10893 I davx5   : [webdav.StreamingFileDescriptor] Couldn't serve file (not necessesarily an error)
01-15 11:21:44.332  3171 10893 I davx5   : EXCEPTION java.net.SocketException: Broken pipe
01-15 11:21:44.332  3171 10893 I davx5   :      at java.net.SocketOutputStream.socketWrite0(Native Method)
01-15 11:21:44.332  3171 10893 I davx5   :      at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:117)
01-15 11:21:44.332  3171 10893 I davx5   :      at java.net.SocketOutputStream.write(SocketOutputStream.java:161)
01-15 11:21:44.332  3171 10893 I davx5   :      at org.conscrypt.ConscryptEngineSocket$SSLOutputStream.writeToSocket(ConscryptEngineSocket.java:17)
01-15 11:21:44.332  3171 10893 I davx5   :      at org.conscrypt.ConscryptEngineSocket$SSLOutputStream.writeInternal(ConscryptEngineSocket.java:126)
01-15 11:21:44.332  3171 10893 I davx5   :      at org.conscrypt.ConscryptEngineSocket$SSLOutputStream.write(ConscryptEngineSocket.java:11)
01-15 11:21:44.332  3171 10893 I davx5   :      at okio.OutputStreamSink.write(JvmOkio.kt:47)
01-15 11:21:44.332  3171 10893 I davx5   :      at okio.AsyncTimeout$sink$1.write(AsyncTimeout.kt:58)
01-15 11:21:44.332  3171 10893 I davx5   :      at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:52)
01-15 11:21:44.332  3171 10893 I davx5   :      at okio.RealBufferedSink.write(RealBufferedSink.kt:9)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSink.write(Http1ExchangeCodec.kt:39)
01-15 11:21:44.332  3171 10893 I davx5   :      at okio.ForwardingSink.write(ForwardingSink.kt:8)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.connection.Exchange$RequestBodySink.write(Exchange.kt:60)
01-15 11:21:44.332  3171 10893 I davx5   :      at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:52)
01-15 11:21:44.332  3171 10893 I davx5   :      at okio.RealBufferedSink.write(RealBufferedSink.kt:25)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.davdroid.webdav.StreamingFileDescriptor$uploadNow$body$1.writeTo(StreamingFileDescriptor.kt:70)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:158)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:144)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.dav4jvm.BasicDigestAuthHandler.intercept(BasicDigestAuthHandler.kt:26)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:144)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:104)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:144)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:1150)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:144)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:233)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:144)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:157)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:144)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.davdroid.HttpClient$UserAgentInterceptor.intercept(HttpClient.kt:83)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:144)
01-15 11:21:44.332  3171 10893 I davx5   :      at okhttp3.internal.connection.RealCall.execute(RealCall.kt:138)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.dav4jvm.DavResource$put$1.invoke(DavResource.kt:15)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.dav4jvm.DavResource$put$1.invoke(DavResource.kt:1)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.dav4jvm.DavResource.followRedirects$build(DavResource.kt:15)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.dav4jvm.DavResource.put(DavResource.kt:22)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.dav4jvm.DavResource.put$default(DavResource.kt:29)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.davdroid.webdav.StreamingFileDescriptor.uploadNow(StreamingFileDescriptor.kt:33)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.davdroid.webdav.StreamingFileDescriptor.access$uploadNow(StreamingFileDescriptor.kt:1)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.davdroid.webdav.StreamingFileDescriptor$doStreaming$worker$1.invoke(StreamingFileDescriptor.kt:3)
01-15 11:21:44.332  3171 10893 I davx5   :      at at.bitfire.davdroid.webdav.StreamingFileDescriptor$doStreaming$worker$1.invoke(StreamingFileDescriptor.kt:1)
01-15 11:21:44.332  3171 10893 I davx5   :      at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:3)

I can provide more logs - just let me know on which app uids / tags to filter.

Server log does not show any errors

afflux avatar Jan 15 '23 10:01 afflux

That's strange. Seems to happen when trying to upload Name: apps/com.airbnb.android/f/nezha/eden0/landingPage-index.js. NOt sure if the file is somehow locked on your nextcloud server maybe? (Did you check server logs?)

Otherwise, if you exclude AirBnb from backup, does it otherwise work?

grote avatar Jan 17 '23 15:01 grote

In the mean time, I upgraded to LineageOS 20 / Seedvault 13-3.1, but the issue remains the same. Excluding AirBnb led to another app with the same issue.

With the exact same timestamp as the EPIPE exception in my logcat, I see a HTTP PUT request in my nginx log that is answered with status 204, so that seems fine (I do not see anything regarding WebDAV activity in the nextcloud log though):

"PUT /remote.php/dav/files/<username>/.SeedVaultAndroidBackup/1673776556932/g_XhcfohUJtLbN2P2QpUiP8qeXUJMUF1ZMFhFHp0mfI HTTP/1.1" 204 0 "DAVx5/4.2.6-ose (2022/12/12; dav4jvm; okhttp/4.10.0) Android/13"

I've enabled verbose logging on davx5 and see this behavior:

01-17 19:32:23.771 29940 30769 V davx5   : [HttpClient] --> HEAD https://HOST/remote.php/dav/files/USER/.SeedVaultAndroidBackup/1673776556932/qhaHqAGeDIgoOdtyKXsrux4BwfvvV8k9H4i2TtfKBfE http/1.1
01-17 19:32:23.772 29940 30769 V davx5   : [HttpClient] User-Agent: DAVx5/4.2.6-ose (2022/12/12; dav4jvm; okhttp/4.10.0) Android/13
01-17 19:32:23.773 29940 30769 V davx5   : [HttpClient] Accept-Language: en-US, en;q=0.7, *;q=0.5
01-17 19:32:23.775 29940 30769 V davx5   : [HttpClient] Host: HOST
01-17 19:32:23.776 29940 30769 V davx5   : [HttpClient] Connection: Keep-Alive
01-17 19:32:23.777 29940 30769 V davx5   : [HttpClient] Accept-Encoding: gzip
01-17 19:32:23.778 29940 30769 V davx5   : [HttpClient] Cookie: [redacted]
01-17 19:32:23.779 29940 30769 V davx5   : [HttpClient] --> END HEAD
01-17 19:32:23.780 29940 30769 D dav4jvm : [at.bitfire.dav4jvm.BasicDigestAuthHandler] Trying Basic auth preemptively
01-17 19:32:23.781 29940 30769 D dav4jvm : [at.bitfire.dav4jvm.BasicDigestAuthHandler] Adding Basic authorization header for https://HOST/remote.php/dav/files/USER/.SeedVaultAndroidBackup/1673776556932/qhaHqAGeDIgoOdtyKXsrux4BwfvvV8k9H4i2TtfKBfE
01-17 19:32:23.886 29940 30769 V davx5   : [HttpClient] <-- 200 OK https://HOST/remote.php/dav/files/USER/.SeedVaultAndroidBackup/1673776556932/qhaHqAGeDIgoOdtyKXsrux4BwfvvV8k9H4i2TtfKBfE (105ms)
01-17 19:32:23.888 29940 30769 V davx5   : [HttpClient] Server: nginx/1.18.0
01-17 19:32:23.890 29940 30769 V davx5   : [HttpClient] Date: Tue, 17 Jan 2023 18:32:23 GMT
01-17 19:32:23.891 29940 30769 V davx5   : [HttpClient] Content-Type: application/octet-stream
01-17 19:32:23.893 29940 30769 V davx5   : [HttpClient] Connection: keep-alive
01-17 19:32:23.895 29940 30769 V davx5   : [HttpClient] Expires: Thu, 19 Nov 1981 08:52:00 GMT
01-17 19:32:23.896 29940 30769 V davx5   : [HttpClient] Cache-Control: no-store, no-cache, must-revalidate
01-17 19:32:23.897 29940 30769 V davx5   : [HttpClient] Pragma: no-cache
01-17 19:32:23.898 29940 30769 V davx5   : [HttpClient] Content-Security-Policy: default-src 'none';
01-17 19:32:23.899 29940 30769 V davx5   : [HttpClient] Last-Modified: Tue, 17 Jan 2023 18:32:23 GMT
01-17 19:32:23.900 29940 30769 V davx5   : [HttpClient] ETag: "ae1c485dcb734174646953b4891c404f"
01-17 19:32:23.901 29940 30769 V davx5   : [HttpClient] X-Request-Id: tVlMWnZ3a1jJiXK0TCDw
01-17 19:32:23.902 29940 30769 V davx5   : [HttpClient] OC-ETag: "ae1c485dcb734174646953b4891c404f"
01-17 19:32:23.903 29940 30769 V davx5   : [HttpClient] X-Debug-Token: tVlMWnZ3a1jJiXK0TCDw
01-17 19:32:23.904 29940 30769 V davx5   : [HttpClient] X-Debug-Token: tVlMWnZ3a1jJiXK0TCDw
01-17 19:32:23.905 29940 30769 V davx5   : [HttpClient] Content-Disposition: attachment; filename*=UTF-8''qhaHqAGeDIgoOdtyKXsrux4BwfvvV8k9H4i2TtfKBfE; filename="qhaHqAGeDIgoOdtyKXsrux4BwfvvV8k9H4i2TtfKBfE"
01-17 19:32:23.905 29940 30769 V davx5   : [HttpClient] Strict-Transport-Security: max-age=15768000; includeSubDomains
01-17 19:32:23.906 29940 30769 V davx5   : [HttpClient] Referrer-Policy: no-referrer
01-17 19:32:23.907 29940 30769 V davx5   : [HttpClient] X-Content-Type-Options: nosniff
01-17 19:32:23.908 29940 30769 V davx5   : [HttpClient] X-Download-Options: noopen
01-17 19:32:23.909 29940 30769 V davx5   : [HttpClient] X-Frame-Options: SAMEORIGIN
01-17 19:32:23.910 29940 30769 V davx5   : [HttpClient] X-Permitted-Cross-Domain-Policies: none
01-17 19:32:23.911 29940 30769 V davx5   : [HttpClient] X-Robots-Tag: none
01-17 19:32:23.911 29940 30769 V davx5   : [HttpClient] X-XSS-Protection: 1; mode=block
01-17 19:32:23.912 29940 30769 V davx5   : [HttpClient] <-- END HTTP
01-17 19:32:23.914 29940 29956 I davx5   : [webdav.DavDocumentsProvider] Received file info: HeadResponse(size=null, eTag=ae1c485dcb734174646953b4891c404f, lastModified=Tue Jan 17 18:32:23 GMT+01:00 2023, supportsPartial=null)
01-17 19:32:23.917 29940  8207 V davx5   : [HttpClient] --> PUT https://HOST/remote.php/dav/files/USER/.SeedVaultAndroidBackup/1673776556932/qhaHqAGeDIgoOdtyKXsrux4BwfvvV8k9H4i2TtfKBfE http/1.1
01-17 19:32:23.918 29940  8207 V davx5   : [HttpClient] User-Agent: DAVx5/4.2.6-ose (2022/12/12; dav4jvm; okhttp/4.10.0) Android/13
01-17 19:32:23.919 29940  8207 V davx5   : [HttpClient] Accept-Language: en-US, en;q=0.7, *;q=0.5
01-17 19:32:23.919 25300 25614 I NotificationBackupObserver: Showing progress notification for android.ext.services 40/208
01-17 19:32:23.919 29940  8207 V davx5   : [HttpClient] Content-Type: application/octet-stream
01-17 19:32:23.920 29940  8207 V davx5   : [HttpClient] Transfer-Encoding: chunked
01-17 19:32:23.920 29940  8207 V davx5   : [HttpClient] Host: HOST
01-17 19:32:23.921 25300 25614 I BackupNotificationManager: 91/258 - 35% - Airbnb
01-17 19:32:23.921 29940  8207 V davx5   : [HttpClient] Connection: Keep-Alive
01-17 19:32:23.921 29940  8207 V davx5   : [HttpClient] Accept-Encoding: gzip
01-17 19:32:23.922 29940  8207 V davx5   : [HttpClient] Cookie: [redacted]
01-17 19:32:23.922 29940  8207 V davx5   : [HttpClient] --> END PUT
01-17 19:32:23.923 29940  8207 D dav4jvm : [at.bitfire.dav4jvm.BasicDigestAuthHandler] Adding Basic authorization header for https://HOST/remote.php/dav/files/USER/.SeedVaultAndroidBackup/1673776556932/qhaHqAGeDIgoOdtyKXsrux4BwfvvV8k9H4i2TtfKBfE
01-17 19:32:25.525 25300 25312 W System  : A resource failed to call close.
01-17 19:32:54.072 25300 25614 E FullBackup: Error handling backup data for com.airbnb.android:
01-17 19:32:54.072 25300 25614 E FullBackup: java.io.IOException: write failed: EPIPE (Broken pipe)
01-17 19:32:54.072 25300 25614 E FullBackup:    at libcore.io.IoBridge.write(IoBridge.java:651)
01-17 19:32:54.072 25300 25614 E FullBackup:    at java.io.FileOutputStream.write(FileOutputStream.java:401)
01-17 19:32:54.072 25300 25614 E FullBackup:    at com.google.crypto.tink.subtle.StreamingAeadEncryptingStream.write(StreamingAeadEncryptingStream.java:85)
01-17 19:32:54.072 25300 25614 E FullBackup:    at com.google.crypto.tink.subtle.StreamingAeadEncryptingStream.write(StreamingAeadEncryptingStream.java:59)
01-17 19:32:54.072 25300 25614 E FullBackup:    at com.stevesoltys.seedvault.transport.backup.FullBackup.sendBackupData(FullBackup.kt:166)
01-17 19:32:54.072 25300 25614 E FullBackup:    at com.stevesoltys.seedvault.transport.backup.BackupCoordinator.sendBackupData(BackupCoordinator.kt:291)
01-17 19:32:54.072 25300 25614 E FullBackup:    at com.stevesoltys.seedvault.transport.ConfigurableBackupTransport$sendBackupData$1.invokeSuspend(ConfigurableBackupTransport.kt:190)
01-17 19:32:54.072 25300 25614 E FullBackup:    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
01-17 19:32:54.072 25300 25614 E FullBackup:    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
01-17 19:32:54.072 25300 25614 E FullBackup:    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
01-17 19:32:54.072 25300 25614 E FullBackup:    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
01-17 19:32:54.072 25300 25614 E FullBackup:    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
01-17 19:32:54.072 25300 25614 E FullBackup:    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
01-17 19:32:54.072 25300 25614 E FullBackup:    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
01-17 19:32:54.072 25300 25614 E FullBackup:    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
01-17 19:32:54.072 25300 25614 E FullBackup:    at com.stevesoltys.seedvault.transport.ConfigurableBackupTransport.sendBackupData(ConfigurableBackupTransport.kt:189)
01-17 19:32:54.072 25300 25614 E FullBackup:    at android.app.backup.BackupTransport$TransportImpl.sendBackupData(BackupTransport.java:885)
01-17 19:32:54.072 25300 25614 E FullBackup:    at com.android.internal.backup.IBackupTransport$Stub.onTransact(IBackupTransport.java:766)
01-17 19:32:54.072 25300 25614 E FullBackup:    at android.os.Binder.execTransactInternal(Binder.java:1285)
01-17 19:32:54.072 25300 25614 E FullBackup:    at android.os.Binder.execTransact(Binder.java:1244)
01-17 19:32:54.072 25300 25614 E FullBackup: Caused by: android.system.ErrnoException: write failed: EPIPE (Broken pipe)
01-17 19:32:54.072 25300 25614 E FullBackup:    at libcore.io.Linux.writeBytes(Native Method)
01-17 19:32:54.072 25300 25614 E FullBackup:    at libcore.io.Linux.write(Linux.java:296)
01-17 19:32:54.072 25300 25614 E FullBackup:    at libcore.io.ForwardingOs.write(ForwardingOs.java:943)
01-17 19:32:54.072 25300 25614 E FullBackup:    at libcore.io.BlockGuardOs.write(BlockGuardOs.java:448)
01-17 19:32:54.072 25300 25614 E FullBackup:    at libcore.io.ForwardingOs.write(ForwardingOs.java:943)
01-17 19:32:54.072 25300 25614 E FullBackup:    at libcore.io.IoBridge.write(IoBridge.java:646)
01-17 19:32:54.072 25300 25614 E FullBackup:    ... 19 more

Note the lack of response to the PUT call, and EPIPE after ~30 seconds of silence. The file in question is created on the server, but is empty. Another 4min30s later, there is a DELETE call on the same resource, which coincides with Seedvault reporting the backup as failed.

afflux avatar Jan 17 '23 19:01 afflux

Here's a weird observation: I've set up davx5 to go through mitmproxy to analyze the failing WebDAV transaction, and it doesn't fail there at all.

afflux avatar Jan 17 '23 20:01 afflux

On PolarProxy, I can still see the failures. It like only "bigger" files cause failures - in my current trace, the failing PUT is with a 800kb file, all earlier transfers are way smaller. The server is sending a response to the PUT but this is apparently not processed by davx5. The request seems to have some broken chunked-transfer encoding, it is missing the final "0\r\n" - but I don't see how this can be related to seedvault. I'll try to do some more digging. Feel free to close this issue in seedvault, but one thing to note: it seems like backups are performed regularly (daily?) and those runs are not giving me the "backup failed" notification, even though those runs also didn't back up these files. Maybe this and the "backup failed" notification itself could be clearer.

afflux avatar Jan 17 '23 21:01 afflux

Yes, I'm not sure if failures from system-scheduled backups are even presented at all, currently, or maybe not consistently.

Do you use the expert option "Unlimited app quota"?

t-m-w avatar Jan 17 '23 21:01 t-m-w

No, I'm not using that option.

afflux avatar Jan 17 '23 22:01 afflux

it is missing the final "0\r\n" - but I don't see how this can be related to seedvault. I'll try to do some more digging. Feel free to close this issue in seedvault

No this kind of debugging is wanted and having this here, if if only for documentation purposes is great.

Whatever component is at fault here, it sounds like you are getting closer to finding out.

grote avatar Jan 18 '23 00:01 grote

Pretty sure this issue is due to nginx and php-fpm. They don't seem to play well together when it comes to chunked transfer encoding with fastcgi_request_buffering off: https://forum.nginx.org/read.php?2,292380,292380#msg-292380

Unfortunately, I don't see a good solution:

  1. php-fpm requires a fixed CONTENT_LENGTH header over fastcgi
  2. nginx doesn't know the size, unless it does request buffering
  3. Nextcloud wants request buffering disabled
  4. conditionally disabling request buffering only for chunked requests does not seem possible in nginx
  5. okhttp will always use chunked transfer encoding if body length is unknown
  6. davx5 always uses StreamingFileDescriptor for ContentProvider.openDocument(), which never transmits a content size
  7. (and even if davx5 wanted to transmit the content size: seedvault is streaming, so davx5 can't know the size)

afflux avatar Jan 21 '23 07:01 afflux

I tried seedvault on current lineageos for microg 20 with current davx5 and several dav servers. The following 3 failed:

  • radicale 3.0.6
  • PyWebDAV3 0.10.0
  • weborf 0.17

And it seems to work with:

  • dave 0.4.0

With the others i got:

W davx5   : EXCEPTION java.net.ProtocolException: Expected leading [0-9a-fA-F] character but was 0x1f

Maybe the problem lies between davx5 and your dav server.

nudgegoonies avatar Jul 30 '23 13:07 nudgegoonies

thx @nudgegoonies !

I am running divestOS + davx5 and had issues like empty folders/files.

Due to your feedback I switched to dave and all is working now.

Before I tried to use my running nginx + nextcloud setup (and the webdav within) to store backups which never worked..

steadfasterX avatar Sep 11 '23 13:09 steadfasterX