bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
4.08k stars 229 forks source link

[BUG] unison does not return on "Nothing to do: replicas have not changed since last sync." #950

Closed marcorighi closed 12 months ago

marcorighi commented 1 year ago

Hi, I wrote a script to have on some computer a mutual exclusion on unison execution (the server is very old and I prefer to have only one sync at time).

When there are some changes, the script works very well, if there are not updates, on video I got

Looking for changes
  Waiting for changes from server
Reconciling changes
Nothing to do: replicas have not changed since last sync.

and the script does not return.

Simply the script has these main parts:

syncommand="unison -auto -batch $profileunison -logfile $locallogunison -links true -retry 10"

if the process is the only one to have an access (error=0) to the server it executes


if [ $error -eq 0 ]; then   
    echo "COMMAND " $syncommand |tee -a $localmessagesafterlock 
    messageSubject=$(echo $messageSubject " EXECUTED")
    messageBody="executed $syncommand"
    echo  $messageBody |tee -a $localmessagesafterlock 

    echo $syncommand
    $syncommand
    cat $locallog >> $locallog_verbose
    sendemail=1
fi

Is it a bug? From CLI I have not problem

unison -version
unison version 2.53.3 (ocaml 5.0.0
lsb_release -a
LSB Version:    n/a
Distributor ID: ManjaroLinux
Description:    Manjaro Linux
Release:    23.0.0
Codename:   Uranos

Can you help me?

gdt commented 1 year ago

We have been having problems with people using the bug tracker for help and support requests rather than true bugs. I'd like to ask for your help in figuring out how to improve our documentation.

Did you find the instructions to read https://github.com/bcpierce00/unison/wiki/Reporting-Bugs-and-Feature-Requests before filing a bug? If not, please explain how you got to the bug tracker (and presumably, without seeing the README). If you did, then I wonder how you interpreted it in terms of what is appropriate for the mailnglist vs the bugtracker.

marcorighi commented 1 year ago

The executed command is:

unison -batch ipazia -logfile /home/username/log/unison_ipazia_execution.log -links true -retry 10 -debug all

the file unison_ipazia_execution.log contains only:

Unison 2.53.3 (ocaml 5.0.0) log started at 2023-08-05 at 17:09:20

Roots:
  /home/username/mysyncIP
  ssh://username@xxxx.yyyy.fr:10022//home/username/mysyncIP

On my video appears the log but it is not written in the log file.

the last lines are:

[pred] ignore 'suonerie/tamburo2.mp3' = false
[update] buildUpdateRec: /media/data/users/home/username/mysyncIP/suonerie/tamburo2.mp3
[update] checkContentsChange: archStamp is inode (113908885) / info.inode (113908885) / times: 1690541864.750859 = 1690541864.750859... true / lengths: 25123 - 25123
[xferhint] insertEntry: fspath=/media/data/users/home/username/mysyncIP, path=suonerie/tamburo2.mp3, fp=(69c4652bb9dad10d454ae91a079cd9c5,)
[pred] ignore 'tmp' = false
[update] buildUpdateRec: /media/data/users/home/username/mysyncIP/tmp
[pred] atomic 'tmp' = false
[pred] immutable 'tmp' = false
[pred] ignore 'tmp/TEST' = false
[update] buildUpdateRec: /media/data/users/home/username/mysyncIP/tmp/TEST
[update] checkContentsChange: archStamp is inode (113905687) / info.inode (113905687) / times: 1690540969.796262 = 1690540969.796262... true / lengths: 0 - 0
[xferhint] insertEntry: fspath=/media/data/users/home/username/mysyncIP, path=tmp/TEST, fp=(d41d8cd98f00b204e9800998ecf8427e,)
[update] Setting archive for //i7//media/data/users/home/username/mysyncIP

  Waiting for changes from server
Reconciling changes
[recon] reconcileAll
[recon] reconcile: 0 results
[update] Marking 0 paths equal
[update] Updating archives
[update] Saving archive in /home/username/.unison/sc5be0e7d841b336ba0a89b46e904f0896
[server: update] Saving archive in /home/username/.unison/sc8bfc3d0d433f1b9685fb6c00819ef57b
[update] Copying archive /home/username/.unison/tm5be0e7d841b336ba0a89b46e904f0896 to /home/username/.unison/ar5be0e7d841b336ba0a89b46e904f0896
[server: update] Copying archive /home/username/.unison/tm8bfc3d0d433f1b9685fb6c00819ef57b to /home/username/.unison/ar8bfc3d0d433f1b9685fb6c00819ef57b
[update] Removing archive /home/username/.unison/tm5be0e7d841b336ba0a89b46e904f0896
[server: update] Removing archive /home/username/.unison/tm8bfc3d0d433f1b9685fb6c00819ef57b
Nothing to do: replicas have not changed since last sync.

To stop the process I have to use CTRL-C.

By freezing the CLI I can get the first lines:

unison -batch ipazia -logfile /home/username/log/unison_ipazia_execution.log -links true -retry 10 -debug all
[startup] Preferences:
ui = graphic
listen = 
socket = 
server = false
prefsman = 
prefsdocs = false
doc = 
version = false
i = false
color = default
silent = false
dumbtty = false
testserver = false
rest = ipazia
showprev = false
selftest = false
confirmmerge = false
retry = 10
repeat = 
contactquietly = false
key = 
label = 
expert = false
height = 15
auto = false
maxthreads = 0
maxsizethreshold = -1
prefer = 
force = 
sortnewfirst = false
sortbysize = false
keeptempfilesaftermerge = false
diff = diff -u OLDER NEWER
copyonconflict = false
backupdir = 
maxbackups = 2
backups = false
backupsuffix = 
backupprefix = .bak.$VERSION.
backuploc = central
copymax = 1
copythreshold = -1
copyprogrest = rsync --partial --append-verify --compress
copyprog = rsync --partial --inplace --compress
rsync = true
fastcheck = default
ignorelocks = false
dumparchives = false
showarchive = false
rootsName = 
ignorearchives = false
fastercheckUNSAFE = false
fat = false
allHostsAreRunningWindows = false
someHostIsRunningWindows = false
confirmbigdel = true
batch = true
root = ssh://username@xxxx.yyyy.fr:10022//home/username/mysyncIP
root = /home/username/mysyncIP
killserver = false
halfduplex = false
stream = true
addversionno = false
servercmd = 
sshargs = -C
sshcmd = ssh
xferbycopying = true
clientHostName = i7
ignoreinodenumbers = false
links-aux = true
links = true
acl = false
xattrignore = Regex !(security|trusted)[.].*
xattrignore = Path !system.posix_acl_*
xattrs = false
times = false
group = false
owner = false
numericids = false
dontchmod = false
perms = 1023
watch = false
rsrc-aux = false
rsrc = default
maxerrors = 1
unicodeCS = false
unicodeEnc = false
unicode = default
someHostIsInsensitive = false
ignorecase = default
timers = false
terse = false
logfile = /home/username/log/unison_ipazia_execution.log
log = true
debugtimes = false
debug = all
addprefsto = 

Unison 2.53.3 (ocaml 5.0.0) log started at 2023-08-05 at 17:18:15

Roots:
  /home/username/mysyncIP
  ssh://username@xxxx.yyyy.fr:10022//home/username/mysyncIP

Unison 2.53.3 (ocaml 5.0.0): Contacting server...
[remote] Shell connection: ssh (ssh, -l, username, -p, 10022, ipazia.duckdns.org, -e, none, -C, unison, -server, __new-rpc-mode)

Unison 2.53.3 (ocaml 5.0.0): Contacting server...
[remote] Shell connection: ssh (ssh, -l, username, -p, 10022, ipazia.duckdns.org, -e, none, -C, unison, -server, __new-rpc-mode)
X11 forwarding request failed on channel 0
[remote] Selected RPC version: 1
[features] Supported features:
  - Sync: ACL
  - Sync: xattr
[features] Common features for root /media/data/users/home/username/mysyncIP:
  - Sync: ACL
  - Sync: xattr
[features] Common features for root //ipazia//media/data/users/home/username/mysyncIP:
  - Sync: ACL
  - Sync: xattr
[features] Enabled features:
  - Sync: ACL
  - Sync: xattr
Connected [//i7//media/data/users/home/username/mysyncIP -> //ipazia//media/data/users/home/username/mysyncIP]

[startup] Roots: 
        /home/username/mysyncIP
        ssh://username@xxxx.yyyy.fr:10022//home/username/mysyncIP
  i.e. 
        /home/username/mysyncIP
        ssh://username@xxxx.yyyy.fr:10022//home/username/mysyncIP
  i.e. (in canonical order)
       /media/data/users/home/username/mysyncIP
       //ipazia//media/data/users/home/username/mysyncIP

[globals] Checking path '' for expansions
[props] Setting permission mask to 1777 (1777 and 7777)
[stasher] initBackupsLocal
[stasher] d = /
[stasher] Prefix and suffix regexps for backup filenames have been updated
[server: stasher] initBackupsLocal
[server: stasher] d = /
[server: stasher] Prefix and suffix regexps for backup filenames have been updated
Looking for changes
[ui] temp: Globals.paths = 
[pred] ignore '' = false
[update] Loading archive from /home/username/.unison/ar5be0e7d841b336ba0a89b46e904f0896
[server: update] Loading archive from /home/username/.unison/ar8bfc3d0d433f1b9685fb6c00819ef57b

Do you consider this a bug?

Best

gdt commented 1 year ago

We have been having problems with people using the bug tracker for help and support requests rather than true bugs. I'd like to ask for your help in figuring out how to improve our documentation.

Did you find the instructions to read https://github.com/bcpierce00/unison/wiki/Reporting-Bugs-and-Feature-Requests before filing a bug? If not, please explain how you got to the bug tracker (and presumably, without seeing the README). If you did, then I wonder how you interpreted it in terms of what is appropriate for the mailnglist vs the bugtracker.