From frederik at ofb.net Fri Jul 10 14:30:53 2015 From: frederik at ofb.net (Frederik Eaton) Date: Fri, 10 Jul 2015 11:30:53 -0700 Subject: [Unison-hackers] (resend) merge of single-file roots triggers assertion failure, tested versions 2.40.65 and 2.48.3 Message-ID: <20150710183053.GA19883@ofb.net> Hello Unison-Hackers, I sent the following email to unison-users, but I don't think it got through. I'm trying to do something really simple with unison. I create two empty files, synchronize them "unison foo bar" (so that an archive in .unison is created for those roots), then make a change to one of them and re-run unison with the same arguments. Instead of propagating the change directly, I select 'merge'. At this point unison barfs (uncaught assertion failure from path.ml). I am confused because I can replicate the error even when using what seems to be a clean configuration (e.g. new user account). I seem to remember that years ago, I could use unison to accomplish simple operations like merging, but even with version 2.40 I can replicate the bug. I tested on two linux systems, running Arch (unison 2.48.3) and Debian (unison 2.40.65). This is a bug, is it not? Is there an easy fix? Thank you, Frederick ----- Forwarded message from Frederik Eaton ----- Date: Tue, 7 Jul 2015 01:24:10 -0700 From: Frederik Eaton To: unison-users at yahoogroups.com Subject: merge of single-file roots triggers assertion failure, tested versions 2.40.65 and 2.48.3 User-Agent: Mutt/1.5.21 (2010-09-15) Hello Unison, Merging changes to a single-file root doesn't appear to work. I tested this on two systems, running unison versions 2.40.65 and 2.48.3. In the older version, the last lines are: [stasher] getRecentVersion of in /home/frederik/unison-test/foo Uncaught exception File "/build/buildd-unison_2.40.65-2-i386-T0rnEi/unison-2.40.65/path.ml", line 202, characters 4-10: Assertion failed In the newer version, they are: [stasher] getRecentVersion of in /home/frederik/unison-test/foo Uncaught exception File "/build/unison/src/unison-2.48.3/path.ml", line 210, characters 4-10: Assertion failed Raised at file "/build/unison/src/unison-2.48.3/lwt/lwt.ml", line 126, characters 22-23 ... Is this a known bug? I'm attaching a script to reproduce. Either run it in X, uncommenting the xvkbd lines; or run it wherever and type SPACE-M-Y. Thanks for your attention, Frederick Eaton #!/bin/zsh mkdir unison-test cd unison-test touch foo touch bar #xvkbd -xsendevent -text " "; UNISON=.unison unison -debug all foo bar; echo hi > foo #xvkbd -xsendevent -text "my"; UNISON=.unison unison -debug all foo bar; #rm -rf unison-test [startup] Preferences: ui = graphic host = server = false prefsdocs = false doc = version = false silent = false dumbtty = false testserver = false rest = bar rest = foo showprev = false selftest = false confirmmerge = false retry = 0 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 CURRENT2 CURRENT1 copyonconflict = false backupdir = maxbackups = 2 backups = false backupsuffix = backupprefix = .bak.$VERSION. backuploc = central copymax = 1 copyquoterem = default 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 = false root = bar root = foo killserver = false halfduplex = false stream = true addversionno = false servercmd = sshargs = rshargs = rshcmd = rsh sshcmd = ssh xferbycopying = true sshversion = clientHostName = lot ignoreinodenumbers = false links-aux = true links = default times = false group = false owner = false numericids = false dontchmod = false perms = 1023 watch = true rsrc-aux = false rsrc = default maxerrors = 1 unicodeCS = false unicodeEnc = false unicode = default someHostIsInsensitive = false ignorecase = default timers = false terse = false logfile = /home/frederik/unison.log log = true debugtimes = false debug = all addprefsto = Contacting server... [globals] Checking path '' for expansions [startup] Roots: foo bar i.e. foo bar i.e. (in canonical order) /home/frederik/unison-test/bar /home/frederik/unison-test/foo [props] Setting permission mask to 1777 (1777 and 7777) [stasher] initBackupsLocal [stasher] d = / [stasher] Prefix and suffix regexps for backup filenames have been updated [stasher] initBackupsLocal [stasher] d = / [stasher] Prefix and suffix regexps for backup filenames have been updated Looking for changes [ui] temp: Globals.paths = [update] Loading archive from .unison/ar2d8f7a470ecfa50ef4addbc41a60379f [update] Archive .unison/ar2d8f7a470ecfa50ef4addbc41a60379f not found [update] Loading archive from .unison/arbea074476b2045f87d214607955fc245 [update] Archive .unison/arbea074476b2045f87d214607955fc245 not found Warning: No archive files were found for these roots, whose canonical names are: /home/frederik/unison-test/foo /home/frederik/unison-test/bar This can happen either because this is the first time you have synchronized these roots, or because you have upgraded Unison to a new version with a different archive format. Update detection may take a while on this run if the replicas are large. Unison will assume that the 'last synchronized state' of both replicas was completely empty. This means that any files that are different will be reported as conflicts, and any files that exist only on one replica will be judged as new and propagated to the other replica. If the two replicas are identical, then no changes will be reported. If you see this message repeatedly, it may be because one of your machines is getting its address from DHCP, which is causing its host name to change between synchronizations. See the documentation for the UNISONLOCALHOSTNAME environment variable for advice on how to correct this. Donations to the Unison project are gratefully accepted: http://www.cis.upenn.edu/~bcpierce/unison Press return to continue.[] [update] Loading archive from .unison/ar2d8f7a470ecfa50ef4addbc41a60379f [update] Archive .unison/ar2d8f7a470ecfa50ef4addbc41a60379f not found [update] Setting archive for //lot//home/frederik/unison-test/bar [update] Loading archive from .unison/arbea074476b2045f87d214607955fc245 [update] Archive .unison/arbea074476b2045f87d214607955fc245 not found [update] Setting archive for //lot//home/frederik/unison-test/foo [update] findOnRoot /home/frederik/unison-test/bar [update] findLocal /home/frederik/unison-test/bar () [fpcache] opening cache file .unison/fp2d8f7a470ecfa50ef4addbc41a60379f for input [fpcache] could not open cache file .unison/fp2d8f7a470ecfa50ef4addbc41a60379f: .unison/fp2d8f7a470ecfa50ef4addbc41a60379f: No such file or directory [fpcache] opening cache file .unison/fp2d8f7a470ecfa50ef4addbc41a60379f for output [pred] ignore '' = false [update] buildUpdateRec: /home/frederik/unison-test/bar [update] buildUpdate -> New file [fpcache] cache miss for path [update] Setting archive for //lot//home/frederik/unison-test/bar [update] findOnRoot /home/frederik/unison-test/foo [update] findLocal /home/frederik/unison-test/foo () [fpcache] opening cache file .unison/fpbea074476b2045f87d214607955fc245 for input [fpcache] could not open cache file .unison/fpbea074476b2045f87d214607955fc245: .unison/fpbea074476b2045f87d214607955fc245: No such file or directory [fpcache] opening cache file .unison/fpbea074476b2045f87d214607955fc245 for output [pred] ignore '' = false [update] buildUpdateRec: /home/frederik/unison-test/foo [update] buildUpdate -> New file [fpcache] cache miss for path [update] Setting archive for //lot//home/frederik/unison-test/foo Reconciling changes [recon] reconcileAll [recon] reconcile: 0 results [update] Marking 1 paths equal [update] markEqualLocal /home/frederik/unison-test/bar [pred] backupcurr '' = false [update] Setting archive for //lot//home/frederik/unison-test/bar [update] markEqualLocal /home/frederik/unison-test/foo [pred] backupcurr '' = false [update] Setting archive for //lot//home/frederik/unison-test/foo [update] Updating archives [update] Saving archive in .unison/sc2d8f7a470ecfa50ef4addbc41a60379f [update] Saving archive in .unison/scbea074476b2045f87d214607955fc245 [update] Copying archive .unison/tm2d8f7a470ecfa50ef4addbc41a60379f to .unison/ar2d8f7a470ecfa50ef4addbc41a60379f [update] Copying archive .unison/tmbea074476b2045f87d214607955fc245 to .unison/arbea074476b2045f87d214607955fc245 [update] Removing archive .unison/tm2d8f7a470ecfa50ef4addbc41a60379f [update] Removing archive .unison/tmbea074476b2045f87d214607955fc245 Nothing to do: replicas have been changed only in identical ways since last sync. [startup] Preferences: ui = graphic host = server = false prefsdocs = false doc = version = false silent = false dumbtty = false testserver = false rest = bar rest = foo showprev = false selftest = false confirmmerge = false retry = 0 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 CURRENT2 CURRENT1 copyonconflict = false backupdir = maxbackups = 2 backups = false backupsuffix = backupprefix = .bak.$VERSION. backuploc = central copymax = 1 copyquoterem = default 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 = false root = bar root = foo killserver = false halfduplex = false stream = true addversionno = false servercmd = sshargs = rshargs = rshcmd = rsh sshcmd = ssh xferbycopying = true sshversion = clientHostName = lot ignoreinodenumbers = false links-aux = true links = default times = false group = false owner = false numericids = false dontchmod = false perms = 1023 watch = true rsrc-aux = false rsrc = default maxerrors = 1 unicodeCS = false unicodeEnc = false unicode = default someHostIsInsensitive = false ignorecase = default timers = false terse = false logfile = /home/frederik/unison.log log = true debugtimes = false debug = all addprefsto = Contacting server... [globals] Checking path '' for expansions [startup] Roots: foo bar i.e. foo bar i.e. (in canonical order) /home/frederik/unison-test/bar /home/frederik/unison-test/foo [props] Setting permission mask to 1777 (1777 and 7777) [stasher] initBackupsLocal [stasher] d = / [stasher] Prefix and suffix regexps for backup filenames have been updated [stasher] initBackupsLocal [stasher] d = / [stasher] Prefix and suffix regexps for backup filenames have been updated Looking for changes [ui] temp: Globals.paths = [update] Loading archive from .unison/ar2d8f7a470ecfa50ef4addbc41a60379f [update] Setting archive for //lot//home/frederik/unison-test/bar [update] Loading archive from .unison/arbea074476b2045f87d214607955fc245 [update] Setting archive for //lot//home/frederik/unison-test/foo [update] findOnRoot /home/frederik/unison-test/bar [update] findLocal /home/frederik/unison-test/bar () [fpcache] opening cache file .unison/fp2d8f7a470ecfa50ef4addbc41a60379f for input [fpcache] read chunk of 1 files [fpcache] opening cache file .unison/fp2d8f7a470ecfa50ef4addbc41a60379f for output [pred] ignore '' = false [update] buildUpdateRec: /home/frederik/unison-test/bar [update] checkContentsChange: archStamp is inode (489993) / info.inode (489993) / times: 1436256685.000000 = 1436256685.000000... true / lengths: 0 - 0 [update] Setting archive for //lot//home/frederik/unison-test/bar [update] findOnRoot /home/frederik/unison-test/foo [update] findLocal /home/frederik/unison-test/foo () [fpcache] opening cache file .unison/fpbea074476b2045f87d214607955fc245 for input [fpcache] read chunk of 1 files [fpcache] opening cache file .unison/fpbea074476b2045f87d214607955fc245 for output [pred] ignore '' = false [update] buildUpdateRec: /home/frederik/unison-test/foo [update] checkContentsChange: archStamp is inode (489992) / info.inode (489992) / times: 1436256685.000000 = 1436256686.000000... false / lengths: 0 - 3 [fpcache] cache miss for path [update] archive digest = (d41d8cd98f00b204e9800998ecf8427e,) current digest = (764efa883dda1e11db47671c4a3bbd9e,) [update] Updated file [update] Setting archive for //lot//home/frederik/unison-test/foo Reconciling changes [recon] reconcileAll [recon] reconcile: 1 results [update] Marking 0 paths equal [pred] forcepartial '' = false [pred] preferpartial '' = false foo bar changed ----> / [f] m changed <=M=> / Proceed with propagating updates? [] y Propagating updates UNISON 2.48.3 started propagating changes at 01:11:27.41 on 07 Jul 2015 [files] merge path between roots /home/frederik/unison-test/foo and /home/frederik/unison-test/bar [pred] follow '' = false [fspath] Os.findWorkingDir(/home/frederik/unison-test/foo,) = (/home/frederik/unison-test,foo) [copy] copyRegFile(/home/frederik/unison-test/foo,) -> (/home/frederik/unison-test/foo,foo,/home/frederik/unison-test,.unison.merge1-foo,modified on 2015-07-07 at 1:11:26 size 3 rw-r--r--) [copy] Copy.localFile /home/frederik/unison-test/foo / to /home/frederik/unison-test / .unison.merge1-foo [props] Setting permissions for /home/frederik/unison-test/.unison.merge1-foo to rw-r--r-- (644/1777) [copy] copyRegFile(/home/frederik/unison-test/bar,) -> (/home/frederik/unison-test/foo,foo,/home/frederik/unison-test,.unison.merge2-foo,modified on 2015-07-07 at 1:11:25 size 0 rw-r--r--) [copy] Copy.localFile /home/frederik/unison-test/bar / to /home/frederik/unison-test / .unison.merge2-foo [props] Setting permissions for /home/frederik/unison-test/.unison.merge2-foo to rw-r--r-- (644/1777) [stasher] getRecentVersion of in /home/frederik/unison-test/foo Uncaught exception File "/build/unison/src/unison-2.48.3/path.ml", line 210, characters 4-10: Assertion failed Raised at file "/build/unison/src/unison-2.48.3/lwt/lwt.ml", line 126, characters 22-23 Called from file "/build/unison/src/unison-2.48.3/lwt/generic/lwt_unix_impl.ml", line 102, characters 8-23 Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 490, characters 2-113 Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 556, characters 38-66 Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 718, characters 6-47 Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 788, characters 6-90 Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 810, characters 19-66 Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 870, characters 21-43 ----- End forwarded message ----- -------------- next part -------------- #!/bin/zsh mkdir unison-test cd unison-test touch foo touch bar #xvkbd -xsendevent -text " "; UNISON=.unison unison -debug all foo bar; echo hi > foo #xvkbd -xsendevent -text "my"; UNISON=.unison unison -debug all foo bar; #rm -rf unison-test From bcpierce at seas.upenn.edu Mon Jul 13 17:34:49 2015 From: bcpierce at seas.upenn.edu (bcpierce at seas.upenn.edu) Date: Mon, 13 Jul 2015 17:34:49 -0400 Subject: [Unison-hackers] [unison-svn] r544 - in trunk/src: . uimac14 Message-ID: <201507132134.t6DLYoHg021611@yaws.seas.upenn.edu> Author: bcpierce Date: 2015-07-13 17:34:49 -0400 (Mon, 13 Jul 2015) New Revision: 544 Modified: trunk/src/RECENTNEWS trunk/src/globals.ml trunk/src/globals.mli trunk/src/mkProjectInfo.ml trunk/src/recon.ml trunk/src/test.ml trunk/src/uimac14/MyController.m trunk/src/uimac14/cltool.c Log: * Small change for OSX El Capitan, from Alan Shutko * Add a new preference, 'atomic', for specifying directories that should be treated atomically -- if there are changes within such a directory in both replicase, the whole directory is marked as a conflict instead of propagating any of the changes. Thanks to Julian Squires for submitting this patch! Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2015-06-08 14:58:56 UTC (rev 543) +++ trunk/src/RECENTNEWS 2015-07-13 21:34:49 UTC (rev 544) @@ -1,3 +1,13 @@ +CHANGES FROM VERSION 2.49.0 + +* Small change for OSX El Capitan, from Alan Shutko + +* Add a new preference, 'atomic', for specifying directories that + should be treated atomically -- if there are changes within such a + directory in both replicase, the whole directory is marked as a + conflict instead of propagating any of the changes. Thanks to + Julian Squires for submitting this patch! +------------------------------- CHANGES FROM VERSION 2.48.6 * Add shortcut key to GTK2 user interface allowing - to be used as a Modified: trunk/src/globals.ml =================================================================== --- trunk/src/globals.ml 2015-06-08 14:58:56 UTC (rev 543) +++ trunk/src/globals.ml 2015-07-13 21:34:49 UTC (rev 544) @@ -258,7 +258,11 @@ and then using {\\tt ignorenot} to select particular paths to be synchronized will not work. Instead, you should use the {\\tt path} preference to choose particular paths to synchronize.") - + +let atomic = Pred.create "atomic" ~advanced:true + ("This preference specifies paths for directories whose \ + contents will be considered as a group rather than individually.") + let shouldIgnore p = let p = Path.toString p in (Pred.test ignorePred p) && not (Pred.test ignorenotPred p) Modified: trunk/src/globals.mli =================================================================== --- trunk/src/globals.mli 2015-06-08 14:58:56 UTC (rev 543) +++ trunk/src/globals.mli 2015-07-13 21:34:49 UTC (rev 544) @@ -80,6 +80,7 @@ val shouldMerge : 'a Path.path -> bool val ignorePred : Pred.t val ignorenotPred : Pred.t +val atomic : Pred.t (* Be careful calling this to add new patterns to be ignored: Its value does NOT persist when a new profile is loaded, so it has to Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2015-06-08 14:58:56 UTC (rev 543) +++ trunk/src/mkProjectInfo.ml 2015-07-13 21:34:49 UTC (rev 544) @@ -5,8 +5,8 @@ let projectName = "unison" let majorVersion = 2 -let minorVersion = 48 -let pointVersionOrigin = 533 (* Revision that corresponds to point version 0 *) +let minorVersion = 49 +let pointVersionOrigin = 543 (* Revision that corresponds to point version 0 *) (* Documentation: This is a program to construct a version of the form Major.Minor.Point, @@ -100,5 +100,6 @@ + Modified: trunk/src/recon.ml =================================================================== --- trunk/src/recon.ml 2015-06-08 14:58:56 UTC (rev 543) +++ trunk/src/recon.ml 2015-07-13 21:34:49 UTC (rev 544) @@ -580,39 +580,49 @@ (add_equal counter equals (Absent, Absent), unequals) | (Updates (Dir (desc1, children1, propsChanged1, _) as uc1, prevState1), Updates (Dir (desc2, children2, propsChanged2, _) as uc2, prevState2)) -> - (* See if the directory itself should have a reconItem *) - let dirResult = - if propsChanged1 = PropsSame && propsChanged2 = PropsSame then - (equals, unequals) - else if Props.similar desc1 desc2 then - let uc1 = Dir (desc1, [], PropsSame, false) in - let uc2 = Dir (desc2, [], PropsSame, false) in - (add_equal counter equals (uc1, uc2), unequals) - else - let action = - if propsChanged1 = PropsSame then Replica2ToReplica1 - else if propsChanged2 = PropsSame then Replica1ToReplica2 - else Conflict "properties changed on both sides" in - (equals, - Tree.add unequals - (Different - {rc1 = update2replicaContent path false ui1 [] uc1 `DIRECTORY; - rc2 = update2replicaContent path false ui2 [] uc2 `DIRECTORY; + if Pred.test Globals.atomic (Path.toString path) then + let action = Conflict "atomic directory" in + (equals, + Tree.add unequals + (Different + {rc1 = update2replicaContent path true ui1 [] uc1 `DIRECTORY; + rc2 = update2replicaContent path true ui2 [] uc2 `DIRECTORY; direction = action; default_direction = action; errors1 = []; errors2 = []})) - in - (* Apply reconcile on children. *) - Safelist.fold_left - (fun (equals, unequals) (name1,ui1,name2,ui2) -> - let (eq, uneq) = - reconcile - allowPartial (Path.child path name1) ui1 [] ui2 [] counter - (Tree.enter equals (name1, name2)) - (Tree.enter unequals (name1, name2)) - in - (Tree.leave eq, Tree.leave uneq)) - dirResult - (combineChildren children1 children2) + else + (* See if the directory itself should have a reconItem *) + let dirResult = + if propsChanged1 = PropsSame && propsChanged2 = PropsSame then + (equals, unequals) + else if Props.similar desc1 desc2 then + let uc1 = Dir (desc1, [], PropsSame, false) in + let uc2 = Dir (desc2, [], PropsSame, false) in + (add_equal counter equals (uc1, uc2), unequals) + else + let action = + if propsChanged1 = PropsSame then Replica2ToReplica1 + else if propsChanged2 = PropsSame then Replica1ToReplica2 + else Conflict "properties changed on both sides" in + (equals, + Tree.add unequals + (Different + {rc1 = update2replicaContent path false ui1 [] uc1 `DIRECTORY; + rc2 = update2replicaContent path false ui2 [] uc2 `DIRECTORY; + direction = action; default_direction = action; + errors1 = []; errors2 = []})) + in + (* Apply reconcile on children. *) + Safelist.fold_left + (fun (equals, unequals) (name1,ui1,name2,ui2) -> + let (eq, uneq) = + reconcile + allowPartial (Path.child path name1) ui1 [] ui2 [] counter + (Tree.enter equals (name1, name2)) + (Tree.enter unequals (name1, name2)) + in + (Tree.leave eq, Tree.leave uneq)) + dirResult + (combineChildren children1 children2) | (Updates (File (desc1,contentsChanged1) as uc1, prev), Updates (File (desc2,contentsChanged2) as uc2, _)) -> begin match contentsChanged1, contentsChanged2 with Modified: trunk/src/test.ml =================================================================== --- trunk/src/test.ml 2015-06-08 14:58:56 UTC (rev 543) +++ trunk/src/test.ml 2015-07-13 21:34:49 UTC (rev 544) @@ -322,6 +322,40 @@ running fast enough that the whole thing happens within a second, then the update will be missed! *) + (* Test that .git is treated atomically. *) + runtest "Atomicity of certain directories 1" ["atomic = Name .git"; + "force = newer"] (fun() -> + let orig = (Dir ["foo", Dir [".git", Dir ["a", File "foo"; + "b", File "bar"; + "c", File "baz"]]]) in + put R1 orig; put R2 orig; sync(); + let expected = (Dir ["foo", Dir [".git", Dir ["a", File "modified on R1"; + "b", File "bar"; + "c", File "modified on R1"]]]) in + put R2 (Dir ["foo", Dir [".git", + Dir ["a", File "foo"; + "b", File "modified on R2"; + "c", File "modified on R2"]]]); + put R1 expected; + sync (); + check "1" R2 expected; + check "2" R1 expected + ); + + runtest "Atomicity of certain directories 2" ["atomic = Name .git"] (fun() -> + let a = (Dir ["foo", Dir [".git", Dir ["a", File "foo"; + "b", File "bar"; + "c", File "baz"; + "d", File "quux"]]]) in + let b = (Dir ["foo", Dir [".git", Dir ["a", File "foo"; + "b", File "bar"; + "c", File "baz"; + "e", File "quux"]]]) in + put R1 a; put R2 b; sync(); + check "1" R1 a; + check "2" R2 b + ); + (* Check for the bug reported by Ralf Lehmann *) if not bothRootsLocal then runtest "backups 1 (remote)" ["backup = Name *"] (fun() -> Modified: trunk/src/uimac14/MyController.m =================================================================== --- trunk/src/uimac14/MyController.m 2015-06-08 14:58:56 UTC (rev 543) +++ trunk/src/uimac14/MyController.m 2015-07-13 21:34:49 UTC (rev 544) @@ -182,7 +182,9 @@ /* unless user has clicked Don't ask me again, ask about cltool */ if ( ([[NSUserDefaults standardUserDefaults] boolForKey:@"CheckCltool"]) && (![[NSFileManager defaultManager] - fileExistsAtPath:@"/usr/bin/unison"]) ) + /* BCP 6/2015: Changed from /usr/bin/unison for El Capitan, per + suggestion from Alan Shutko */ + fileExistsAtPath:@"/usr/local/bin/unison"]) ) [self raiseCltoolWindow:nil]; } Modified: trunk/src/uimac14/cltool.c =================================================================== --- trunk/src/uimac14/cltool.c 2015-06-08 14:58:56 UTC (rev 543) +++ trunk/src/uimac14/cltool.c 2015-07-13 21:34:49 UTC (rev 544) @@ -1,7 +1,7 @@ /* cltool.c This is a command-line tool for Mac OS X that looks up the unison - application, where ever it has been installed, and runs it. This + application, whereever it has been installed, and runs it. This is intended to be installed in a standard place (e.g., /usr/bin/unison) to make it easy to invoke unison as a server, or to use unison from the command line when it has been installed with From bcpierce at cis.upenn.edu Mon Jul 13 17:35:01 2015 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Mon, 13 Jul 2015 17:35:01 -0400 Subject: [Unison-hackers] treating some directories atomically, and ignoring socket files In-Reply-To: References: Message-ID: <74C48203-00ED-4D60-AB59-1FA4EB3471A2@cis.upenn.edu> Thanks for the patches, Julian. I?ve just (belatedly) committed them to the unison trunk. I made one small change: instead of Pred.test Globals.atomic (Name.toString n) I used Pred.test Globals.atomic (Path.toString path) for consistency with other predicates. Best, - Benjamin > On Jan 14, 2015, at 8:31 AM, Julian Squires wrote: > > Thanks for the feedback, everyone. I like the idea of the "up" action > in the text UI, but implementing it right now was outside the scope of > what I was working on. > > I've attached patches that implement an atomic option, so you can > specify, e.g., "-atomic Name\ .git -atomic Name\ .svn", and these > directories will be treated indivisibly. Presumably one can use the > pattern matching facilities of this kind of predicate to match > packages on OS X but I haven't investigated it. > > I have no doubt there are improvements that can be made to how I have > implemented this, so I welcome your comments. > > -- > Julian Squires > <0001-Add-atomic-option-as-a-global-predicate.patch><0002-Add-acceptance-test-for-git-directory-atomicity.patch><0003-Add-handling-of-atomic-directories.patch>_______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers -------------- next part -------------- An HTML attachment was scrubbed... URL: From bcpierce at seas.upenn.edu Mon Jul 13 17:43:41 2015 From: bcpierce at seas.upenn.edu (bcpierce at seas.upenn.edu) Date: Mon, 13 Jul 2015 17:43:41 -0400 Subject: [Unison-hackers] [unison-svn] r545 - trunk/src Message-ID: <201507132143.t6DLhfAl021856@yaws.seas.upenn.edu> Author: bcpierce Date: 2015-07-13 17:43:41 -0400 (Mon, 13 Jul 2015) New Revision: 545 Modified: trunk/src/INSTALL.win32-cygwin-gnuc trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml Log: * Update to cygwin install instructions from Mario Emmenlauer Modified: trunk/src/INSTALL.win32-cygwin-gnuc =================================================================== --- trunk/src/INSTALL.win32-cygwin-gnuc 2015-07-13 21:34:49 UTC (rev 544) +++ trunk/src/INSTALL.win32-cygwin-gnuc 2015-07-13 21:43:41 UTC (rev 545) @@ -8,11 +8,12 @@ simple (at least for the text user interface). - Download and run the cygwin installer - - make sure to select the make (from Devel) - and ocaml (from Interpreters) packages; you may also - want the subversion package, if you intend to check out - the latest unison sources from the live subversion - repository. + - make sure to select the make and ctags packages from Devel, + ocaml and plus ocaml-compiler-libs from Interpreters, + and libncurses-devel from Libs; you may also want the + subversion package, if you intend to check out the + latest unison sources from the live subversion + repository. - Download the desired version of the Unison source tarball from the Unison home page and unpack it, or else grab the sources Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2015-07-13 21:34:49 UTC (rev 544) +++ trunk/src/RECENTNEWS 2015-07-13 21:43:41 UTC (rev 545) @@ -1,3 +1,10 @@ +CHANGES FROM VERSION 2.49.1 + +* Update to cygwin install instructions from Mario Emmenlauer + + + +------------------------------- CHANGES FROM VERSION 2.49.0 * Small change for OSX El Capitan, from Alan Shutko Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2015-07-13 21:34:49 UTC (rev 544) +++ trunk/src/mkProjectInfo.ml 2015-07-13 21:43:41 UTC (rev 545) @@ -103,3 +103,4 @@ + From frederik at ofb.net Mon Jul 20 22:35:17 2015 From: frederik at ofb.net (Frederik Eaton) Date: Mon, 20 Jul 2015 19:35:17 -0700 Subject: [Unison-hackers] another way to produce path.ml assertion failure assertion failure, tested versions 2.40.65 and 2.48.3 In-Reply-To: <20150710183053.GA19883@ofb.net> References: <20150710183053.GA19883@ofb.net> Message-ID: <20150721023517.GA5977@ofb.net> Hi all, I'm attaching another script for producing the same path.ml assertion failure. This time no merging is involved, just initialize the archive, then edit a file and type "f" for "follow" at the Unison prompt. The only thing is that you need to set a "backup" preference to generate the error. I also verified that this bug report and the last one are both triggering the same behavior in the latest subversion (provided I've run subversion correctly - it says "At revision 545"). The error message is: Uncaught exception File "/home/frederik/tmp/unison/trunk/src/path.ml", line 210, characters 4-10: Assertion failed I'm wondering if this problem is due to a recent change in OCaml libraries, since I don't think an obvious bug like this would have persisted for 14 years? I don't know much about OCaml but it looks like the 'unison' binary doesn't link any OCaml DLLs... OTOH a lot of your String operations trigger deprecation warnings. Thanks, Frederick On Fri, Jul 10, 2015 at 11:30:53AM -0700, Frederik Eaton wrote: > Hello Unison-Hackers, > > I sent the following email to unison-users, but I don't think it got > through. > > I'm trying to do something really simple with unison. I create two > empty files, synchronize them "unison foo bar" (so that an archive in > .unison is created for those roots), then make a change to one of them > and re-run unison with the same arguments. Instead of propagating the > change directly, I select 'merge'. At this point unison barfs > (uncaught assertion failure from path.ml). I am confused because I can > replicate the error even when using what seems to be a clean > configuration (e.g. new user account). I seem to remember that years > ago, I could use unison to accomplish simple operations like merging, > but even with version 2.40 I can replicate the bug. I tested on two > linux systems, running Arch (unison 2.48.3) and Debian (unison > 2.40.65). This is a bug, is it not? Is there an easy fix? > > Thank you, > > Frederick > > > ----- Forwarded message from Frederik Eaton ----- > > Date: Tue, 7 Jul 2015 01:24:10 -0700 > From: Frederik Eaton > To: unison-users at yahoogroups.com > Subject: merge of single-file roots triggers assertion failure, tested versions 2.40.65 and 2.48.3 > User-Agent: Mutt/1.5.21 (2010-09-15) > > Hello Unison, > > Merging changes to a single-file root doesn't appear to work. > > I tested this on two systems, running unison versions 2.40.65 and 2.48.3. > > In the older version, the last lines are: > > [stasher] getRecentVersion of in /home/frederik/unison-test/foo > Uncaught exception File "/build/buildd-unison_2.40.65-2-i386-T0rnEi/unison-2.40.65/path.ml", line 202, characters 4-10: Assertion failed > > In the newer version, they are: > > [stasher] getRecentVersion of in /home/frederik/unison-test/foo > Uncaught exception File "/build/unison/src/unison-2.48.3/path.ml", line 210, characters 4-10: Assertion failed > Raised at file "/build/unison/src/unison-2.48.3/lwt/lwt.ml", line 126, characters 22-23 > ... > > Is this a known bug? > > I'm attaching a script to reproduce. Either run it in X, uncommenting > the xvkbd lines; or run it wherever and type SPACE-M-Y. > > Thanks for your attention, > > Frederick Eaton > > #!/bin/zsh > > mkdir unison-test > cd unison-test > > touch foo > touch bar > > #xvkbd -xsendevent -text " "; > UNISON=.unison unison -debug all foo bar; > > echo hi > foo > > #xvkbd -xsendevent -text "my"; > UNISON=.unison unison -debug all foo bar; > > #rm -rf unison-test > > [startup] Preferences: > ui = graphic > host = > server = false > prefsdocs = false > doc = > version = false > silent = false > dumbtty = false > testserver = false > rest = bar > rest = foo > showprev = false > selftest = false > confirmmerge = false > retry = 0 > 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 CURRENT2 CURRENT1 > copyonconflict = false > backupdir = > maxbackups = 2 > backups = false > backupsuffix = > backupprefix = .bak.$VERSION. > backuploc = central > copymax = 1 > copyquoterem = default > 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 = false > root = bar > root = foo > killserver = false > halfduplex = false > stream = true > addversionno = false > servercmd = > sshargs = > rshargs = > rshcmd = rsh > sshcmd = ssh > xferbycopying = true > sshversion = > clientHostName = lot > ignoreinodenumbers = false > links-aux = true > links = default > times = false > group = false > owner = false > numericids = false > dontchmod = false > perms = 1023 > watch = true > rsrc-aux = false > rsrc = default > maxerrors = 1 > unicodeCS = false > unicodeEnc = false > unicode = default > someHostIsInsensitive = false > ignorecase = default > timers = false > terse = false > logfile = /home/frederik/unison.log > log = true > debugtimes = false > debug = all > addprefsto = > Contacting server... > [globals] Checking path '' for expansions > [startup] Roots: > foo > bar > i.e. > foo > bar > i.e. (in canonical order) > /home/frederik/unison-test/bar > /home/frederik/unison-test/foo > > [props] Setting permission mask to 1777 (1777 and 7777) > [stasher] initBackupsLocal > [stasher] d = / > [stasher] Prefix and suffix regexps for backup filenames have been updated > [stasher] initBackupsLocal > [stasher] d = / > [stasher] Prefix and suffix regexps for backup filenames have been updated > Looking for changes > [ui] temp: Globals.paths = > [update] Loading archive from .unison/ar2d8f7a470ecfa50ef4addbc41a60379f > [update] Archive .unison/ar2d8f7a470ecfa50ef4addbc41a60379f not found > [update] Loading archive from .unison/arbea074476b2045f87d214607955fc245 > [update] Archive .unison/arbea074476b2045f87d214607955fc245 not found > Warning: No archive files were found for these roots, whose canonical names are: > /home/frederik/unison-test/foo > /home/frederik/unison-test/bar > This can happen either > because this is the first time you have synchronized these roots, > or because you have upgraded Unison to a new version with a different > archive format. > > Update detection may take a while on this run if the replicas are > large. > > Unison will assume that the 'last synchronized state' of both replicas > was completely empty. This means that any files that are different > will be reported as conflicts, and any files that exist only on one > replica will be judged as new and propagated to the other replica. > If the two replicas are identical, then no changes will be reported. > > If you see this message repeatedly, it may be because one of your machines > is getting its address from DHCP, which is causing its host name to change > between synchronizations. See the documentation for the UNISONLOCALHOSTNAME > environment variable for advice on how to correct this. > > Donations to the Unison project are gratefully accepted: > http://www.cis.upenn.edu/~bcpierce/unison > > Press return to continue.[] [update] Loading archive from .unison/ar2d8f7a470ecfa50ef4addbc41a60379f > [update] Archive .unison/ar2d8f7a470ecfa50ef4addbc41a60379f not found > [update] Setting archive for //lot//home/frederik/unison-test/bar > [update] Loading archive from .unison/arbea074476b2045f87d214607955fc245 > [update] Archive .unison/arbea074476b2045f87d214607955fc245 not found > [update] Setting archive for //lot//home/frederik/unison-test/foo > [update] findOnRoot /home/frederik/unison-test/bar > [update] findLocal /home/frederik/unison-test/bar () > [fpcache] opening cache file .unison/fp2d8f7a470ecfa50ef4addbc41a60379f for input > [fpcache] could not open cache file .unison/fp2d8f7a470ecfa50ef4addbc41a60379f: .unison/fp2d8f7a470ecfa50ef4addbc41a60379f: No such file or directory > [fpcache] opening cache file .unison/fp2d8f7a470ecfa50ef4addbc41a60379f for output > [pred] ignore '' = false > [update] buildUpdateRec: /home/frederik/unison-test/bar > [update] buildUpdate -> New file > [fpcache] cache miss for path > [update] Setting archive for //lot//home/frederik/unison-test/bar > [update] findOnRoot /home/frederik/unison-test/foo > [update] findLocal /home/frederik/unison-test/foo () > [fpcache] opening cache file .unison/fpbea074476b2045f87d214607955fc245 for input > [fpcache] could not open cache file .unison/fpbea074476b2045f87d214607955fc245: .unison/fpbea074476b2045f87d214607955fc245: No such file or directory > [fpcache] opening cache file .unison/fpbea074476b2045f87d214607955fc245 for output > [pred] ignore '' = false > [update] buildUpdateRec: /home/frederik/unison-test/foo > [update] buildUpdate -> New file > [fpcache] cache miss for path > [update] Setting archive for //lot//home/frederik/unison-test/foo > Reconciling changes > [recon] reconcileAll > [recon] reconcile: 0 results > [update] Marking 1 paths equal > [update] markEqualLocal /home/frederik/unison-test/bar > [pred] backupcurr '' = false > [update] Setting archive for //lot//home/frederik/unison-test/bar > [update] markEqualLocal /home/frederik/unison-test/foo > [pred] backupcurr '' = false > [update] Setting archive for //lot//home/frederik/unison-test/foo > [update] Updating archives > [update] Saving archive in .unison/sc2d8f7a470ecfa50ef4addbc41a60379f > [update] Saving archive in .unison/scbea074476b2045f87d214607955fc245 > [update] Copying archive .unison/tm2d8f7a470ecfa50ef4addbc41a60379f to .unison/ar2d8f7a470ecfa50ef4addbc41a60379f > [update] Copying archive .unison/tmbea074476b2045f87d214607955fc245 to .unison/arbea074476b2045f87d214607955fc245 > [update] Removing archive .unison/tm2d8f7a470ecfa50ef4addbc41a60379f > [update] Removing archive .unison/tmbea074476b2045f87d214607955fc245 > Nothing to do: replicas have been changed only in identical ways since last sync. > [startup] Preferences: > ui = graphic > host = > server = false > prefsdocs = false > doc = > version = false > silent = false > dumbtty = false > testserver = false > rest = bar > rest = foo > showprev = false > selftest = false > confirmmerge = false > retry = 0 > 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 CURRENT2 CURRENT1 > copyonconflict = false > backupdir = > maxbackups = 2 > backups = false > backupsuffix = > backupprefix = .bak.$VERSION. > backuploc = central > copymax = 1 > copyquoterem = default > 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 = false > root = bar > root = foo > killserver = false > halfduplex = false > stream = true > addversionno = false > servercmd = > sshargs = > rshargs = > rshcmd = rsh > sshcmd = ssh > xferbycopying = true > sshversion = > clientHostName = lot > ignoreinodenumbers = false > links-aux = true > links = default > times = false > group = false > owner = false > numericids = false > dontchmod = false > perms = 1023 > watch = true > rsrc-aux = false > rsrc = default > maxerrors = 1 > unicodeCS = false > unicodeEnc = false > unicode = default > someHostIsInsensitive = false > ignorecase = default > timers = false > terse = false > logfile = /home/frederik/unison.log > log = true > debugtimes = false > debug = all > addprefsto = > Contacting server... > [globals] Checking path '' for expansions > [startup] Roots: > foo > bar > i.e. > foo > bar > i.e. (in canonical order) > /home/frederik/unison-test/bar > /home/frederik/unison-test/foo > > [props] Setting permission mask to 1777 (1777 and 7777) > [stasher] initBackupsLocal > [stasher] d = / > [stasher] Prefix and suffix regexps for backup filenames have been updated > [stasher] initBackupsLocal > [stasher] d = / > [stasher] Prefix and suffix regexps for backup filenames have been updated > Looking for changes > [ui] temp: Globals.paths = > [update] Loading archive from .unison/ar2d8f7a470ecfa50ef4addbc41a60379f > [update] Setting archive for //lot//home/frederik/unison-test/bar > [update] Loading archive from .unison/arbea074476b2045f87d214607955fc245 > [update] Setting archive for //lot//home/frederik/unison-test/foo > [update] findOnRoot /home/frederik/unison-test/bar > [update] findLocal /home/frederik/unison-test/bar () > [fpcache] opening cache file .unison/fp2d8f7a470ecfa50ef4addbc41a60379f for input > [fpcache] read chunk of 1 files > [fpcache] opening cache file .unison/fp2d8f7a470ecfa50ef4addbc41a60379f for output > [pred] ignore '' = false > [update] buildUpdateRec: /home/frederik/unison-test/bar > [update] checkContentsChange: archStamp is inode (489993) / info.inode (489993) / times: 1436256685.000000 = 1436256685.000000... true / lengths: 0 - 0 > [update] Setting archive for //lot//home/frederik/unison-test/bar > [update] findOnRoot /home/frederik/unison-test/foo > [update] findLocal /home/frederik/unison-test/foo () > [fpcache] opening cache file .unison/fpbea074476b2045f87d214607955fc245 for input > [fpcache] read chunk of 1 files > [fpcache] opening cache file .unison/fpbea074476b2045f87d214607955fc245 for output > [pred] ignore '' = false > [update] buildUpdateRec: /home/frederik/unison-test/foo > [update] checkContentsChange: archStamp is inode (489992) / info.inode (489992) / times: 1436256685.000000 = 1436256686.000000... false / lengths: 0 - 3 > [fpcache] cache miss for path > [update] archive digest = (d41d8cd98f00b204e9800998ecf8427e,) current digest = (764efa883dda1e11db47671c4a3bbd9e,) > [update] Updated file > [update] Setting archive for //lot//home/frederik/unison-test/foo > Reconciling changes > [recon] reconcileAll > [recon] reconcile: 1 results > [update] Marking 0 paths equal > [pred] forcepartial '' = false > [pred] preferpartial '' = false > > foo bar > changed ----> / [f] m > changed <=M=> / > > Proceed with propagating updates? [] y > Propagating updates > > > UNISON 2.48.3 started propagating changes at 01:11:27.41 on 07 Jul 2015 > [files] merge path between roots /home/frederik/unison-test/foo and /home/frederik/unison-test/bar > [pred] follow '' = false > [fspath] Os.findWorkingDir(/home/frederik/unison-test/foo,) = (/home/frederik/unison-test,foo) > [copy] copyRegFile(/home/frederik/unison-test/foo,) -> (/home/frederik/unison-test/foo,foo,/home/frederik/unison-test,.unison.merge1-foo,modified on 2015-07-07 at 1:11:26 size 3 rw-r--r--) > [copy] Copy.localFile /home/frederik/unison-test/foo / to /home/frederik/unison-test / .unison.merge1-foo > [props] Setting permissions for /home/frederik/unison-test/.unison.merge1-foo to rw-r--r-- (644/1777) > [copy] copyRegFile(/home/frederik/unison-test/bar,) -> (/home/frederik/unison-test/foo,foo,/home/frederik/unison-test,.unison.merge2-foo,modified on 2015-07-07 at 1:11:25 size 0 rw-r--r--) > [copy] Copy.localFile /home/frederik/unison-test/bar / to /home/frederik/unison-test / .unison.merge2-foo > [props] Setting permissions for /home/frederik/unison-test/.unison.merge2-foo to rw-r--r-- (644/1777) > [stasher] getRecentVersion of in /home/frederik/unison-test/foo > Uncaught exception File "/build/unison/src/unison-2.48.3/path.ml", line 210, characters 4-10: Assertion failed > Raised at file "/build/unison/src/unison-2.48.3/lwt/lwt.ml", line 126, characters 22-23 > Called from file "/build/unison/src/unison-2.48.3/lwt/generic/lwt_unix_impl.ml", line 102, characters 8-23 > Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 490, characters 2-113 > Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 556, characters 38-66 > Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 718, characters 6-47 > Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 788, characters 6-90 > Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 810, characters 19-66 > Called from file "/build/unison/src/unison-2.48.3/uitext.ml", line 870, characters 21-43 > > > > ----- End forwarded message ----- > > #!/bin/zsh > > mkdir unison-test > cd unison-test > > touch foo > touch bar > > #xvkbd -xsendevent -text " "; > UNISON=.unison unison -debug all foo bar; > > echo hi > foo > > #xvkbd -xsendevent -text "my"; > UNISON=.unison unison -debug all foo bar; > > #rm -rf unison-test > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers -------------- next part -------------- #!/bin/zsh -x rm -rf unison-bug-test mkdir unison-bug-test cd unison-bug-test F=foo G=bar touch $F touch $G export UNISON=.unison mkdir $UNISON echo "backup = Name *" >> $UNISON/default.prf echo hi > $F xvkbd -xsendevent -text " >y"; unison -debug all $F $G; echo bye > $G xvkbd -xsendevent -text "fy"; unison -debug all $F $G; #rm -rf unison-bug-test From julian at cipht.net Mon Jul 20 23:15:18 2015 From: julian at cipht.net (Julian Squires) Date: Mon, 20 Jul 2015 23:15:18 -0400 Subject: [Unison-hackers] another way to produce path.ml assertion failure assertion failure, tested versions 2.40.65 and 2.48.3 In-Reply-To: <20150721023517.GA5977@ofb.net> References: <20150710183053.GA19883@ofb.net> <20150721023517.GA5977@ofb.net> Message-ID: On Mon, Jul 20, 2015 at 10:35 PM, Frederik Eaton wrote: > I'm wondering if this problem is due to a recent change in OCaml > libraries, since I don't think an obvious bug like this would have > persisted for 14 years? I don't know much about OCaml but it looks > like the 'unison' binary doesn't link any OCaml DLLs... OTOH a lot of > your String operations trigger deprecation warnings. What version of OCaml are you using? Strings are becoming immutable in newer releases, but code should only have warnings. You might see if the problem persists compliing with 4.01. -- Julian Squires From frederik at ofb.net Tue Jul 21 00:33:54 2015 From: frederik at ofb.net (Frederik Eaton) Date: Mon, 20 Jul 2015 21:33:54 -0700 Subject: [Unison-hackers] another way to produce path.ml assertion failure assertion failure, tested versions 2.40.65 and 2.48.3 In-Reply-To: References: <20150710183053.GA19883@ofb.net> <20150721023517.GA5977@ofb.net> Message-ID: <20150721043354.GA9669@ofb.net> On Mon, Jul 20, 2015 at 11:15:18PM -0400, Julian Squires wrote: > On Mon, Jul 20, 2015 at 10:35 PM, Frederik Eaton wrote: > > I'm wondering if this problem is due to a recent change in OCaml > > libraries, since I don't think an obvious bug like this would have > > persisted for 14 years? I don't know much about OCaml but it looks > > like the 'unison' binary doesn't link any OCaml DLLs... OTOH a lot of > > your String operations trigger deprecation warnings. > > What version of OCaml are you using? Strings are becoming immutable > in newer releases, but code should only have warnings. You might see > if the problem persists compliing with 4.01. I'm running Arch and the OCaml version is 4.02.1-1. However, the Debian system I tested on has Objective Caml 3.12.1, Unison 2.40.65, and they both produce assertion failures in path.ml. Are others not able to reproduce the bug by running the scripts I provided? From chris.prince at gmail.com Tue Jul 21 02:24:41 2015 From: chris.prince at gmail.com (Chris Prince) Date: Mon, 20 Jul 2015 23:24:41 -0700 Subject: [Unison-hackers] another way to produce path.ml assertion failure assertion failure, tested versions 2.40.65 and 2.48.3 In-Reply-To: <20150721043354.GA9669@ofb.net> References: <20150710183053.GA19883@ofb.net> <20150721023517.GA5977@ofb.net> <20150721043354.GA9669@ofb.net> Message-ID: I have seen all sorts of errors when trying to sync between versions of Unison that use different versions of OCaml. Even two versions of OCaml that you might think should be compatible (e.g. OCaml 4.01 and 4.02) will produce problems, due to breaking changes between those versions of OCaml. --Chris On Mon, Jul 20, 2015 at 9:33 PM, Frederik Eaton wrote: > On Mon, Jul 20, 2015 at 11:15:18PM -0400, Julian Squires wrote: > > On Mon, Jul 20, 2015 at 10:35 PM, Frederik Eaton > wrote: > > > I'm wondering if this problem is due to a recent change in OCaml > > > libraries, since I don't think an obvious bug like this would have > > > persisted for 14 years? I don't know much about OCaml but it looks > > > like the 'unison' binary doesn't link any OCaml DLLs... OTOH a lot of > > > your String operations trigger deprecation warnings. > > > > What version of OCaml are you using? Strings are becoming immutable > > in newer releases, but code should only have warnings. You might see > > if the problem persists compliing with 4.01. > > I'm running Arch and the OCaml version is 4.02.1-1. However, the > Debian system I tested on has Objective Caml 3.12.1, Unison 2.40.65, > and they both produce assertion failures in path.ml. Are others not > able to reproduce the bug by running the scripts I provided? > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.schmitt at polytechnique.org Tue Jul 21 03:43:20 2015 From: alan.schmitt at polytechnique.org (Alan Schmitt) Date: Tue, 21 Jul 2015 09:43:20 +0200 Subject: [Unison-hackers] another way to produce path.ml assertion failure assertion failure, tested versions 2.40.65 and 2.48.3 In-Reply-To: <20150721043354.GA9669@ofb.net> (Frederik Eaton's message of "Mon, 20 Jul 2015 21:33:54 -0700") References: <20150710183053.GA19883@ofb.net> <20150721023517.GA5977@ofb.net> <20150721043354.GA9669@ofb.net> Message-ID: On 2015-07-21 06:33, Frederik Eaton writes: > I'm running Arch and the OCaml version is 4.02.1-1. However, the > Debian system I tested on has Objective Caml 3.12.1, Unison 2.40.65, > and they both produce assertion failures in path.ml. Are others not > able to reproduce the bug by running the scripts I provided? I could not use the script (I don?t have xvkbd) but I could reproduce the bug running the script manually (the assertion failure happens during the second unison run). I?m on unison 2.48.3 and ocaml 4.02.1. I tried to have a quick look at the bug, and it seems the problem is that the path of the file being backed up is empty. It really does not make sense because the debugging information says it is ?/? (and the test for empty amounts to checking if the length of the string is 0). Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Last week athmospheric CO? average (Updated July 14, 2015, Mauna Loa Obs.): 401.73 ppm -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 472 bytes Desc: not available URL: From frederik at ofb.net Tue Jul 21 14:58:36 2015 From: frederik at ofb.net (Frederik Eaton) Date: Tue, 21 Jul 2015 11:58:36 -0700 Subject: [Unison-hackers] another way to produce path.ml assertion failure assertion failure, tested versions 2.40.65 and 2.48.3 In-Reply-To: References: <20150710183053.GA19883@ofb.net> <20150721023517.GA5977@ofb.net> <20150721043354.GA9669@ofb.net> Message-ID: <20150721185836.GB9669@ofb.net> The bit about syncing between different versions of unison/ocaml is interesting, but it's not relevant to the bug I reported. Can you reproduce the bug by running my script? It syncs locally so there is only one version of unison/ocaml involved at a time. On Mon, Jul 20, 2015 at 11:24:41PM -0700, Chris Prince wrote: > I have seen all sorts of errors when trying to sync between versions of > Unison that use different versions of OCaml. > > Even two versions of OCaml that you might think should be compatible (e.g. > OCaml 4.01 and 4.02) will produce problems, due to breaking changes between > those versions of OCaml. > > --Chris > > > On Mon, Jul 20, 2015 at 9:33 PM, Frederik Eaton wrote: > > > On Mon, Jul 20, 2015 at 11:15:18PM -0400, Julian Squires wrote: > > > On Mon, Jul 20, 2015 at 10:35 PM, Frederik Eaton > > wrote: > > > > I'm wondering if this problem is due to a recent change in OCaml > > > > libraries, since I don't think an obvious bug like this would have > > > > persisted for 14 years? I don't know much about OCaml but it looks > > > > like the 'unison' binary doesn't link any OCaml DLLs... OTOH a lot of > > > > your String operations trigger deprecation warnings. > > > > > > What version of OCaml are you using? Strings are becoming immutable > > > in newer releases, but code should only have warnings. You might see > > > if the problem persists compliing with 4.01. > > > > I'm running Arch and the OCaml version is 4.02.1-1. However, the > > Debian system I tested on has Objective Caml 3.12.1, Unison 2.40.65, > > and they both produce assertion failures in path.ml. Are others not > > able to reproduce the bug by running the scripts I provided? > > _______________________________________________ > > Unison-hackers mailing list > > Unison-hackers at lists.seas.upenn.edu > > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers > > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From julian at cipht.net Tue Jul 21 16:22:57 2015 From: julian at cipht.net (Julian Squires) Date: Tue, 21 Jul 2015 16:22:57 -0400 Subject: [Unison-hackers] another way to produce path.ml assertion failure assertion failure, tested versions 2.40.65 and 2.48.3 In-Reply-To: <20150721185836.GB9669@ofb.net> References: <20150710183053.GA19883@ofb.net> <20150721023517.GA5977@ofb.net> <20150721043354.GA9669@ofb.net> <20150721185836.GB9669@ofb.net> Message-ID: On Tue, Jul 21, 2015 at 2:58 PM, Frederik Eaton wrote: > The bit about syncing between different versions of unison/ocaml is > interesting, but it's not relevant to the bug I reported. > > Can you reproduce the bug by running my script? It syncs locally so > there is only one version of unison/ocaml involved at a time. I've attached a script that may be easier for people to use to reproduce the bug, as it uses the text UI and does not depend on xvkbd. FWIW, for me the bug occurs as you describe, with OCaml 4.01 and unison 2.48.0. -- Julian Squires -------------- next part -------------- A non-text attachment was scrubbed... Name: unison-bug.sh Type: application/x-sh Size: 307 bytes Desc: not available URL: From frederik at ofb.net Tue Jul 21 20:54:46 2015 From: frederik at ofb.net (Frederik Eaton) Date: Tue, 21 Jul 2015 17:54:46 -0700 Subject: [Unison-hackers] another way to produce path.ml assertion failure assertion failure, tested versions 2.40.65 and 2.48.3 In-Reply-To: References: <20150710183053.GA19883@ofb.net> <20150721023517.GA5977@ofb.net> <20150721043354.GA9669@ofb.net> <20150721185836.GB9669@ofb.net> Message-ID: <20150722005446.GB12993@ofb.net> Thanks! ... I didn't realize that the 'unison' command might start with a graphical UI by default for some binaries. I was using it in text mode too - the xvkbd was just to get the keystrokes into xterm, like a hacked 'expect'. I tried "echo ... | unison" but it doesn't like that. On Tue, Jul 21, 2015 at 04:22:57PM -0400, Julian Squires wrote: > On Tue, Jul 21, 2015 at 2:58 PM, Frederik Eaton wrote: > > The bit about syncing between different versions of unison/ocaml is > > interesting, but it's not relevant to the bug I reported. > > > > Can you reproduce the bug by running my script? It syncs locally so > > there is only one version of unison/ocaml involved at a time. > > I've attached a script that may be easier for people to use to > reproduce the bug, as it uses the text UI and does not depend on > xvkbd. > > FWIW, for me the bug occurs as you describe, with OCaml 4.01 and unison 2.48.0. > > -- > Julian Squires > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers