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

moving a directory into a remote location results in data-loss #18

Open
eukara opened this issue Sep 23, 2022 · 8 comments
Open

moving a directory into a remote location results in data-loss #18

eukara opened this issue Sep 23, 2022 · 8 comments

Comments

@eukara
Copy link

eukara commented Sep 23, 2022

This is a critical bug and involves data loss.

I've tried this with NFS directories and SSHFS.

This can be reproduced on GWorkspace 1.0 and -git, with GNUstep's -git as well as the tarballs for Make v2.9.0, Base v1.28.0, GUI v0.29.0, Back v0.29.0

Steps to reproduce:

  1. Create a directory with some dummy files in it on a local hard disk drive.
  2. Cut or copy the directory into a remote location, either one mounted via NFS or SSHFS.
  3. You will discover that only the directory has been moved, and none of the files within, as well as sub-directories, exist.
  4. If you cut the directory from the local location, you will experience data loss.

Notes:
Running GWorkspace in a Terminal does not output anything of note.

@rmottola
Copy link
Member

Using current git and GWorkspace, I could not verify this bug. I moved and copied files and directory from local to NFS.

I wrote you an email with some proposed tests.

As you describe the issue, it could be a permission problem or a deeper bug. Could you inspect the directory that was created? does it have permissions? If you then manually try to copy inside a file, does it work? (i.e. just copy, so you don't loose your data and since the content fails, copy the content afterwards).
Furthermore there seems to be an atomicity problem where a delete is performed when it shouldn't, but first we need to understand where the issue is happening.

@rmottola
Copy link
Member

rmottola commented Jun 5, 2024

@eukara did you do further testing? can you reproduce?
Did you try current release of gnustep libraries and git version of GWorkspace?

@eukara
Copy link
Author

eukara commented Jun 7, 2024

Put some time aside today to rebase against the libraries. Wasn't sure what was going wrong at first since I had seemingly removed the previous versions, but some leftover frameworks/bundles still wanted to link against the old -base real bad. Despite ldconfig and all that.

Will be testing and report everything during the meeting + update here.

@eukara
Copy link
Author

eukara commented Jun 8, 2024

Latest libraries and Workspace on Slackware 15, with gcc and not the new ng-runtime etc. I'm still experiencing the issue unfortunately. Folders copy, but nothing within them - so cutting them will result in data loss.
I've also restarted the NFS exports and only gave them the rw and squash related flags so I could write to them, and toggled the default of no_subtree_check to subtree_check. No luck.

I will keep digging, and start debugging NSFileManager to the best of my ability.

@gcasa
Copy link
Member

gcasa commented Sep 14, 2024

@rfm Could this be an NSFileManager bug?

@rfm
Copy link
Contributor

rfm commented Sep 15, 2024 via email

@rmottola
Copy link
Member

I tried hard reproducing this with NFS storage and was not able too.. I tried moving lots of megabytes and files on two different NFS servers!
I imagine a data-loss situation could happen if remove of source happens either not receiving proper confirmation of copy or for some reason copy happened, but is not correctly written, finalized or flushed on the NFS server. It could even be a NFS bug of the client or server of @eukara's setup.

  1. either somebody else can reproduce it (I was unable to)
  2. it can be reproduced in a different setup (e.g. copying to USB disk or similar)
  3. a consistent procedure to reproduce it with Gworkspace
  4. ideally a minimized testcase to reproduce it without GWorkspace to confidently proof it is base and look it up with @rfm

Host and Server OS's of @eukara's setup? NFS version? are there VMs involved? strange local-remote mapping of network, like server being on the same pyhsical machine of the client?

otherwise nothign can be done on this issue for now.

@gcasa
Copy link
Member

gcasa commented Sep 16, 2024

I will see if I can write a minimal test for this. Some of my personal machines use nfs shares so I should be able to. If it doesn't fail for me then @eukara might have to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants