Project

General

Profile

Bug #20471

Updated by budiljak (Benjamin Udiljak) about 1 month ago

Hi,  

 in my Rails application I have the requirement to create a file and copy it to another place on the same windows share. But if I write the file with `File` class and try to copy it with `FileUtils.cp` it hangs indefinitely without any error message. I can't even kill the ruby process.   

 You can easily reproduce the bug by entering this in IRB: 

 ``` 
 filename = "/mnt/windows_share/abc"; File.open(filename, 'wb') { |f| f.write("123" * 1000) }; FileUtils.cp(filename, filename + "d") 
 ``` 

 I tested this on a Ubuntu 22.04 server in the AWS cloud.  

 I also tried `f.fsync` , `f.fdatasync` , `f.flush`, but it didn't help.  

 Probably it's a problem in connection with the `cifs-utils` package. The negotiated SMB protocol version for the mount is `3.1.1`. 

 Please come back to me if you need further information.  

 Regards!  
 Ben 

 EDIT: 

 I tried mounting the same windows share on my local Ubuntu 22 and the same example works. Even with the same ruby version. So maybe the problem is rather connected to the special AWS Ubuntu kernel. Hard to tell...

Back