Comment 15 for bug 2007055

Revision history for this message
Mint Platz (mintplaetzchen) wrote :

Hi Mitchell!

Thanks for getting back to this issue so quickly. Highly appreciated. Meanwhile, I was digging into it a little more and things get even weirder. I created this script to compare the behaviour of Caja vs. cp --preserve vs. rsync --archive:

#!/bin/bash

source=~/Temp/MyFile.bin
target=/media/rn214/user/Temp/MyFile.bin

echo "Source: \"$source\""
rm -f "$source"
touch "$source"
ls -la "$source"
stat "$source"

echo
echo "Sleeping 10s..."
sleep 10

echo
echo "Target (cp): \"$target\""
cp --preserve "$source" "$target"
ls -la "$target"
stat "$target"

rm -f "$target"

echo
echo "Target (rsync): \"$target\""
rsync --archive "$source" "$target"
ls -la "$target"
stat "$target"

This gave me:

user@PCuser:~/Temp$ ./test.sh
Source: "/home/user/Temp/MyFile.bin"
-rw-rw-r-- 1 user user 0 Aug 28 19:02 /home/user/Temp/MyFile.bin
  File: /home/user/Temp/MyFile.bin
  Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 811h/2065d Inode: 19398755 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ user) Gid: ( 1000/ user)
Access: 2023-08-28 19:02:22.496872521 +0200
Modify: 2023-08-28 19:02:22.496872521 +0200
Change: 2023-08-28 19:02:22.496872521 +0200
 Birth: 2023-08-28 19:02:22.496872521 +0200

Sleeping 10s...

Target (cp): "/media/rn214/user/Temp/MyFile.bin"
-rwxrwx--- 1 user user 0 Aug 28 19:02 /media/rn214/user/Temp/MyFile.bin
  File: /media/rn214/user/Temp/MyFile.bin
  Size: 0 Blocks: 0 IO Block: 1048576 regular empty file
Device: 42h/66d Inode: 116707 Links: 1
Access: (0770/-rwxrwx---) Uid: ( 1000/ user) Gid: ( 1000/ user)
Access: 2023-08-28 19:02:22.496872500 +0200
Modify: 2023-08-28 19:02:22.496872500 +0200
Change: 2023-08-28 19:02:32.576703700 +0200
 Birth: 2023-08-28 19:02:32.498947000 +0200

Target (rsync): "/media/rn214/user/Temp/MyFile.bin"
-rwxrwx--- 1 user user 0 Aug 28 19:02 /media/rn214/user/Temp/MyFile.bin
  File: /media/rn214/user/Temp/MyFile.bin
  Size: 0 Blocks: 0 IO Block: 1048576 regular empty file
Device: 42h/66d Inode: 116708 Links: 1
Access: (0770/-rwxrwx---) Uid: ( 1000/ user) Gid: ( 1000/ user)
Access: 2023-08-28 19:02:32.588948900 +0200
Modify: 2023-08-28 19:02:22.496872500 +0200
Change: 2023-08-28 19:02:22.496872500 +0200
 Birth: 2023-08-28 19:02:32.588948900 +0200

Then, I deleted the target file on the SMB share mounted with cifs and used Caja in two-pane-mode to copy the file over:

user@PCuser:~/Temp$ ls -la /media/rn214/user/Temp/MyFile.bin
-rwxrwx--- 1 user user 0 Aug 28 19:02 /media/rn214/user/Temp/MyFile.bin
user@PCuser:~/Temp$ stat /media/rn214/user/Temp/MyFile.bin
  File: /media/rn214/user/Temp/MyFile.bin
  Size: 0 Blocks: 0 IO Block: 1048576 regular empty file
Device: 42h/66d Inode: 116709 Links: 1
Access: (0770/-rwxrwx---) Uid: ( 1000/ user) Gid: ( 1000/ user)
Access: 2023-08-28 19:02:32.512704000 +0200
Modify: 2023-08-28 19:02:22.496872000 +0200
Change: 2023-08-28 19:02:22.496872000 +0200
 Birth: 2023-08-28 19:04:26.731171000 +0200

Looking fine so far. I then grabbed an old movie that I still had locally and repeated the process with Caja.

Source:
  File: /home/user/Movies/Der Pakt mit dem Teufel [1950.GER.H264.AAC.576p].mkv
  Size: 1127457487 Blocks: 2202080 IO Block: 4096 regular file
Device: 811h/2065d Inode: 21897600 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1000/ user) Gid: ( 1000/ user)
Access: 2023-08-28 19:55:25.183641164 +0200
Modify: 2016-03-24 10:43:36.804000000 +0100
Change: 2023-08-27 18:55:46.493351658 +0200
 Birth: 2023-08-23 23:45:53.104421855 +0200

Target:
  File: /media/rn214/Media/Movies/Der Pakt mit dem Teufel
[1950.GER.H264.AAC.576p].mkv
  Size: 1127457487 Blocks: 2202112 IO Block: 1048576 regular file
Device: 40h/64d Inode: 273455 Links: 1
Access: (0770/-rwxrwx---) Uid: ( 1000/ user) Gid: ( 1000/ user)
Access: 2023-08-28 19:55:25.183641000 +0200
Modify: 2016-03-24 10:43:36.804000000 +0100
Change: 2016-03-24 10:43:36.804000000 +0100
 Birth: 2023-08-28 20:08:31.930089800 +0200

And after a second attempt:
  File: /media/rn214/Media/Movies/Der Pakt mit dem Teufel
[1950.GER.H264.AAC.576p].mkv
  Size: 1127457487 Blocks: 2202112 IO Block: 1048576 regular file
Device: 40h/64d Inode: 273468 Links: 1
Access: (0770/-rwxrwx---) Uid: ( 1000/ user) Gid: ( 1000/ user)
Access: 2023-08-28 20:20:53.357481800 +0200
Modify: 2023-08-28 20:20:53.357481800 +0200
Change: 2023-08-28 20:20:53.357481800 +0200
 Birth: 2023-08-28 20:20:42.167925500 +0200

So I sometimes got one and sometimes the other result. Very irritating. There might be some caching going on, it could be a bug or a race condition in cifs/SAMBA and I also can not exclude an issue with the NAS I'm using (Netgear RN214 exposing a SMB share but without enforcing SMB3 transport encryption).

Does that ring any bell with you? I still have an old version of Mint Mate available (19.2 IIRC) and could try to reproduce it there. That would at least open up the opportunity to compare some versions and eventually exclude that the NAS itself is the root cause.