Package: unison Version: 2.48.3-1 Severity: important Dear Maintainer,
* What led up to the situation? I tried to sync using unison between an up-to-date Debian stretch and a Ubuntu xenial host, both have the same unison version: Debian: ii unison 2.48.3-1 amd64 file-synchronization tool for Unix and Windows Ubuntu: ii unison 2.48.3-1ubuntu1 amd64 file-synchronization tool for Unix and Windows I discovered that the Debian side crashes whenever a file with size 701 bytes or bigger has to be transferred from debian to ubuntu. The error does NOT appear if the file on the other side doesn't exist yet. The error also doesn't appear if both systems are Ubuntu or if both are Debian. == Here is a test matrix: == debian file =700 bytes =701 bytes ubuntu file =700 bytes d->u ok, u->d ok d->u ok, u->d ok =701 bytes d->u ok, u->d ok d->u err, u->d ok explanation: d->u means transfer from debian to ubuntu, no matter which side runs unison, only the final direction of the file transfer is relevant, see logs below. == Error log when running on Debian side: == synctest@debian:~$ unison myfolder/ ssh://$remoteip/myfolder/ Contacting server... Connected [//debian//home/synctest/myfolder -> //ubuntu//home/synctest/myfolder] Looking for changes Waiting for changes from server Reconciling changes local ubuntu changed ====> changed testfile [] > Proceed with propagating updates? [] y Propagating updates UNISON 2.48.3 started propagating changes at 13:31:35.72 on 01 May 2016 [BGN] Updating file testfile from /home/synctest/myfolder to //ubuntu//home/synctest/myfolder Uncaught exception Failure("input_value: bad bigarray kind") Raised by primitive operation at file "/tmp/buildd/unison-2.48.3/remote.ml", line 453, characters 18-45 Called from file "/tmp/buildd/unison-2.48.3/remote.ml", line 459, characters 23-61 Called from file "/tmp/buildd/unison-2.48.3/lwt/lwt.ml", line 75, characters 20-23 Re-raised at file "/tmp/buildd/unison-2.48.3/lwt/lwt.ml", line 135, characters 12-13 Called from file "list.ml", line 73, characters 12-15 Called from file "/tmp/buildd/unison-2.48.3/lwt/lwt.ml", line 31, characters 2-37 Called from file "/tmp/buildd/unison-2.48.3/lwt/lwt.ml", line 83, characters 17-46 Called from file "/tmp/buildd/unison-2.48.3/lwt/generic/lwt_unix_impl.ml", line 147, characters 6-40 Called from file "/tmp/buildd/unison-2.48.3/uitext.ml", line 490, characters 2-113 Called from file "/tmp/buildd/unison-2.48.3/uitext.ml", line 556, characters 38-66 Called from file "/tmp/buildd/unison-2.48.3/uitext.ml", line 718, characters 6-47 Called from file "/tmp/buildd/unison-2.48.3/uitext.ml", line 788, characters 6-90 Called from file "/tmp/buildd/unison-2.48.3/uitext.ml", line 810, characters 19-66 Called from file "/tmp/buildd/unison-2.48.3/uitext.ml", line 870, characters 21-43 == Error log when running on Ubuntu side: == synctest@ubuntu:~$ unison myfolder/ ssh://$remoteip/myfolder/ Contacting server... Connected [//debian//home/synctest/myfolder -> //ubuntu//home/synctest/myfolder] Looking for changes Waiting for changes from server Reconciling changes local debian changed <==== changed testfile [] < Proceed with propagating updates? [] y Propagating updates UNISON 2.48.3 started propagating changes at 13:32:41.51 on 01 May 2016 [BGN] Updating file testfile from //debian//home/synctest/myfolder to /home/synctest/myfolder Unison failed: Uncaught exception Failure("input_value: bad bigarray kind") Raised by primitive operation at file "/tmp/buildd/unison-2.48.3/remote.ml", line 453, characters 18-45 Called from file "/tmp/buildd/unison-2.48.3/remote.ml", line 459, characters 23-61 Called from file "/tmp/buildd/unison-2.48.3/lwt/lwt.ml", line 75, characters 20-23 Re-raised at file "/tmp/buildd/unison-2.48.3/lwt/lwt.ml", line 135, characters 12-13 Called from file "list.ml", line 73, characters 12-15 Called from file "/tmp/buildd/unison-2.48.3/lwt/lwt.ml", line 31, characters 2-37 Called from file "/tmp/buildd/unison-2.48.3/lwt/lwt.ml", line 83, characters 17-46 Called from file "/tmp/buildd/unison-2.48.3/lwt/generic/lwt_unix_impl.ml", line 147, characters 6-40 Called from file "/tmp/buildd/unison-2.48.3/main.ml", line 202, characters 6-24 Called from file "/tmp/buildd/unison-2.48.3/main.ml", line 131, characters 4-9 Fatal error: Lost connection with the server ^^^ you can see, Ubuntu only crashes because the remote side aborts the connection == How to reproduce == I used docker to reproduce this bug. Using the following commands in two separate terminals: # one of the following for each terminal docker run -h debian -ti debian:stretch docker run -h ubuntu -ti ubuntu:xenial # inside docker as root, in both terminals (environment preparation) apt-get update apt-get install -y unison apt-get install -y openssh-server iproute /etc/init.d/ssh restart adduser synctest su - synctest # now as user synctest, still inside docker (again environment preparation) ip a # or: ip a | grep 'scope global eth0' | awk '{print $2}' | cut -d/ -f1 remoteip= #<- enter remote IP here mkdir myfolder touch myfolder/file-$$ ssh-keygen ssh-copy-id $remoteip ssh $remoteip "hostname ; echo ok" unison -version # both report as: unison version 2.48.3 # now, in one terminal, call unison once to initialize the db: unison myfolder/ ssh://$remoteip/myfolder/ # for testing, you can now call the following commands (dd on both sides, unison on one side): dd if=/dev/urandom of=myfolder/testfile bs=701 count=1 unison myfolder/ ssh://$remoteip/myfolder/ -- System Information: Debian Release: stretch/sid APT prefers testing-updates APT policy: (500, 'testing-updates'), (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 4.4.0-21-generic (SMP w/8 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash Init: unable to detect Versions of packages unison depends on: ii libc6 2.22-5 Versions of packages unison recommends: ii openssh-client [ssh-client] 1:7.2p2-4 Versions of packages unison suggests: pn unison-all <none> -- no debconf information