nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
2.99k stars 788 forks source link

[Bug]: 3.5.1 file modified time on client and server are different #4598

Open Bockeman opened 2 years ago

Bockeman commented 2 years ago

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

Bug description

The mtime (modified time) on the server is different from when that the file on the client was actually changed.

For example:

 client:           4973 22-05-25 19:38 1653503887.2465688620 Experiment/listing_64.txt
 server:           4973 22-05-25 19:58 1653505105.0341848710 Experiment/listing_64.txt
 time difference:                            1217.7876160145

Steps to reproduce

1) Use any connection between the client file storage and the server file storage where the delay is unpredictable or normally large. This could be because of network problems or naturally slow storage. [For the purposes of repeatedly and reliably demonstrating this problem the server storage is deliberately slow , by implementing the server storage on a FUSE mount with a controlled access delay.]

2) Use a script to generate files. [In this case a simple directory listing, repeated several times at 1 second or more intervals.]

3) Use a script to compare the mtime of the files on the client and the server, and note the time difference in seconds. Observe that every file has a time difference of several minutes.

  <           4973 22-05-25 19:38 1653503892.5235671990 Experiment/listing_00.txt
  >           4973 22-05-25 19:41 1653504082.1885074050 Experiment/listing_00.txt
                                         189.6649401188
  <           4973 22-05-25 19:38 1653503897.5375656180 Experiment/listing_01.txt
  >           4973 22-05-25 19:41 1653504088.7375053410 Experiment/listing_01.txt
                                         191.1999397278
  <           4973 22-05-25 19:38 1653503902.5525640370 Experiment/listing_02.txt
  >           4973 22-05-25 19:41 1653504098.8405021560 Experiment/listing_02.txt
                                         196.2879381180
  <           4973 22-05-25 19:38 1653503907.5665624560 Experiment/listing_03.txt
  >           4973 22-05-25 19:41 1653504095.2885032760 Experiment/listing_03.txt
                                         187.7219407558
  <           4973 22-05-25 19:38 1653503912.5815608740 Experiment/listing_04.txt
  >           4973 22-05-25 19:41 1653504105.3925000900 Experiment/listing_04.txt
                                         192.8109393120
  <           4973 22-05-25 19:38 1653503917.5975592930 Experiment/listing_10.txt
  >           4973 22-05-25 19:41 1653504111.9434980250 Experiment/listing_10.txt
                                         194.3459389210
  <           4973 22-05-25 19:38 1653503922.6125577120 Experiment/listing_11.txt
  >           4973 22-05-25 19:45 1653504329.0024296000 Experiment/listing_11.txt
                                         406.3898718357
  <           4973 22-05-25 19:38 1653503927.6275561310 Experiment/listing_12.txt
  >           4973 22-05-25 19:45 1653504335.5584275330 Experiment/listing_12.txt
                                         407.9308714867
  <             22 22-05-25 19:38 1653503892.5035672050 Experiment/listing_13.txt
  >             22 22-05-25 19:45 1653504350.2164229120 Experiment/listing_13.txt
                                         457.7128555775
  <             22 22-05-25 19:38 1653503892.5105672030 Experiment/listing_14.txt
  >             22 22-05-25 19:45 1653504348.6684234000 Experiment/listing_14.txt
                                         456.1578562260
  <           4973 22-05-25 19:36 1653503791.6785989890 Experiment/listing_20.txt
  >           4973 22-05-25 19:45 1653504342.1164254660 Experiment/listing_20.txt
                                         550.4378266335
  <           4973 22-05-25 19:36 1653503796.6935974080 Experiment/listing_21.txt
  >           4973 22-05-25 19:45 1653504356.7724208470 Experiment/listing_21.txt
                                         560.0788235664
  <           4973 22-05-25 19:36 1653503801.7085958270 Experiment/listing_22.txt
  >           4973 22-05-25 19:49 1653504591.5073468160 Experiment/listing_22.txt
                                         789.7987511158
  <           4973 22-05-25 19:36 1653503806.7235942470 Experiment/listing_23.txt
  >           4973 22-05-25 19:49 1653504598.1523447200 Experiment/listing_23.txt
                                         791.4287505150
  <           4973 22-05-25 19:36 1653503811.7385926660 Experiment/listing_24.txt
  >           4973 22-05-25 19:50 1653504613.1713399820 Experiment/listing_24.txt
                                         801.4327473640
  <           4973 22-05-25 19:36 1653503816.7555910840 Experiment/listing_30.txt
  >           4973 22-05-25 19:50 1653504619.7493379090 Experiment/listing_30.txt
                                         802.9937467575
  <           4973 22-05-25 19:37 1653503821.7705895030 Experiment/listing_31.txt
  >           4973 22-05-25 19:50 1653504603.6603429830 Experiment/listing_31.txt
                                         781.8897533417
  <           4973 22-05-25 19:37 1653503826.7855879230 Experiment/listing_32.txt
  >           4973 22-05-25 19:50 1653504604.6613426670 Experiment/listing_32.txt
                                         777.8757545948
  <           4973 22-05-25 19:37 1653503831.8005863410 Experiment/listing_33.txt
  >           4973 22-05-25 19:53 1653504830.4962714420 Experiment/listing_33.txt
                                         998.6956851482
  <           4973 22-05-25 19:37 1653503836.8165847600 Experiment/listing_34.txt
  >           4973 22-05-25 19:54 1653504851.7092647530 Experiment/listing_34.txt
                                        1014.8926799297
  <           4973 22-05-25 19:37 1653503842.1095830920 Experiment/listing_50.txt
  >           4973 22-05-25 19:53 1653504837.0552693740 Experiment/listing_50.txt
                                         994.9456863403
  <           4973 22-05-25 19:37 1653503847.1235815110 Experiment/listing_51.txt
  >           4973 22-05-25 19:54 1653504843.6112673070 Experiment/listing_51.txt
                                         996.4876859188
  <           4973 22-05-25 19:37 1653503852.1385799300 Experiment/listing_52.txt
  >           4973 22-05-25 19:54 1653504845.1582668190 Experiment/listing_52.txt
                                         993.0196869373
  <           4973 22-05-25 19:37 1653503857.1555783490 Experiment/listing_53.txt
  >           4973 22-05-25 19:54 1653504858.2602626860 Experiment/listing_53.txt
                                        1001.1046843529
  <           4973 22-05-25 19:37 1653503862.1695767680 Experiment/listing_54.txt
  >           4973 22-05-25 19:58 1653505088.9231899520 Experiment/listing_54.txt
                                        1226.7536129951
  <           4973 22-05-25 19:37 1653503867.1865751870 Experiment/listing_60.txt
  >           4973 22-05-25 19:58 1653505082.2801920470 Experiment/listing_60.txt
                                        1215.0936169624
  <           4973 22-05-25 19:37 1653503872.2015736050 Experiment/listing_61.txt
  >           4973 22-05-25 19:58 1653505094.4311882150 Experiment/listing_61.txt
                                        1222.2296144962
  <           4973 22-05-25 19:37 1653503877.2175720240 Experiment/listing_62.txt
  >           4973 22-05-25 19:58 1653505095.4311878990 Experiment/listing_62.txt
                                        1218.2136158943
  <           4973 22-05-25 19:38 1653503882.2315704440 Experiment/listing_63.txt
  >           4973 22-05-25 19:58 1653505103.9421852150 Experiment/listing_63.txt
                                        1221.7106146812
  <           4973 22-05-25 19:38 1653503887.2465688620 Experiment/listing_64.txt
  >           4973 22-05-25 19:58 1653505105.0341848710 Experiment/listing_64.txt
                                        1217.7876160145

Expected behavior

The mtime (modified time) of a file on the server should correspond to the mtime of the file on the client.

Which files are affected by this bug

All files

Operating system

Linux

Which version of the operating system you are running.

Fedora 36

Package

Appimage

Nextcloud Server version

24.0.1

Nextcloud Desktop Client version

3.5.1

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

Updated to a major version (ex. 3.3.6 to 3.4.0)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

Nextcloud Server logs

There are no entries in the nextcloud.log with timestamps after "May 25, 2022 14:29:55".  The experiment started at "2022-05-25 17:59:51".

Additional info

debug_archive_220522.zip

Bockeman commented 2 years ago

Please could someone indicate why this issue is still sitting in "0. Needs triage". I see some thumbs up and watching, but no comment.

Have I supplied all the info required to get this issue looked at? Have I incorrectly answered one of the [ambiguous] questions like "Is this bug present after an update or on a fresh install?" No, the issue did not appear after an update (it was present before and after the update) Yes, I just updated to recent versions. Yes, the bug was present both before and after the update.

Perhaps some observer might back me up (or provide a good counter argument) regarding the seriousness of this issue. If the modified time on the server is later (by several minutes in my stress test case) than the client, and the client updates the file again, before the server has been updated, then that surely creates a conflict because the server file looks newer than the file on the client.

I do not understand the model where the mtime on the server is related to the upload time. (ok, I understand that WebDav might not support propogating the mtime, but I also understand that a whole load of metadata is also uploaded and from that the mtime on the uploaded file should be modified to match the actual mtime of the file on the client).

Help! This is really causing me problems. I do not understand how bigger organisations using NextCloud can tollerate this.

Bockeman commented 2 years ago

Would someone mind explaining to me why this issue is still sitting in "0. Needs triage".

I'd appreciate: "Yep, this does need looking at, but no one is available right now", or "IMHO there is no bug here, because ...".

Bockeman commented 1 year ago

Could someone comment, please.

nursoda commented 1 year ago

While I share your frustration, I read the fact that the maintainers do not comment exactly as you said: "No one has time to look into it as we try to implement and fix way too many things at once". Asking for reaction in a bug tracker is not a good idea. Rather raise your voice in the forum and link to issues that are critical to users (from your POV). You may then add a back-link here, so that discussion rather takes place where it belongs – in the forum.

Bockeman commented 1 year ago

@nursoda your comment is valid and much appreciated. I checked relevant forums and titles and could not find any that specifically met my criterion nor suggested a topic title that would pique the interest of the relevant deveopers. Purely by coincidence, a developer mentioned a related issue on https://github.com/nextcloud/desktop/issues/2467 and I am hoping this will lead to some clues as to what is going on.