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

monitoring mode change in behaviours #1072

Closed
nrandon opened this issue Sep 24, 2020 · 10 comments · Fixed by #1073
Closed

monitoring mode change in behaviours #1072

nrandon opened this issue Sep 24, 2020 · 10 comments · Fixed by #1073
Labels
Bug Something isn't working Fixed Regression

Comments

@nrandon
Copy link

nrandon commented Sep 24, 2020

Bug Report Details

Step to Reproduce:

  • Using OneDrive Docker (tags alpine latest) with default config.
  • Set-up OneDrive client and sync all your file form OneDrive.
  • Create a new file call 'test.txt'
  • Let this upload/sync to OneDrive.
  • Take OneDrive client offline (stop the application).
  • Delete the 'test.txt' file from you local sync.
  • Re-start OneDrive client.
  • The 'test.txt' file is neither uploaded from OneDrive or deleted on the remote

Old behaviour 'test.txt' file was deleted as expected (check with older client)

This problem was discovered as I had an internet outage and OneDrive client reported a 504 (gateway timeout) and then crashed (docker restarted the application). The delete of a local file accrued during the Docker re-start (OneDrive offline) and an inconsistency like above was created.

Also it was observed that during the restart/crash a 'core' file was produced from OneDrive client and uploaded. Can core file be added to the default skip_file ? (I am not worried the core was produced as it not related to the issue directly as you can see for the reproducer)

Application and Operating System Details:

  • OS: Debian Buster: Docker version 19.03.13, build 4484c46d9d, SMP Debian 5.6.14-2~bpo10+1 (2020-06-09)
  • Are you using a headless system (no gui) or with a gui installed? Headless
  • OneDrive Account Type: Personal (free)
  • Did you build from source or install from a package? No
  • Application configuration: Output of onedrive --display-config:
onedrive version                       = v2.4.5-19-g38e9cc1
Config path                            = /root/.config/onedrive
Config file found in config path       = false
Config option 'check_nosync'           = false
Config option 'sync_dir'               = /root/OneDrive
Config option 'skip_dir'               =
Config option 'skip_file'              = ~*|.~*|*.tmp
Config option 'skip_dotfiles'          = false
Config option 'skip_symlinks'          = false
Config option 'monitor_interval'       = 300
Config option 'min_notify_changes'     = 5
Config option 'log_dir'                = /var/log/onedrive/
Config option 'classify_as_big_delete' = 1000
Config option 'sync_root_files'        = false
Selective sync 'sync_list' configured  = false
Business Shared Folders configured     = false
@abraunegg
Copy link
Owner

@nrandon

Old behaviour 'test.txt' file was deleted as expected (check with older client)

What older client version did you not see this behavior in? That will be helpful to traceback where this potential regression has come from. Will spend some time looking into this tomorrow as I cannot do this tonight.

Also it was observed that during the restart/crash a 'core' file was produced from OneDrive client and uploaded. ... (I am not worried the core was produced as it not related to the issue directly as you can see for the reproducer)

A core file seems to be created when using LDC 1.20.1 package, see #1053 for that issue. On checking the Alpine Docker build logs we have this:

checking for ldmd2...
ldmd2
checking version of D compiler...
1.20.1

Thus - same compiler version - thus most likely the same issue when the application is ^C or exits, segfaults. I cannot do anything about that particular issue unfortunately.

Can core file be added to the default skip_file ?

You can add that to your own configuration, sure :)

@nrandon
Copy link
Author

nrandon commented Sep 24, 2020

Thankyou for you fast response
The client I used for testing was 2.4.2 and this seem to-do the right thing.

I was not to worried about the core file as it in docker and it can handle the restarting and stuff. I was not expecting the core file to be written to OneDrive, but is suspect this is by design (is as good as anywhere) so it not a real issue and I can add it to skip_file.

thanks again

@abraunegg abraunegg added Bug Something isn't working In Progress Currently being worked on and removed Investigating More Information Needed Waiting on Response labels Sep 24, 2020
@abraunegg abraunegg linked a pull request Sep 24, 2020 that will close this issue
@abraunegg
Copy link
Owner

abraunegg commented Sep 24, 2020

@nrandon

I have been able to replicate this scenario, please can you test the following PR:

git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/1073/head:pr1073
git checkout pr1073
./configure; make clean; make;

When running the PR version, your client version should be: onedrive v2.4.5-21-g41196d3. You will need to manually build the Docker image for this to test under Docker as well.

@abraunegg abraunegg added PR Provided - Needs Testing Regression and removed In Progress Currently being worked on labels Sep 24, 2020
@abraunegg
Copy link
Owner

Flagging this as a regression as this issue only impacts --monitor and was introduced with this commit: e321c37

@nrandon
Copy link
Author

nrandon commented Sep 24, 2020

Tested the PR using docker and it work now as expected. thanks for the very quick fix

@abraunegg
Copy link
Owner

@nrandon
Thanks for confirming fix, will merge into 'master'

@nrandon
Copy link
Author

nrandon commented Sep 28, 2020

HI I thought thus was fixed but I found another case of the bug that is not working.

Reproducer is as follows:

  • Make a directory test/test/test
  • Place a file in the above directory test.txt
  • Let one drive client sync this.
  • Now take OneDrive client offline.
  • Delete the all the directory's and files made above. (or simple rm -rf temp at the bottom level)
  • Restart the OnceDrive client the delete will not be detected or a new sync occur.

Expected outcome: All new content delete.

Sorry for not finding this sooner but my network connection when down again and i was left in this state.

OneDrive client is at: v2.4.5-23-ga3a2726

@nrandon
Copy link
Author

nrandon commented Sep 28, 2020

@abraunegg I can open as a new bug is you require ?

@abraunegg
Copy link
Owner

New issue please

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Fixed Regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants