Loading ...
Sorry, an error occurred while loading the content.

Re: [unison-users] Unable to synchronize between Debian/Archlinux: Internal error [1 Attachment]

Expand Messages
  • Alexander Neumann
    Hi, ... That is correct. ... Uh, that s really bad, as it breaks syncing with (appearently) the same version of unison in an ugly way without any obvious
    Message 1 of 11 , Sep 17, 2012
    View Source
    • 0 Attachment
      Hi,

      * Jerome Vouillon <Jerome.Vouillon@...> wrote:
      > On Sun, Sep 16, 2012 at 05:10:53PM +0200, Alexander Neumann wrote:
      > > Fatal error: Internal error: New archives are not identical.
      > > Retaining original archives. Please run Unison again to bring them up to date.
      > I suspect Archlinux has already switched to OCaml 4.

      That is correct.

      > There is an incompatibility between OCaml 3 and OCaml 4 which results in
      > this error message. (Unison ends up using two distinct hash functions to
      > compare the archives and thus wrongly believes that the archives are not
      > identical.) The workaround is to use a Unison binary compiled with the
      > same version of OCaml on both machines.

      Uh, that's really bad, as it breaks syncing with (appearently) the same
      version of unison in an ugly way without any obvious causes.

      Are there any plans for mitigating this? For example, a good mitigation seems
      to be releasing a new version of unison which uses the same (old) hash
      function. The hash seems to be used only for identifying archives and this
      way seems to be not security relevant. This way installations using the old
      OCaml3 can still be synced. As OCaml4 gets wider use in the next months,
      maybe even add a FAQ entry (at least I invested several hours researching
      this problem ;)

      Thanks for your reply,
      - Alex
    • Jerome Vouillon
      Hi, ... I suspect Archlinux has already switched to OCaml 4. There is an incompatibility between OCaml 3 and OCaml 4 which results in this error message.
      Message 2 of 11 , Sep 17, 2012
      View Source
      • 0 Attachment
        Hi,

        On Sun, Sep 16, 2012 at 05:10:53PM +0200, Alexander Neumann wrote:
        > I am a happy unison user for more than seven year (using Debian Linux).
        > Yesterday I gave Archlinux a try and discovered that I seem to be unable to
        > sync directories between my new Archlinux workstation and a server running
        > Debian Linux. Even the latest version (2.40.65) running at both ends does
        > not solve my problem. Copying and running the binary from Debian on my
        > Archlinux machine works, so I think the identification of the machines
        > via host names works correctly.

        > Fatal error: Internal error: New archives are not identical.
        > Retaining original archives. Please run Unison again to bring them up to date.

        I suspect Archlinux has already switched to OCaml 4. There is an
        incompatibility between OCaml 3 and OCaml 4 which results in this
        error message. (Unison ends up using two distinct hash functions to
        compare the archives and thus wrongly believes that the archives are
        not identical.) The workaround is to use a Unison binary compiled with
        the same version of OCaml on both machines.

        Thanks for your report!

        -- Jerome
      • Benjamin C. Pierce
        Yes, we re working on this. Jérome just committed a new version of the stable Unison release (2.40) that will work with any combination of OCaml versions on
        Message 3 of 11 , Sep 17, 2012
        View Source
        • 0 Attachment
          Yes, we're working on this. Jérome just committed a new version of the stable Unison release (2.40) that will work with any combination of OCaml versions on the two sides (and will also work if one side is an older 2.40 binary).

          I'm going to wait a bit before making it the official stable copy, but if you want to try it out now, you can grab it like this:

          svn co https://webdav.seas.upenn.edu/svn/unison/branches/2.40

          Best,

          - Benjamin


          On Sep 17, 2012, at 3:29 AM, Alexander Neumann wrote:

          > Hi,
          >
          > * Jerome Vouillon <Jerome.Vouillon@...> wrote:
          >> On Sun, Sep 16, 2012 at 05:10:53PM +0200, Alexander Neumann wrote:
          >>> Fatal error: Internal error: New archives are not identical.
          >>> Retaining original archives. Please run Unison again to bring them up to date.
          >> I suspect Archlinux has already switched to OCaml 4.
          >
          > That is correct.
          >
          >> There is an incompatibility between OCaml 3 and OCaml 4 which results in
          >> this error message. (Unison ends up using two distinct hash functions to
          >> compare the archives and thus wrongly believes that the archives are not
          >> identical.) The workaround is to use a Unison binary compiled with the
          >> same version of OCaml on both machines.
          >
          > Uh, that's really bad, as it breaks syncing with (appearently) the same
          > version of unison in an ugly way without any obvious causes.
          >
          > Are there any plans for mitigating this? For example, a good mitigation seems
          > to be releasing a new version of unison which uses the same (old) hash
          > function. The hash seems to be used only for identifying archives and this
          > way seems to be not security relevant. This way installations using the old
          > OCaml3 can still be synced. As OCaml4 gets wider use in the next months,
          > maybe even add a FAQ entry (at least I invested several hours researching
          > this problem ;)
          >
          > Thanks for your reply,
          > - Alex
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
        • Alexander Neumann
          Hi, ... Great, this one works when compiled with OCaml4. A PKGBUILD file for Archlinux is attached (derived from the unison-svn PKGBUILD). Thanks, - Alex
          Message 4 of 11 , Sep 17, 2012
          View Source
          • 1 Attachment
          • 949 Bytes
          Hi,

          * Benjamin C. Pierce <bcpierce@...> wrote:
          > [...]
          > I'm going to wait a bit before making it the official stable copy, but if
          > you want to try it out now, you can grab it like this:
          > svn co https://webdav.seas.upenn.edu/svn/unison/branches/2.40

          Great, this one works when compiled with OCaml4. A PKGBUILD file for
          Archlinux is attached (derived from the unison-svn PKGBUILD).

          Thanks,
          - Alex
        • Hartmut "hase" Semken
          I ran into a similar problem with macports (ocaml 4) and Ubuntu (ocaml 3). but I found the sync itself to work, just the archives were never updated, because
          Message 5 of 11 , Sep 18, 2012
          View Source
          • 0 Attachment
            I ran into a similar problem with macports (ocaml 4) and Ubuntu (ocaml 3).

            but I found the sync itself to work, just the archives were never
            updated, because the hash function used for comparing the archive files
            was different on both ends.

            did you see other problems as well?

            I think the rsync algorithm is broken when using ocaml 4.

            hase
          • Alexander Neumann
            Hi, ... Interesting. I observed that unison exits right after checking for changed/new/deleted files locally and on the server, before any sync is performed.
            Message 6 of 11 , Sep 18, 2012
            View Source
            • 0 Attachment
              Hi,

              * Hartmut "hase" Semken <hase@...> wrote:
              > I ran into a similar problem with macports (ocaml 4) and Ubuntu (ocaml 3).
              > but I found the sync itself to work, just the archives were never
              > updated, because the hash function used for comparing the archive files
              > was different on both ends.

              Interesting. I observed that unison exits right after checking for
              changed/new/deleted files locally and on the server, before any sync is
              performed.

              > did you see other problems as well?

              Nop, as it exits rather early in the program flow. The new version (from
              svn, as indicated in the other replies) works flawlessly.

              > I think the rsync algorithm is broken when using ocaml 4.

              Why do you think that?

              Regards,
              - Alexander
            • Jerome Vouillon
              Hi, ... That s the same issue. The Mac OS graphic UI will only save the archive after synchronization. The text UI will also save the archive just after update
              Message 7 of 11 , Sep 18, 2012
              View Source
              • 0 Attachment
                Hi,

                On Tue, Sep 18, 2012 at 06:14:34PM +0200, Alexander Neumann wrote:
                > * Hartmut "hase" Semken <hase@...> wrote:
                > > I ran into a similar problem with macports (ocaml 4) and Ubuntu (ocaml 3).
                > > but I found the sync itself to work, just the archives were never
                > > updated, because the hash function used for comparing the archive files
                > > was different on both ends.
                >
                > Interesting. I observed that unison exits right after checking for
                > changed/new/deleted files locally and on the server, before any sync is
                > performed.

                That's the same issue. The Mac OS graphic UI will only save the
                archive after synchronization. The text UI will also save the
                archive just after update detection, and thus fails sooner.

                > > I think the rsync algorithm is broken when using ocaml 4.

                Indeed, it is broken on Mac OS for files larger than 175K. This is due
                to a bug in OCaml 4. (The bug is also in MacPorts since March.)

                -- Jerome
              • Hartmut "hase" Semken
                ... Excellent news, thank you. Well, of course, broken is not ideal, but it is great that you could trace it. Now, lets see, how do I revert to ocaml 3? ...
                Message 8 of 11 , Sep 18, 2012
                View Source
                • 0 Attachment
                  Am 18.09.12 20:48, schrieb Jerome Vouillon:
                  >
                  >>> I think the rsync algorithm is broken when using ocaml 4.
                  > Indeed, it is broken on Mac OS for files larger than 175K. This is due
                  > to a bug in OCaml 4. (The bug is also in MacPorts since March.)

                  Excellent news, thank you.
                  Well, of course, "broken" is not ideal, but it is great that you could
                  trace it.

                  Now, lets see, how do I revert to ocaml 3? ...

                  Well, I'll figure something out.

                  merci!
                  hase
                • Jerome Vouillon
                  ... You can disable rsync for now. I have submitted a bug report, with a patch that fixes the issue: http://caml.inria.fr/mantis/view.php?id=5761 So, this
                  Message 9 of 11 , Sep 19, 2012
                  View Source
                  • 0 Attachment
                    On Tue, Sep 18, 2012 at 10:32:49PM +0200, Hartmut "hase" Semken wrote:
                    > Am 18.09.12 20:48, schrieb Jerome Vouillon:
                    > >
                    > >>> I think the rsync algorithm is broken when using ocaml 4.
                    > > Indeed, it is broken on Mac OS for files larger than 175K. This is due
                    > > to a bug in OCaml 4. (The bug is also in MacPorts since March.)
                    >
                    > Excellent news, thank you.
                    > Well, of course, "broken" is not ideal, but it is great that you could
                    > trace it.

                    You can disable rsync for now.

                    I have submitted a bug report, with a patch that fixes the issue:

                    http://caml.inria.fr/mantis/view.php?id=5761

                    So, this should be fixed in the next OCaml release, which should
                    happen soon.

                    -- Jerome
                  Your message has been successfully submitted and would be delivered to recipients shortly.