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

[Bug]: Hub9 30.0.2 (client 3.14.3) Fundamental: mtime on Server and Clients is Different #49189

Open
5 of 8 tasks
Bockeman opened this issue Nov 10, 2024 · 4 comments
Open
5 of 8 tasks
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 30-feedback bug

Comments

@Bockeman
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

On a client machine where I am running nextcloud-client I create a file in a folder that is synchronised
with the server. Shortly after, that file appears on the server; the contents are identical, but the mtime is different.

    <            279 24-11-10 11:47 1731239276.2309372790 /extra/client/ncuser/Nextcloud/Experiment/listing_01.txt
    >            279 24-11-10 11:47 1731239278.4529486080 /extra/server/nextcloud/ncuser/files/Experiment/listing_01.txt
                                             2.2220113277

This is a fundamental issue: files uploaded to the server should have their mtime preserved regardless of any delay in getting that file to the server storage.

I have been struggling with this issue for a long time because in my production environment it only manifests intermittently as a file conflict. But I have now created an environment where the mtime difference is present consistently for every file that is created or modified.

On my production server with over 20TB in use, the storage medium is not local HDD or SSD, but a network attached distributed storage with redundancy mounted as local storage (this is not external storage in nextcloud parlance). I am using glusterfs which serves me very well, robustly providing reliable storage despite HDD and machine failures over the years, but the specific file system itself is
irrelevant to this mtime difference issue. The feature of this file system that exposes the fundamental flaw in nextcloud is that accesses are slower than local SSD or HDD. I suppose that very occassionally, even local storage could have a longer than normal access delay, but the probability of that causing an mtime difference that in turn creates a file conflict is extremely low.

My fear is that many production nextcloud instalations are vulnerable to this issue, but the low probability means they are not suffering, or worse it requires too much effort to narrow down and report.

Steps to reproduce

  1. Emulate slow storage for the server. (I am using the easily found "fuse passthrough example").
  2. Create a file on the client.
  3. Compare the mtime for the file on the client and on the server.

Expected behavior

This is a fundamental issue: files uploaded to the server should have their mtime preserved
regardless of any delay in getting that file to the server storage.

Nextcloud Server version

30

Operating system

Other

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MariaDB

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

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

+ sudo -u apache php -f /usr/share/nextcloud/console.php config:list system
  {
      "system": {
          "log_type": "file",
          "logdateformat": "F d, Y H:i:s",
          "loglevel": 1,
          "datadirectory": "***REMOVED SENSITIVE VALUE***",
          "updatechecker": false,
          "check_for_working_htaccess": false,
          "asset-pipeline.enabled": false,
          "assetdirectory": "\/var\/lib\/nextcloud",
          "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
          "apps_paths": [
              {
                  "path": "\/usr\/share\/nextcloud\/apps",
                  "url": "\/apps",
                  "writable": false
              },
              {
                  "path": "\/var\/lib\/nextcloud\/apps",
                  "url": "\/apps-appstore",
                  "writable": true
              }
          ],
          "passwordsalt": "***REMOVED SENSITIVE VALUE***",
          "secret": "***REMOVED SENSITIVE VALUE***",
          "trusted_domains": [
              "localhost",
              "veriicon"
          ],
          "dbtype": "mysql",
          "version": "30.0.2.2",
          "overwrite.cli.url": "https:\/\/localhost\/",
          "overwriteprotocol": "https",
          "dbname": "***REMOVED SENSITIVE VALUE***",
          "dbhost": "***REMOVED SENSITIVE VALUE***",
          "dbport": "",
          "dbtableprefix": "oc_",
          "mysql.utf8mb4": true,
          "dbuser": "***REMOVED SENSITIVE VALUE***",
          "dbpassword": "***REMOVED SENSITIVE VALUE***",
          "installed": true,
          "instanceid": "***REMOVED SENSITIVE VALUE***",
          "trashbin_retention_obligation": "auto,5",
          "versions_retention_obligation": "auto,5",
          "memcache.distributed": "\\OC\\Memcache\\Redis",
          "memcache.locking": "\\OC\\Memcache\\Redis",
          "memcache.local": "\\OC\\Memcache\\Redis",
          "redis": {
              "host": "***REMOVED SENSITIVE VALUE***",
              "port": 6379
          },
          "maintenance": false
      }
  }

List of activated Apps

+ sudo -u apache php -f /usr/share/nextcloud/console.php app:list
  Enabled:
    - activity: 3.0.0
    - app_api: 4.0.0
    - bruteforcesettings: 3.0.0
    - circles: 30.0.0
    - cloud_federation_api: 1.13.0
    - comments: 1.20.1
    - contactsinteraction: 1.11.0
    - dashboard: 7.10.0
    - dav: 1.31.1
    - federatedfilesharing: 1.20.0
    - federation: 1.20.0
    - files: 2.2.0
    - files_downloadlimit: 3.0.0
    - files_pdfviewer: 3.0.0
    - files_reminders: 1.3.0
    - files_sharing: 1.22.0
    - files_trashbin: 1.20.1
    - files_versions: 1.23.0
    - firstrunwizard: 3.0.0
    - logreader: 3.0.0
    - lookup_server_connector: 1.18.0
    - nextcloud_announcements: 2.0.0
    - notifications: 3.0.0
    - oauth2: 1.18.1
    - password_policy: 2.0.0
    - photos: 3.0.2
    - privacy: 2.0.0
    - provisioning_api: 1.20.0
    - recommendations: 3.0.0
    - related_resources: 1.5.0
    - serverinfo: 2.0.0
    - settings: 1.13.0
    - sharebymail: 1.20.0
    - support: 2.0.0
    - survey_client: 2.0.0
    - systemtags: 1.20.0
    - text: 4.1.0
    - theming: 2.5.0
    - twofactor_backupcodes: 1.19.0
    - updatenotification: 1.20.0
    - user_status: 1.10.0
    - viewer: 3.0.0
    - weather_status: 1.10.0
    - webhook_listeners: 1.1.0-dev
    - workflowengine: 2.12.0
  Disabled:
    - admin_audit: 1.20.0
    - encryption: 2.18.0
    - files_external: 1.22.0
    - suspicious_login: 8.0.0
    - twofactor_nextcloud_notification: 4.0.0
    - twofactor_totp: 12.0.0-dev
    - user_ldap: 1.21.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

+ tail -f -n+1 /tmp/nextcloud_client_log/`ls -1tr /tmp/nextcloud_client_log | tail -1`
  2024-11-10 11:47:58:745 [ info nextcloud.gui.folder.manager /home/user/src/gui/folderman.cpp:1165 ]:    <========== Sync finished for folder [/extra/client/bobw/Nextcloud] of account [bobw@localhost] with remote [https://localhost/nextcloud/remote.php/dav/files/bobw/]
  2024-11-10 11:48:00:765 [ info nextcloud.sync.accessmanager /home/user/src/libsync/accessmanager.cpp:67 ]:      2 "" "https://localhost/nextcloud/ocs/v1.php/cloud/user?format=json" has X-Request-ID "5c88cdc4-72b3-4d74-b55f-eb170b312e7a"
  2024-11-10 11:48:00:766 [ info nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:365 ]:   OCC::JsonApiJob created for "https://localhost/nextcloud" + "ocs/v1.php/cloud/user" "OCC::UserInfo"
  2024-11-10 11:48:00:826 [ info nextcloud.sync.credentials.webflow /home/user/src/gui/creds/webflowcredentials.cpp:405 ]:        request finished
  2024-11-10 11:48:00:826 [ info nextcloud.sync.networkjob.jsonapi /home/user/src/libsync/networkjobs.cpp:972 ]:  JsonApiJob of QUrl("https://localhost/nextcloud/ocs/v1.php/cloud/user?format=json") FINISHED WITH STATUS "OK"
  2024-11-10 11:48:00:826 [ info nextcloud.sync.accessmanager /home/user/src/libsync/accessmanager.cpp:67 ]:      2 "" "https://localhost/nextcloud/remote.php/dav/avatars/bobw/128.png" has X-Request-ID "3435bb95-5a31-44c1-80bd-8e98a995438e"
  2024-11-10 11:48:00:827 [ info nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:365 ]:   OCC::AvatarJob created for "https://localhost/nextcloud" + "" "OCC::UserInfo"
  2024-11-10 11:48:00:880 [ info nextcloud.sync.credentials.webflow /home/user/src/gui/creds/webflowcredentials.cpp:405 ]:        request finished
  2024-11-10 11:48:30:765 [ info nextcloud.sync.accessmanager /home/user/src/libsync/accessmanager.cpp:67 ]:      2 "" "https://localhost/nextcloud/ocs/v1.php/cloud/user?format=json" has X-Request-ID "4e034227-c606-4893-9098-f03aed24b987"
  2024-11-10 11:48:30:765 [ info nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:365 ]:   OCC::JsonApiJob created for "https://localhost/nextcloud" + "ocs/v1.php/cloud/user" "OCC::UserInfo"
  2024-11-10 11:48:30:770 [ info nextcloud.sync.account /home/user/src/libsync/account.cpp:562 ]: ssl errors "SSL-Errors happened for url  \"https://localhost/nextcloud/ocs/v1.php/cloud/user?format=json\" \tError in  QSslCertificate(Version=\"3\", SerialNumber=\"35:6a:84:68:9f:63:b9:19\", Digest=\"X/ybqTKQHDqL2LfRyzKRmg==\", Issuer=\"veriicon\", Subject=\"veriicon\", AlternativeSubjectNames=QMultiMap((1, \"veriicon\")(1, \"veriicon\")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n \tError in  QSslCertificate(Version=\"3\", SerialNumber=\"15:27:11:db:dc:e7:99:5c\", Digest=\"zJv5eZagl7mwoSOO82OmFQ==\", Issuer=\"veriicon\", Subject=\"veriicon\", AlternativeSubjectNames=QMultiMap((1, \"veriicon\")(1, \"veriicon\")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)) : \"The root certificate of the certificate chain is self-signed, and untrusted\" ( \"The root certificate of the certificate chain is self-signed, and untrusted\" ) \n "
  2024-11-10 11:48:30:770 [ info nextcloud.sync.account /home/user/src/libsync/account.cpp:563 ]: QList(QSslCertificate(Version="3", SerialNumber="35:6a:84:68:9f:63:b9:19", Digest="X/ybqTKQHDqL2LfRyzKRmg==", Issuer="veriicon", Subject="veriicon", AlternativeSubjectNames=QMultiMap((1, "veriicon")(1, "veriicon")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)), QSslCertificate(Version="3", SerialNumber="15:27:11:db:dc:e7:99:5c", Digest="zJv5eZagl7mwoSOO82OmFQ==", Issuer="veriicon", Subject="veriicon", AlternativeSubjectNames=QMultiMap((1, "veriicon")(1, "veriicon")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)))
  2024-11-10 11:48:30:833 [ info nextcloud.sync.credentials.webflow /home/user/src/gui/creds/webflowcredentials.cpp:405 ]:        request finished
  2024-11-10 11:48:30:833 [ info nextcloud.sync.networkjob.jsonapi /home/user/src/libsync/networkjobs.cpp:972 ]:  JsonApiJob of QUrl("https://localhost/nextcloud/ocs/v1.php/cloud/user?format=json") FINISHED WITH STATUS "OK"
  2024-11-10 11:48:30:833 [ info nextcloud.sync.accessmanager /home/user/src/libsync/accessmanager.cpp:67 ]:      2 "" "https://localhost/nextcloud/remote.php/dav/avatars/bobw/128.png" has X-Request-ID "33015864-da20-4ea7-b5ab-b235f626a2d6"
  2024-11-10 11:48:30:833 [ info nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:365 ]:   OCC::AvatarJob created for "https://localhost/nextcloud" + "" "OCC::UserInfo"
  2024-11-10 11:48:30:890 [ info nextcloud.sync.credentials.webflow /home/user/src/gui/creds/webflowcredentials.cpp:405 ]:        request finished
  2024-11-10 11:48:48:765 [ info nextcloud.gui.account.state /home/user/src/gui/accountstate.cpp:283 ]:   check connectivity
  2024-11-10 11:48:48:768 [ info nextcloud.sync.accessmanager /home/user/src/libsync/accessmanager.cpp:67 ]:      6 "PROPFIND" "https://localhost/nextcloud/remote.php/dav/files/bobw/" has X-Request-ID "c4a008f7-3a15-48a6-9221-0d6049f4aeef"
  2024-11-10 11:48:48:768 [ info nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:365 ]:   OCC::PropfindJob created for "https://localhost/nextcloud" + "/" "OCC::ConnectionValidator"
  2024-11-10 11:48:48:768 [ info nextcloud.gui.account.state /home/user/src/gui/accountstate.cpp:589 ]:   Skipping server availability check for account "bobw" with state 2
  2024-11-10 11:48:48:772 [ info nextcloud.sync.account /home/user/src/libsync/account.cpp:562 ]: ssl errors "SSL-Errors happened for url  \"https://localhost/nextcloud/remote.php/dav/files/bobw/\" \tError in  QSslCertificate(Version=\"3\", SerialNumber=\"35:6a:84:68:9f:63:b9:19\", Digest=\"X/ybqTKQHDqL2LfRyzKRmg==\", Issuer=\"veriicon\", Subject=\"veriicon\", AlternativeSubjectNames=QMultiMap((1, \"veriicon\")(1, \"veriicon\")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n \tError in  QSslCertificate(Version=\"3\", SerialNumber=\"15:27:11:db:dc:e7:99:5c\", Digest=\"zJv5eZagl7mwoSOO82OmFQ==\", Issuer=\"veriicon\", Subject=\"veriicon\", AlternativeSubjectNames=QMultiMap((1, \"veriicon\")(1, \"veriicon\")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)) : \"The root certificate of the certificate chain is self-signed, and untrusted\" ( \"The root certificate of the certificate chain is self-signed, and untrusted\" ) \n "
  2024-11-10 11:48:48:773 [ info nextcloud.sync.account /home/user/src/libsync/account.cpp:563 ]: QList(QSslCertificate(Version="3", SerialNumber="35:6a:84:68:9f:63:b9:19", Digest="X/ybqTKQHDqL2LfRyzKRmg==", Issuer="veriicon", Subject="veriicon", AlternativeSubjectNames=QMultiMap((1, "veriicon")(1, "veriicon")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)), QSslCertificate(Version="3", SerialNumber="15:27:11:db:dc:e7:99:5c", Digest="zJv5eZagl7mwoSOO82OmFQ==", Issuer="veriicon", Subject="veriicon", AlternativeSubjectNames=QMultiMap((1, "veriicon")(1, "veriicon")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)))
  2024-11-10 11:48:48:827 [ info nextcloud.sync.credentials.webflow /home/user/src/gui/creds/webflowcredentials.cpp:405 ]:        request finished
  2024-11-10 11:48:48:827 [ info nextcloud.sync.networkjob.propfind /home/user/src/libsync/networkjobs.cpp:658 ]: PROPFIND of QUrl("https://localhost/nextcloud/remote.php/dav/files/bobw/") FINISHED WITH STATUS "OK"
  2024-11-10 11:49:00:766 [ info nextcloud.sync.accessmanager /home/user/src/libsync/accessmanager.cpp:67 ]:      2 "" "https://localhost/nextcloud/ocs/v1.php/cloud/user?format=json" has X-Request-ID "7200cb1e-5807-4cdd-90bf-69c07b4a7dbb"
  2024-11-10 11:49:00:766 [ info nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:365 ]:   OCC::JsonApiJob created for "https://localhost/nextcloud" + "ocs/v1.php/cloud/user" "OCC::UserInfo"
  2024-11-10 11:49:00:771 [ info nextcloud.sync.account /home/user/src/libsync/account.cpp:562 ]: ssl errors "SSL-Errors happened for url  \"https://localhost/nextcloud/ocs/v1.php/cloud/user?format=json\" \tError in  QSslCertificate(Version=\"3\", SerialNumber=\"35:6a:84:68:9f:63:b9:19\", Digest=\"X/ybqTKQHDqL2LfRyzKRmg==\", Issuer=\"veriicon\", Subject=\"veriicon\", AlternativeSubjectNames=QMultiMap((1, \"veriicon\")(1, \"veriicon\")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n \tError in  QSslCertificate(Version=\"3\", SerialNumber=\"15:27:11:db:dc:e7:99:5c\", Digest=\"zJv5eZagl7mwoSOO82OmFQ==\", Issuer=\"veriicon\", Subject=\"veriicon\", AlternativeSubjectNames=QMultiMap((1, \"veriicon\")(1, \"veriicon\")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)) : \"The root certificate of the certificate chain is self-signed, and untrusted\" ( \"The root certificate of the certificate chain is self-signed, and untrusted\" ) \n "
  2024-11-10 11:49:00:771 [ info nextcloud.sync.account /home/user/src/libsync/account.cpp:563 ]: QList(QSslCertificate(Version="3", SerialNumber="35:6a:84:68:9f:63:b9:19", Digest="X/ybqTKQHDqL2LfRyzKRmg==", Issuer="veriicon", Subject="veriicon", AlternativeSubjectNames=QMultiMap((1, "veriicon")(1, "veriicon")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)), QSslCertificate(Version="3", SerialNumber="15:27:11:db:dc:e7:99:5c", Digest="zJv5eZagl7mwoSOO82OmFQ==", Issuer="veriicon", Subject="veriicon", AlternativeSubjectNames=QMultiMap((1, "veriicon")(1, "veriicon")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)))
  2024-11-10 11:49:00:835 [ info nextcloud.sync.credentials.webflow /home/user/src/gui/creds/webflowcredentials.cpp:405 ]:        request finished
  2024-11-10 11:49:00:835 [ info nextcloud.sync.networkjob.jsonapi /home/user/src/libsync/networkjobs.cpp:972 ]:  JsonApiJob of QUrl("https://localhost/nextcloud/ocs/v1.php/cloud/user?format=json") FINISHED WITH STATUS "OK"
  2024-11-10 11:49:00:836 [ info nextcloud.sync.accessmanager /home/user/src/libsync/accessmanager.cpp:67 ]:      2 "" "https://localhost/nextcloud/remote.php/dav/avatars/bobw/128.png" has X-Request-ID "b4019f3a-16a3-43d7-95e6-8b4b8525dabf"
  2024-11-10 11:49:00:836 [ info nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:365 ]:   OCC::AvatarJob created for "https://localhost/nextcloud" + "" "OCC::UserInfo"
  2024-11-10 11:49:00:897 [ info nextcloud.sync.credentials.webflow /home/user/src/gui/creds/webflowcredentials.cpp:405 ]:        request finished
  2024-11-10 11:49:30:766 [ info nextcloud.gui.folder.manager /home/user/src/gui/folderman.cpp:959 ]:     Etag poll timer timeout
  2024-11-10 11:49:30:766 [ info nextcloud.gui.folder.manager /home/user/src/gui/folderman.cpp:963 ]:     Folders to sync: 1
  2024-11-10 11:49:30:766 [ info nextcloud.gui.folder.manager /home/user/src/gui/folderman.cpp:973 ]:     Number of folders that don't use push notifications: 1
  2024-11-10 11:49:30:768 [ info nextcloud.gui.folder.manager /home/user/src/gui/folderman.cpp:990 ]:     Run etag job on folder OCC::Folder(0x55e39b966240)
  2024-11-10 11:49:30:768 [ info nextcloud.gui.folder.manager /home/user/src/gui/folderman.cpp:1014 ]:    Can not run etag job: Polltime not reached
  2024-11-10 11:49:30:768 [ info nextcloud.sync.accessmanager /home/user/src/libsync/accessmanager.cpp:67 ]:      2 "" "https://localhost/nextcloud/ocs/v2.php/apps/user_status/api/v1/user_status?format=json" has X-Request-ID "d7f64f58-53e6-4c96-ab19-5a9d19872daa"
  2024-11-10 11:49:30:769 [ info nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:365 ]:   OCC::JsonApiJob created for "https://localhost/nextcloud" + "/ocs/v2.php/apps/user_status/api/v1/user_status" "OCC::UserStatusConnector"
  2024-11-10 11:49:30:769 [ info nextcloud.sync.accessmanager /home/user/src/libsync/accessmanager.cpp:67 ]:      2 "" "https://localhost/nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications?format=json" has X-Request-ID "8161ba70-9e7c-407d-9612-60ee54f82b68"
  2024-11-10 11:49:30:769 [ info nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:365 ]:   OCC::JsonApiJob created for "https://localhost/nextcloud" + "ocs/v2.php/apps/notifications/api/v2/notifications" "OCC::ServerNotificationHandler"
  2024-11-10 11:49:30:769 [ info nextcloud.sync.accessmanager /home/user/src/libsync/accessmanager.cpp:67 ]:      2 "" "https://localhost/nextcloud/ocs/v1.php/cloud/user?format=json" has X-Request-ID "3b2d0898-a15f-4a1a-ad51-6f438b8d8382"
  2024-11-10 11:49:30:769 [ info nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:365 ]:   OCC::JsonApiJob created for "https://localhost/nextcloud" + "ocs/v1.php/cloud/user" "OCC::UserInfo"
  2024-11-10 11:49:30:773 [ info nextcloud.sync.account /home/user/src/libsync/account.cpp:562 ]: ssl errors "SSL-Errors happened for url  \"https://localhost/nextcloud/ocs/v2.php/apps/user_status/api/v1/user_status?format=json\" \tError in  QSslCertificate(Version=\"3\", SerialNumber=\"35:6a:84:68:9f:63:b9:19\", Digest=\"X/ybqTKQHDqL2LfRyzKRmg==\", Issuer=\"veriicon\", Subject=\"veriicon\", AlternativeSubjectNames=QMultiMap((1, \"veriicon\")(1, \"veriicon\")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n \tError in  QSslCertificate(Version=\"3\", SerialNumber=\"15:27:11:db:dc:e7:99:5c\", Digest=\"zJv5eZagl7mwoSOO82OmFQ==\", Issuer=\"veriicon\", Subject=\"veriicon\", AlternativeSubjectNames=QMultiMap((1, \"veriicon\")(1, \"veriicon\")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)) : \"The root certificate of the certificate chain is self-signed, and untrusted\" ( \"The root certificate of the certificate chain is self-signed, and untrusted\" ) \n "
  2024-11-10 11:49:30:773 [ info nextcloud.sync.account /home/user/src/libsync/account.cpp:563 ]: QList(QSslCertificate(Version="3", SerialNumber="35:6a:84:68:9f:63:b9:19", Digest="X/ybqTKQHDqL2LfRyzKRmg==", Issuer="veriicon", Subject="veriicon", AlternativeSubjectNames=QMultiMap((1, "veriicon")(1, "veriicon")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)), QSslCertificate(Version="3", SerialNumber="15:27:11:db:dc:e7:99:5c", Digest="zJv5eZagl7mwoSOO82OmFQ==", Issuer="veriicon", Subject="veriicon", AlternativeSubjectNames=QMultiMap((1, "veriicon")(1, "veriicon")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)))
  2024-11-10 11:49:30:776 [ info nextcloud.sync.account /home/user/src/libsync/account.cpp:562 ]: ssl errors "SSL-Errors happened for url  \"https://localhost/nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications?format=json\" \tError in  QSslCertificate(Version=\"3\", SerialNumber=\"35:6a:84:68:9f:63:b9:19\", Digest=\"X/ybqTKQHDqL2LfRyzKRmg==\", Issuer=\"veriicon\", Subject=\"veriicon\", AlternativeSubjectNames=QMultiMap((1, \"veriicon\")(1, \"veriicon\")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)) : \"The host name did not match any of the valid hosts for this certificate\" ( \"The host name did not match any of the valid hosts for this certificate\" ) \n \tError in  QSslCertificate(Version=\"3\", SerialNumber=\"15:27:11:db:dc:e7:99:5c\", Digest=\"zJv5eZagl7mwoSOO82OmFQ==\", Issuer=\"veriicon\", Subject=\"veriicon\", AlternativeSubjectNames=QMultiMap((1, \"veriicon\")(1, \"veriicon\")), EffectiveDate=QDateTime(2024-10-27 10:38:58.000 UTC Qt::UTC), ExpiryDate=QDateTime(2025-10-27 10:38:58.000 UTC Qt::UTC)) : \"The root certificate of the certificate chain is self-signed, and untrusted\" ( \"The root certificate of the certificate chain is self-signed, and untrusted\" ) \n "^C

Additional info

Operating system: Fedora 40

This issue is present on latest official Fedora versions:
Server 29.0.8
Client 3.13.4git

Also present on very latest version:
Server 30.0.2
Client Nextcloud-3.14.3-x86_64.AppImage

This is a standalone nextcloud environment freshly and specifically created for demonstrating this issue.

There are many related server and desktop issues reporting something amiss with mtime, but all have
been closed as stale or are restricted to something specific.

@Bockeman Bockeman added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Nov 10, 2024
@XueSheng-GIT
Copy link

Is this related? #48681

@Bockeman
Copy link
Author

Is this related? #48681

@XueSheng-GIT Thanks for pointing this out. It was one of the issues that popped up in my research, but I'm glad you mentioned this one, because I could have missed it.

#48681 appears to be related to a "a frontend rendering issue". On occassions, I have also seen similar behaviour in my web rendered view with days or more of mtime difference. So I am inclined to agree that #48681 is an intermittent frontend rendering issue -- the webview has not caught up with the actual mtime stored on the server.

This issue, on the otherhand is fundamental. The mtime stored on the server is wrong.

@Bockeman
Copy link
Author

I'm not a developer and I have not looked at the source code to work out what actually happens.

Hypothesis

  1. When a file is freshly created/modified on a client, the file is transferred to the server as "fresh". There's no need to upload mtime, it is assumed to be the current time. It could be that there is performance efficiency in not transferring what might be considered as unnecessary metadata overhead.
  2. If an old file is copied into the client folder, this is a new folder sync of older files, or similar, the file is transferred to the server as "old" and is required to transfer the mtime of the original old file.
  3. When a client periodically checks for updates on the server, or a client is forced to sync, or similar, all the files are "old" and the mtime is required to be transferred.

Presumed Issue
Item 1. is wrong, especially in cases where the storage is slow/delayed.

Potential Solution
The obvious solution IMO is to force the mtime to be transferred in all circumstances. If this might cause a performance issue, then make this an installation/site option, or better, automatically select this option when slow/delayed storage is detected.

@Bockeman
Copy link
Author

I did another test. I copied some "old" files into the Experiment folder (I actually chose some of the "Nextcloud.*" files created upon installation about two weeks ago).

I expected these files to not suffer the wrong mtime problem, but they do.

  5 /Temp/client.files
  total 20112
  drwxrwxr-x 1 bobw warren      160 2024-11-12 21:14:40.872689061 +0000 ./
  drwxrwxr-x 1 bobw warren      416 2024-11-09 19:58:57.428188579 +0000 ../
  -rw-rw-r-- 1 bobw warren      279 2024-11-10 11:47:56.230937279 +0000 listing_01.txt
  -rw-rw-r-- 1 bobw warren      357 2024-11-10 12:31:14.000000000 +0000 listing_11.txt
  -rw-rw-r-- 1 bobw warren  3963036 2024-10-28 12:50:32.000000000 +0000 Nextcloud intro.mp4
  -rw-rw-r-- 1 bobw warren 16564448 2024-10-28 12:50:32.000000000 +0000 Nextcloud Manual.pdf
  -rw-rw-r-- 1 bobw warren    50598 2024-10-28 12:50:32.000000000 +0000 Nextcloud.png
  5 /Temp/server.files
  total 20112
  drwxrwxrwx 1 apache apache      160 2024-11-12 21:14:44.542706969 +0000 ./
  drwxrwxrwx 1 apache apache      286 2024-10-31 21:27:24.011455970 +0000 ../
  -rw-r--r-- 1 apache apache      279 2024-11-10 11:47:58.452948608 +0000 listing_01.txt
  -rw-r--r-- 1 apache apache      357 2024-11-10 12:31:14.180837518 +0000 listing_11.txt
  -rw-r--r-- 1 apache apache  3963036 2024-11-12 21:14:44.546706988 +0000 Nextcloud intro.mp4
  -rw-r--r-- 1 apache apache 16564448 2024-11-12 21:14:44.204705319 +0000 Nextcloud Manual.pdf
  -rw-r--r-- 1 apache apache    50598 2024-11-12 21:14:44.441706476 +0000 Nextcloud.png
    <            279 24-11-10 11:47 1731239276.2309372790 /extra/client/ncuser/Nextcloud/Experiment/listing_01.txt
    >            279 24-11-10 11:47 1731239278.4529486080 /extra/server/nextcloud/ncuser/files/Experiment/listing_01.txt
                                             2.2220113277
    <        3963036 24-10-28 12:50 1730119832.0000000000 /extra/client/ncuser/Nextcloud/Experiment/Nextcloud intro.mp4
    >        3963036 24-11-12 21:14 1731446084.5467069880 /extra/server/nextcloud/ncuser/files/Experiment/Nextcloud intro.mp4
                                       1326252.5467069149
    <       16564448 24-10-28 12:50 1730119832.0000000000 /extra/client/ncuser/Nextcloud/Experiment/Nextcloud Manual.pdf
    >       16564448 24-11-12 21:14 1731446084.2047053190 /extra/server/nextcloud/ncuser/files/Experiment/Nextcloud Manual.pdf
                                       1326252.2047052383
    <          50598 24-10-28 12:50 1730119832.0000000000 /extra/client/ncuser/Nextcloud/Experiment/Nextcloud.png
    >          50598 24-11-12 21:14 1731446084.4417064760 /extra/server/nextcloud/ncuser/files/Experiment/Nextcloud.png
                                       1326252.4417064190

I've checked all the possible timestamps on the server linux files. They all show the transfer time, not the installation/creating/last_modified time on the client.

Here's the really weird bit. If I look on the web view (looking at the server files) I get:
Image

This web view is showing the correct "modified" date, 2 weeks ago. But this does not correspond to the mtime of those files on the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 30-feedback bug
Projects
None yet
Development

No branches or pull requests

3 participants