Sqlite error in Windows Client - sync cancelled

Expected behaviour

Files sync as normal

Actual behaviour

File sync interrupted by error “An error occurred while opening a folder”
Sync not completed
Client log shows a sqlite ‘database disk image is malformed’

Steps to reproduce

  1. Open Owncloud desktop app (large file system with 239,000 files)
  2. LogIn
  3. Wait for error

Server configuration

Operating system: Ubuntu
Web server: Apache2
Database: MySql
PHP version:7.0.33

ownCloud version: 10.0.10 (stable)

Storage backend (external storage): None

Client configuration

Client version: 2.5.4
Operating system: Windows10

Installation path of client: C:\Program Files (x86)

Logs

Please use Gist (https://gist.github.com/) or a similar code paster for longer
logs.

Template for output < 10 lines

  1. Client logfile:

09-24 18:22:57:511 [ info sync.csync.updater ]: Reading from database: MEDIA/Photos/W-pix
09-24 18:22:57:511 [ info sync.csync.updater ]: file: MEDIA/Photos/W-pix, instruction: INSTRUCTION_NONE <<=
09-24 18:22:57:597 [ info sync.csync.updater ]: 8901 entries read below path MEDIA/Photos/W-pix from db.
09-24 18:22:57:597 [ info sync.csync.updater ]: Database entry found, compare: 1560131 <-> 1560131, etag: 5dacd <-> 5d7bacd, inode: 0 <-> 1430377, size: 0 <-> 0, perms: fd <-> fd, type: 2 <-> 2, checksum: <-> , ignore: 0
09-24 18:22:57:597 [ info sync.csync.updater ]: Reading from database: MEDIA/Photos/iPhoto
09-24 18:22:57:597 [ info sync.csync.updater ]: file: MEDIA/Photos/iPhoto, instruction: INSTRUCTION_NONE <<=
09-24 18:22:57:662 [ warning sync.database.sql ]: Sqlite step statement error: 11 “database disk image is malformed” in “SELECT path, inode, modtime, type, md5, fileid, remotePerm, filesize, ignoredChildrenRemote, contentchecksumtype.name || ‘:’ || contentChecksum FROM metadata LEFT JOIN checksumtype as contentchecksumtype ON metadata.contentChecksumTypeId == contentchecksumtype.id WHERE (path > (?1||’/’) AND path < (?1||‘0’)) ORDER BY path||’/’ ASC”
09-24 18:22:57:663 [ warning sync.engine ]: ERROR during csync_update : “An error occurred while opening a folder”
09-24 18:22:57:887 [ info sync.database ]: Closing DB "R://._sync_811ce9d86c97.db"
09-24 18:22:57:889 [ info sync.engine ]: CSync run took 257646 ms
09-24 18:22:57:890 [ info gui.socketapi ]: Sending SocketAPI message --> "STATUS:OK:R:\
" to QLocalSocket(0x7c67428)
09-24 18:22:57:890 [ info gui.socketapi ]: Sending SocketAPI message --> "STATUS:OK:R:*
*" to QLocalSocket(0x4b5c61a8)
09-24 18:22:57:892 [ info gui.folder ]: Client version 2.5.4 (build 11415) Qt 5.11.2 SSL OpenSSL 1.1.1 11 Sep 2018
09-24 18:22:57:892 [ warning gui.folder ]: SyncEngine finished with ERROR
09-24 18:22:57:893 [ info gui.folder ]: Folder sync result: 1
2. Web server error log: No errors
3. Server logfile: ownCloud log (data/owncloud.log):