[Unison-hackers] [unison-svn] r294 - trunk/src

Benjamin C. Pierce bcpierce at seas.upenn.edu
Wed Jun 25 09:25:47 EDT 2008


Author: bcpierce
Date: 2008-06-25 09:25:42 -0400 (Wed, 25 Jun 2008)
New Revision: 294

Modified:
   trunk/src/RECENTNEWS
   trunk/src/copy.ml
   trunk/src/mkProjectInfo.ml
Log:
* Trying a possible fix for the "assert failure in remote.ml" bug
  (thanks Jerome!)



Modified: trunk/src/RECENTNEWS
===================================================================
--- trunk/src/RECENTNEWS	2008-06-25 01:52:23 UTC (rev 293)
+++ trunk/src/RECENTNEWS	2008-06-25 13:25:42 UTC (rev 294)
@@ -1,3 +1,10 @@
+CHANGES FROM VERSION 2.29.9
+
+* Trying a possible fix for the "assert failure in remote.ml" bug
+  (thanks Jerome!)
+
+
+-------------------------------
 CHANGES FROM VERSION 2.29.8
 
 * Updated documentation.

Modified: trunk/src/copy.ml
===================================================================
--- trunk/src/copy.ml	2008-06-25 01:52:23 UTC (rev 293)
+++ trunk/src/copy.ml	2008-06-25 13:25:42 UTC (rev 294)
@@ -387,6 +387,22 @@
 
 (****)
 
+(* BCP '06: This is a hack to work around a bug on the Windows platform
+   that causes lightweight threads on the server to hang.  I conjecture that
+   the problem has to do with the RPC mechanism, which was used here to
+   make a call *back* from the server to the client inside Trace.log so that
+   the log message would be appended to the log file on the client. *)
+(* BCP '08: Jerome thinks that printing these messages using Util.msg
+   may be causing the dreaded "assertion failure in remote.ml," which
+   happens only on windows and seems correlated with the xferbycopying
+   switch.  The conjecture is that some windows ssh servers may combine
+   the stdout and stderr streams, which would result in these messages
+   getting interleaved with Unison's RPC protocol stream. *)
+let loggit s =
+  if Prefs.read Globals.someHostIsRunningWindows
+    then () (* Util.msg "%s" *)
+    else Trace.log s
+
 let tryCopyMovedFile fspathTo pathTo realPathTo update desc fp ress id =
   Prefs.read Xferhint.xferbycopying
     &&
@@ -394,13 +410,6 @@
     Util.convertUnixErrorsToTransient "tryCopyMovedFile" (fun() ->
       debug (fun () -> Util.msg "tryCopyMovedFile: -> %s /%s/\n"
         (Path.toString pathTo) (Os.fullfingerprint_to_string fp));
-      (* BCP '06: This is a hack to work around a bug on the Windows platform
-         that causes lightweight threads on the server to hang.  I conjecture that
-         the problem has to do with the RPC mechanism, which was used here to
-         make a call *back* from the server to the client inside Trace.log so that
-         the log message would be appended to the log file on the client. *)
-      let loggit = if Prefs.read Globals.someHostIsRunningWindows
-                   then Util.msg "%s" else Trace.log in
       match Xferhint.lookup fp with
         None ->
           false
@@ -592,7 +601,7 @@
     let cmd = prog ^ " "
                ^ (Os.quotes fromSpec) ^ " "
                ^ (Os.quotes toSpec) in
-    Trace.log (Printf.sprintf "%s\n" cmd);
+    loggit (Printf.sprintf "%s\n" cmd);
     let _,log = Os.runExternalProgram cmd in
     debug (fun() -> Util.msg
              "transferFileUsingExternalCopyprog: returned\n------\n%s\n-----\n"

Modified: trunk/src/mkProjectInfo.ml
===================================================================
--- trunk/src/mkProjectInfo.ml	2008-06-25 01:52:23 UTC (rev 293)
+++ trunk/src/mkProjectInfo.ml	2008-06-25 13:25:42 UTC (rev 294)
@@ -80,3 +80,4 @@
 
 
 
+



More information about the Unison-hackers mailing list