Skip to content

[Bug]: Desktop client 4.0.4 generates massive logs and never finishes syncing large folders #9279

@wonx

Description

@wonx

⚠️ Before submitting, please verify the following: ⚠️

Bug description

After upgrading the Nextcloud Desktop Client on Windows from 3.0.17 to 4.0.4, the client can enter an infinite discovery/logging loop when synchronizing directories with a large number of files (e.g. ~2000 CSV files), especially when the synced directory is backed by External Storage (SMB) on the server side.

In this state:

  • The desktop client UI becomes unresponsive.
  • Disk I/O stays constantly high.
  • The client generates tens of gigabytes of log files in %LOCALAPPDATA%\Temp\Nextcloud-logdir in a very short time.
  • Synchronization never completes.

This behavior did not occur in client version 3.0.17 with the same server, same data, and same configuration.

Removing the affected directory from sync (or removing a symlink pointing to it) immediately stops the issue.

Steps to reproduce

  1. On the Nextcloud server:
  • Configure External Storage using SMB.
  • Expose a directory containing a large number of files (e.g. ~2000 CSV files).
  • The storage may contain symlinks pointing to real directories.
  1. On Windows 11:
  • Install Nextcloud Desktop Client 4.0.4.
  • Configure synchronization for the external storage directory.
  • Start the synchronization.
  • Observe the client behavior.

Actual behavior:

  • The client becomes unresponsive shortly after starting discovery.
  • Continuous disk reads (~100+ MB/s) occur.
  • Log files grow uncontrollably (10–50+ GB in minutes) in:
  • C:\Users\<user>\AppData\Local\Temp\Nextcloud-logdir
  • Synchronization never completes.
  • Even after lowering loglevel, logs continue to grow.
  • The log files remain locked by the Nextcloud process and cannot be deleted until the process is forcibly terminated.

Expected behavior

  • The client should complete discovery and synchronization successfully.
  • Logging should remain bounded and respect the configured log level.
  • The client should not enter an infinite discovery/logging loop when encountering directories with many files or symlinks.
  • Behavior should be consistent with Nextcloud Desktop Client 3.0.17.

Which files are affected by this bug

Personal/git repository/data/raw/burgos_montejo_de_san_miguel_names.csv

Operating system

Windows

Which version of the operating system you are running.

Windows 11 25H2

Package

Official Windows MSI

Nextcloud Server version

32.0.3

Nextcloud Desktop Client version

4.0.4

Is this bug present after an update or on a fresh install?

Updated to a major version (ex. 3.16.3 to 3.17.0)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

  • Default internal user-backend
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Nextcloud Server logs

No relevant errors observed in server-side logs.
The issue appears to be entirely client-side during discovery/sync.

Additional info

  • The affected directory was accessible through External Storage (SMB).
  • Removing a symlink pointing to the directory stops the issue.
  • Desynchronizing the directory immediately stops log growth.
  • The issue appears to be triggered by:
    • A large number of files
    • External storage
    • Possibly symlink traversal or repeated discovery of virtual files
  • Example log lines observed repeatedly during the issue:
[info nextcloud.sync.discovery] discovered "...csv" CSyncEnums::CSYNC_INSTRUCTION_NEW
  • These messages repeat endlessly while logs grow without bound.
  • Desktop client logs grow so large that attaching the full debug archive is impractical without trimming.
  • Going back to client 3.0.17 resolves the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions