unison incompatible with older ubuntu/debian versions

Bug #1568459 reported by Hadmut Danisch
144
This bug affects 24 people
Affects Status Importance Assigned to Milestone
unison (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Hi,

16.04 comes with a new version of unison, which is great.

Unfortunately, it comes just with that new version, not older ones. Unison can synchronize only with precisely the same version on the peer, not interact with others. Therefore a 16.04 machine cannot sync to any older linux (ubuntu,debian,...), especially not to servers running 14.04.

Older versions of ubuntu therefore came with different versions of unison, i.e. at least the version of the last LTS version to keep it functional and to have new clients work with older (but still supported) LTS servers.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: unison 2.48.3-1ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-18.34-generic 4.4.6
Uname: Linux 4.4.0-18-generic x86_64
ApportVersion: 2.20.1-0ubuntu1
Architecture: amd64
CurrentDesktop: LXDE
Date: Sun Apr 10 10:20:04 2016
Dependencies:
 gcc-6-base 6-20160405-0ubuntu1
 libc6 2.23-0ubuntu2
 libgcc1 1:6-20160405-0ubuntu1
SourcePackage: unison
UpgradeStatus: Upgraded to xenial on 2016-04-06 (4 days ago)

Revision history for this message
Hadmut Danisch (hadmut) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unison (Ubuntu):
status: New → Confirmed
Changed in unison (Ubuntu):
importance: Undecided → Medium
importance: Medium → High
Revision history for this message
Adrian Simmons (adrinux) wrote :

Ubuntu Gnome has unison-all and unison-all-gtk packages with supposedly include the older version, but even installing these doesn't seem to fix this problem.

Revision history for this message
Jure Sah (dustwolfy) wrote :

This bug can be worked around by installing the packages for 15.10. The packages have no dependencies and install just fine with:

$ sudo dpkg -i

For example use:
* unity-gtk AMD64: https://launchpad.net/ubuntu/+archive/primary/+files/unison-gtk_2.40.102-2ubuntu1_amd64.deb
* unity-gtk i386: https://launchpad.net/ubuntu/+archive/primary/+files/unison-gtk_2.40.102-2ubuntu1_i386.deb

Revision history for this message
buhtz (buhtz) wrote :

No this doesn't fix the problem in all cases.

Keep in mind that the used Ocaml-compiler version behind it is vey important. It need to be the same, too!
If not unison throw exceptions in some cases - not everytime.

The problem (where the developers currently workin on) is that unison doesn't check the ocaml version of its remote.

e.g. You can have the same unison versions from Ubuntu Xenial and Debian unstable but they don't work together because of that ocaml version difference.

Revision history for this message
Andreas L (avl42) wrote :

If the unison *protocol* depends on the ocaml-version that seems like a bug to me - it's like as if the plain http depended on the c-compiler that compiled the browser... :-(

Revision history for this message
Benjamin Pierce (bcpierce) wrote : Re: [Bug 1568459] Re: unison incompatible with older ubuntu/debian versions

The protocol uses OCaml’s marshalling library to bundle up complex data structures into compact binary objects for transfer over the wire. Between 4.02.1 and 4.02.2 there was an incompatible change in this library. This is the first time this has happened, and I hope it will be the last.

    - B

> On Jun 1, 2016, at 5:38 AM, Andreas L <email address hidden> wrote:
>
> If the unison *protocol* depends on the ocaml-version that seems like a
> bug to me - it's like as if the plain http depended on the c-compiler
> that compiled the browser... :-(
>
> --
> You received this bug notification because you are subscribed to unison
> in Ubuntu.
> https://bugs.launchpad.net/bugs/1568459
>
> Title:
> unison incompatible with older ubuntu/debian versions
>
> Status in unison package in Ubuntu:
> Confirmed
>
> Bug description:
> Hi,
>
> 16.04 comes with a new version of unison, which is great.
>
> Unfortunately, it comes just with that new version, not older ones.
> Unison can synchronize only with precisely the same version on the
> peer, not interact with others. Therefore a 16.04 machine cannot sync
> to any older linux (ubuntu,debian,...), especially not to servers
> running 14.04.
>
> Older versions of ubuntu therefore came with different versions of
> unison, i.e. at least the version of the last LTS version to keep it
> functional and to have new clients work with older (but still
> supported) LTS servers.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 16.04
> Package: unison 2.48.3-1ubuntu1
> ProcVersionSignature: Ubuntu 4.4.0-18.34-generic 4.4.6
> Uname: Linux 4.4.0-18-generic x86_64
> ApportVersion: 2.20.1-0ubuntu1
> Architecture: amd64
> CurrentDesktop: LXDE
> Date: Sun Apr 10 10:20:04 2016
> Dependencies:
> gcc-6-base 6-20160405-0ubuntu1
> libc6 2.23-0ubuntu2
> libgcc1 1:6-20160405-0ubuntu1
> SourcePackage: unison
> UpgradeStatus: Upgraded to xenial on 2016-04-06 (4 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/unison/+bug/1568459/+subscriptions

Revision history for this message
Paul Beardsell (paul-beardsell) wrote :

This bug affects 16.10 also.

Revision history for this message
Paul Beardsell (paul-beardsell) wrote :

I confirm that installing the previous version from the dpkg works just fine in 16.04 despite what is reported about incompatible ocaml versions. I'm using unison to sync various debian-derived machines, some on Ubuntu 14.04, some on 16.04 and some on various Debians and Raspbian too.

Revision history for this message
Mark Foster (fostermarkd) wrote :

How about just add the 2.48 version in {xenial,yakkety,zesty}-backports?

Revision history for this message
Paul Beardsell (paul-beardsell) wrote :

Many Debian and Ubuntu versions e.g. Ubuntu Trusty don't have that version
available. Raspbian Wheezy neither. But those are just examples. Unison is
intended to allow for sync-ing of directories over multiple platforms,
Windows included. As a minimum 2.40 needs to be everywhere, but 2.32 would
also be useful.

<email address hidden>

On 5 February 2017 at 01:24, Mark Foster <mark@g.foster.cc> wrote:

> How about just add the 2.48 version in {xenial,yakkety,zesty}-backports?
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1642079).
> https://bugs.launchpad.net/bugs/1568459
>
> Title:
> unison incompatible with older ubuntu/debian versions
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/unison/+bug/
> 1568459/+subscriptions
>

Revision history for this message
Todd Taft (taft) wrote :

Problem is still present in 18.04
The unison-all and unison-all-gtk have no real content. The only thing in them is the copyright file and a changelog file that indicates that old versions were removed. This contradicts the package description which says that it install multiple supported versions in order to sync with older systems.

Revision history for this message
Paul Beardsell (paul-beardsell) wrote :

I confirm Todd Taft's report - this is still an issue in 18.04. The whole purpose of having Unison as a Debian/Ubuntu package is to provide the function that Unison is meant for - to allow syncing of files across not only multiple machines, but multiple versions of an o/s and between versions of o/s, current and old. This is not the case with Unison on Ubuntu. It's the death of Unison - eventually - if unison-all does not include support for unison as installed on heterogenous and old hardware, other o/s.

Revision history for this message
Paul Beardsell (paul-beardsell) wrote :

Problem is still present in 18.10

Revision history for this message
matlantis (matlantis) wrote :

In kubuntu 20.04 beta from today I have the problem that can't synchronize to 18.04s unison, despite the fact, that both system run unison in the same version 2.48.4.

Fatal error: Server: Fatal error during unmarshaling (input_value: ill-formed message),
possibly because client and server have been compiled with differentversions of the OCaml compiler.

Revision history for this message
Andrew Piskorski (atp) wrote :

Still the same problem in Ubuntu 19.10! And from the comment above, 20.04 as well. What is the best workaround for this?

Revision history for this message
Andrew Piskorski (atp) wrote :

For me on Ubuntu 19.10, the best workaround seems to be to copy its newer unison-2.48.4 to my old Ubuntu 14.04 machine (and put it into /usr/local/bin/). Then on my 19.10 machine, I simply add this line to the *.prf config file I'm using:

  servercmd = unison-2.48.4

Alternatively, the ancient Unison binaries do still work on Ubuntu 19.10 (yay!), so I can run those when necessary to talk to an old stock system.

More details on the specific combinations that seem to work vs. break:

Ubuntu 19.10 appears to run these ancient binaries just fine:

- unison-2.40.102-gtk, from the Ubuntu 14.04.4 LTS package
  unison-gtk_2.40.102-2ubuntu1_amd64.deb;
  it talks to the stock unison unning on Ubuntu 14.04.4.

- unison-2.32.52-gtk, from the Ubuntu 14.04.4 LTS package
  unison2.32.52-gtk_2.32.52-7ubuntu1_amd64.deb;
  it talks to the stock unison running on Ubuntu 10.04.4 LTS.

Ubuntu 14.04.4 appears to run this NEWER binary fine:

- unison-2.48.4, from the Ubuntu 19.10 package unison_2.48.4-1ubuntu1_amd64.deb

Ubuntu 10.04.4 LTS will NOT run these NEWER binaries at all:

- unison-2.48.4, from Ubuntu 19.10.
- unison-2.40.102, from Ubuntu 10.04.4 LTS.

$ unison-2.48.4
unison-2.48.4: /lib/libc.so.6: version `GLIBC_2.15' not found (required by unison-2.48.4)
unison-2.48.4: /lib/libc.so.6: version `GLIBC_2.14' not found (required by unison-2.48.4)
unison-2.48.4: /lib/libc.so.6: version `GLIBC_2.17' not found (required by unison-2.48.4)

$ unison-2.40.102
unison-2.40.102: /lib/libc.so.6: version `GLIBC_2.15' not found (required by unison-2.40.102)
unison-2.40.102: /lib/libc.so.6: version `GLIBC_2.14' not found (required by unison-2.40.102)

Revision history for this message
Andrew Piskorski (atp) wrote :

So this whole bug is clearly just a packaging problem! The old compiled binaries still run on newer Ubuntu machines, so the easiest step to fix this bug is to simply add those old binaries to the unison-all and unison-all-gtk packages, which currently are empty and useless.

It would be nice to also backport the latest Unison to the old systems, but presumably that would be more work.

Revision history for this message
bacchus (sebastian-hanss) wrote :

The unison binary from 18.04 (unison-2.48.4-gtk) does not run on my 20.04 machine:

'''
Fatal error

Uncaught exception Failure("input_value: ill-formed message")
Raised at file "/build/unison-Y9EcQW/unison-2.48.4/lwt/lwt.ml", line 126, characters 16-23
Called from file "/build/unison-Y9EcQW/unison-2.48.4/lwt/generic/lwt_unix_impl.ml", line 102, characters 8-23
Called from file "/build/unison-Y9EcQW/unison-2.48.4/update.ml" (inlined), line 2096, characters 2-69
Called from file "/build/unison-Y9EcQW/unison-2.48.4/uigtk2.ml", line 3372, characters 20-75
Called from file "/build/unison-Y9EcQW/unison-2.48.4/uigtk2.ml", line 3381, characters 16-32
Called from file "/build/unison-Y9EcQW/unison-2.48.4/uigtk2.ml", line 156, characters 18-22
Called from file "/build/unison-Y9EcQW/unison-2.48.4/uigtk2.ml", line 3919, characters 4-37
Called from file "/build/unison-Y9EcQW/unison-2.48.4/uigtk2.ml", line 4276, characters 4-16
'''

Nor does the newer version run on 18.04:

'''
unison-2.48.4-gtk: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by unison-2.48.4-gtk)
unison-2.48.4-gtk: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by unison-2.48.4-gtk)
'''

Any ideas for a workaround?

Revision history for this message
Andrew Piskorski (atp) wrote :

Interesting. Thanks for the heads up, bacchus. I'm not on 20.04 yet, but plan to upgrade soon. If I get the same symptoms as you, I'll probably try recompiling Unison from source. (I hear it's in OCaml, and that the specific compiler version can matter.)

Revision history for this message
Timothy Allen (tim-treehouse) wrote :

Just as a note on recompiling, I have tried to build a statically-linked binary on Ubuntu 19.10 (with OCaml 4.05.0) and run it on 20.04; it yields the same errors as the dynamically-linked 19.10 binary when run on 20.04:

Unison failed: Uncaught exception Failure("input_value: ill-formed message")
Raised at file "/tmp/unison-2.48.4/lwt/lwt.ml", line 135, characters 6-13
Called from file "list.ml", line 85, characters 12-15
Called from file "/tmp/unison-2.48.4/lwt/lwt.ml", line 31, characters 2-37
Called from file "/tmp/unison-2.48.4/lwt/lwt.ml" (inlined), line 83, characters 17-46
Called from file "/tmp/unison-2.48.4/lwt/generic/lwt_unix_impl.ml", line 55, characters 6-23
Called from file "/tmp/unison-2.48.4/lwt/generic/lwt_unix_impl.ml", line 147, characters 6-40
Called from file "/tmp/unison-2.48.4/main.ml", line 202, characters 6-24
Called from file "/tmp/unison-2.48.4/main.ml", line 131, characters 4-9

Perhaps someone more experienced with OCaml can add some insight.

I have added this information to the upstream bug report at <https://github.com/bcpierce00/unison/issues/334>. We may need to open a new bug, though, since this doesn't appear to be a packaging issue.

Revision history for this message
twin (twin) wrote :

I had the same problem as reported in #21. The solution was to delete a cache file (fp...) in the .unison directory.
If you run unison with '-debug all', it should log the offending cache file right before it reports the exception (at least it did for me).

Revision history for this message
Daniel (hackie) wrote :

Same Problem after upgrading to 20.04 LTS:

server:
  unison version 2.48.4
  Ubuntu 18.04 bionic
  ii unison 2.48.4-1ubuntu1 amd64

client:
  unison version 2.48.4
  Ubuntu 20.04 LTS focal
  ii unison 2.48.4-4ubuntu1

Failed: Server: Fatal error during unmarshaling (input_value: ill-formed message),
possibly because client and server have been compiled with differentversions of the OCaml compiler.

It worked before (Client was Ubuntu 18.04 and 18.10)

This is a real show-stopper. It's not possible to fix this with a new protocol version?

Revision history for this message
Marco van Beek (mvanbeek) wrote :

"This is a real show-stopper. It's not possible to fix this with a new protocol version?"

I think the problem is really, why should different versions of a multi-part solution break a system, and the answer is they shouldn't, at least not between minor versions and ideally all versions should be backwards compatible for at least a few major versions.

Unison is a great program until you want to run it on different systems, and let's face it, none of us want to build from source if there is a compiled package already available. We don't always have a choice in when different machines are upgraded, even updating might need a server restart that you can't do until the weekend but the desktops are all done the same day.

It's a fundamental design flaw. It should be backwardly compatible. Software should ALWAYS be backwardly compatible within minor updates, let alone major ones.

Revision history for this message
Mick (mick-sulley) wrote :

This may help.
After upgrading my Desktop from Mint19 to Mint20 I could not get unison
file sync working to my Ubuntu Server. With some help from the guys on
the GitHub issues list I have now fixed it. Apparently unison for
Ubuntu19 and Mint20 are compiled differently, and even though they are
both version 2.48.4 they are compiled with different releases of OCaml,
which makes them incompatible.
This is what I did -
Remove all traces of unison
then run
wget http://mirrors.kernel.org/ubuntu/pool/universe/u/unison/unison_2.48.4-1ubuntu1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/universe/u/unison/unison-gtk_2.48.4-1ubuntu1_amd64.deb
sudo dpkg -r unison this removes the old install
sudo dpkg -i unison_2.48.4-1ubuntu1_amd64.deb
sudo dpkg -i unison-gtk_2.48.4-1ubuntu1_amd64.deb
sudo apt-mark hold unison this stops it updating
sudo apt-mark hold unison-gtk

This is not a proper solution it is just a fix, but it did get me out of a hole :)
Mick

Revision history for this message
codywohlers (codywohlers) wrote :

20.04 unison package issues should probably be talked about in bug 1875475
https://bugs.launchpad.net/ubuntu/+source/unison/+bug/1875475

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.