darcs

Issue 430 Pulling to a Samba directory leaves temporary files

Title Pulling to a Samba directory leaves temporary files
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, eivuokko, jaredj, kirby, kowey, markstos, rgm, thorkilnaur, tommy, waern, wglozer
Assigned To
Topics Windows

Created on 2007-04-13.17:01:25 by waern, last changed 2017-07-30.23:36:24 by gh.

Messages
msg1583 (view) Author: waern Date: 2007-04-13.17:01:23
When pulling to a mounted Samba (cifs) directory, the directory is left with
temporary files and a temporary directory called "darcs_testing_nfs".
msg2946 (view) Author: markstos Date: 2008-01-31.03:21:43
I've confirmed this in the sense that I see references to
"darcs_testing_for_nfs" in src/Darcs/CheckFileSystem.lhs, and I see that the
file hasn't changed since this bug was reported. I suspect the issue still exists.
msg2983 (view) Author: droundy Date: 2008-01-31.16:31:42
I'm not sure.  We need someone with a samba directory to test this.
msg6328 (view) Author: kowey Date: 2008-10-16.12:54:35
Some comments by Grant Husbands: 
> We use Darcs over samba (always windows on at least one side, and            
                                                     
> mostly linux on the other side) all the time (since SSH used to be very      
                                                          
> slow) and have never seen a darcs_testing_nfs file or such. There seem       
                                                          
> to be no such files on our primary (linux) samba share for Darcs repos.
msg8238 (view) Author: kowey Date: 2009-08-18.10:17:47
Here's the relevant bit of code that Mark was looking at:

can_I_use_mmap :: IO Bool
can_I_use_mmap = do a <- can_I_remove_open_files
                    if a then can_I_remove_directories_holding_open_files
                         else return False

can_I_remove_directories_holding_open_files :: IO Bool
can_I_remove_directories_holding_open_files = block $
   (do createDirectory "darcs_testing_for_nfs"
       okay <- (withCurrentDirectory "darcs_testing_for_nfs" $
                do withOpenTemp $ \ (_,f) -> 
                       (do removeFile f
                           setCurrentDirectory ".."
                           removeDirectory "darcs_testing_for_nfs"
                           return True
                       ) `catch` \_ -> return False
               ) `catch` \_ -> return True
       removeDirectory "darcs_testing_for_nfs" `catch` \_ -> return ()
       return okay
   ) `catch` \_ -> return True

This code confuses me, but I think somebody else could use it to explain why
exactly this happens.

So we create darcs_testing_nfs, dump a temp file in it, then try to remove the
(open) temp file and the directory.  What's failing and what's being caught?

David (Waern): perhaps you might be interested in playing with this module a bit
and seeing what happens?  If not, maybe Grant/Edwin can shed more light on what
is (supposed to be) happening?
History
Date User Action Args
2007-04-13 17:01:25waerncreate
2008-01-31 03:21:47markstossetstatus: unread -> unknown
nosy: + markstos, wglozer, eivuokko, rgm, jaredj
topic: + Windows, Confirmed
messages: + msg2946
2008-01-31 16:31:43droundysetnosy: droundy, tommy, beschmi, kowey, markstos, wglozer, eivuokko, waern, rgm, jaredj
messages: + msg2983
2008-02-16 21:49:36markstossetstatus: unknown -> deferred
nosy: droundy, tommy, beschmi, kowey, markstos, wglozer, eivuokko, waern, rgm, jaredj
2008-10-16 12:54:37koweysetstatus: deferred -> unknown
nosy: + dmitry.kurochkin, dagit, simon, thorkilnaur
messages: + msg6328
2009-08-06 17:35:59adminsetnosy: + jast, Serware, darcs-devel, zooko, mornfall, - droundy, wglozer, eivuokko, waern, rgm, jaredj
2009-08-06 20:33:03adminsetnosy: - beschmi
2009-08-10 22:02:48adminsetnosy: + wglozer, waern, eivuokko, rgm, jaredj, - darcs-devel, zooko, jast, Serware, mornfall
2009-08-10 23:59:59adminsetnosy: - dagit
2009-08-18 10:17:49koweysetstatus: unknown -> needs-reproduction
nosy: tommy, kowey, markstos, wglozer, eivuokko, simon, waern, rgm, thorkilnaur, jaredj, dmitry.kurochkin
messages: + msg8238
2009-08-25 17:31:16adminsetnosy: + darcs-devel, - simon
2009-08-27 01:35:27koweysettopic: - Confirmed
nosy: + kirby
2009-08-27 14:33:58adminsetnosy: tommy, kowey, markstos, wglozer, darcs-devel, eivuokko, waern, rgm, thorkilnaur, jaredj, dmitry.kurochkin, kirby
2009-10-23 22:41:53adminsetnosy: + robmoss, - rgm
2009-10-24 00:07:42adminsetnosy: + rgm, - robmoss
2017-07-30 23:36:24ghsetstatus: needs-reproduction -> given-up