maindavfs2 - Support: sr #109648, zero byte swap files from vim are...

 
 

sr #109648: zero byte swap files from vim are not being deleted when use_locks 1

Submitter:  trysten <trysten>
Submitted:  Mon 25 Feb 2019 12:33:45 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Need Info
Privacy:  Public Assigned to:  _71007
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 07 Mar 2019 08:25:01 AM UTC, comment #1: 

This looks a communication error between davfs2 and the server about how to lock files. Therefor I need all HTTP-requests and responses.

Please set debug to "most". Then open, edit and close a very small file and send the complete logs. Please avoid any unnecessary file system actions to keep the logs small.

Werner

- <_71007>
Mon 25 Feb 2019 12:33:45 AM UTC, original submission:  

Expected behavior: swap files written by vim will be gone after vim is closed gracefully.

Actual behavior: zero byte swap files seem to stick around.

To replicate:
# mount a webdav (on CPanel on hostgator) using davfs2 1.5.4 and use_locks 1
# open a new file with `vim newfile`, insert something and save with :wq
# note the existence of .newfile.swp and .newfile.swpx zero byte files after vim has closed

Some things I've noticed:

  • The swap files are closed right away by vim and uploaded by davfs2. This makes sense to me, given the purpose of swap files (recovery).
  • Setting `use_locks 0` seems to fix this behavior. I don't understand this which is why I am here. I don't actually need locking for the most part but I'm intensely curious why this is happening and if I can fix it.
  • Maybe slightly related to sr #109594


Attached are davfs logs from the test case (debug locks and debug most) and a strace of vim confirming it is calling unlink('.newfile.swp') when it closes. This is my first sr.

Thanks to wbaumann for maintaining this awesome software!

trysten <trysten>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #46351:  davfs.log added by trysten (137KiB - application/octet-stream)
file #46352:  vim.strace added by trysten (52KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by _71007 (Posted a comment)
  • -email is unavailable- added by trysten (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-07 _71007 StatusNone Need Info
        Assigned toNone _71007
    2019-02-25 trysten Attached File- Added davfs.log, #46351
        Attached File- Added vim.strace, #46352

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code