[MLton-devel] Re: MLton on Debian

Barak Pearlmutter barak@cs.may.ie
Tue, 15 Jul 2003 19:35:43 -0600


Yup I'm an Ireland until further notice.
According to my distraught mother I now constitute 0.1% of the Jewish
population of the Island.

> Henry's guess is that this indicates some kind of hardware or VMware
> problem (I run Debian on a VMware machine).  I am more inclined to

Barf!

My money's on Henry.

  $ strip --version
  GNU strip 2.14.90.0.4 20030523 Debian GNU/Linux
  $ while true; do cp mlton-compile.orig mlton-compile; strip mlton-compile; md5sum mlton-compile; done
  4124791f223acbf1c30503f1febf81e0  mlton-compile
  4124791f223acbf1c30503f1febf81e0  mlton-compile
  4124791f223acbf1c30503f1febf81e0  mlton-compile
  4124791f223acbf1c30503f1febf81e0  mlton-compile
  ... for a long time ...

  ^C

  # pbuilder login
  # strip --version
  GNU strip 2.14.90.0.4 20030523 Debian GNU/Linux

  $ while true; do cp mlton-compile.orig mlton-compile; strip mlton-compile; md5sum mlton-compile; done
  4124791f223acbf1c30503f1febf81e0  mlton-compile
  4124791f223acbf1c30503f1febf81e0  mlton-compile
  4124791f223acbf1c30503f1febf81e0  mlton-compile
  4124791f223acbf1c30503f1febf81e0  mlton-compile
  ... for a long time ...

It doesn't seem very possible,

  $ cp mlton-compile.orig mlton-compile; ltrace -S -o bar2 strip mlton-compile
  $ cp mlton-compile.orig mlton-compile; ltrace -S -o bar1 strip mlton-compile
  $ diff bar1 bar2
  54c54
  < SYS_getpid()                                     = 12229
  ---
  > SYS_getpid()                                     = 12201
  104c104
  < SYS_open("stM5WuTa", 578, 0666)                  = 4
  ---
  > SYS_open("st7tmW7U", 578, 0666)                  = 4
  572c572
  < rename("stM5WuTa", "mlton-compile" <unfinished ...>
  ---
  > rename("st7tmW7U", "mlton-compile" <unfinished ...>

Or at a lower level which includes snippets of the data,

  $ cp mlton-compile.orig mlton-compile; strace -o foo1 strip mlton-compile
  $ cp mlton-compile.orig mlton-compile; strace -o foo2 strip mlton-compile
  $ diff foo1 foo2
  39,41c39,41
  < gettimeofday({1058318700, 537455}, NULL) = 0
  < getpid()                                = 10377
  < lstat64("st5CPETL", 0xbffff840)         = -1 ENOENT (No such file or directory)
  ---
  > gettimeofday({1058318709, 332666}, NULL) = 0
  > getpid()                                = 10404
  > lstat64("stp3aWpy", 0xbffff840)         = -1 ENOENT (No such file or directory)
  81,82c81,82
  < stat64("st5CPETL", 0xbffff780)          = -1 ENOENT (No such file or directory)
  < open("st5CPETL", O_RDWR|O_CREAT|O_TRUNC, 0666) = 4
  ---
  > stat64("stp3aWpy", 0xbffff780)          = -1 ENOENT (No such file or directory)
  > open("stp3aWpy", O_RDWR|O_CREAT|O_TRUNC, 0666) = 4
  184c184
  < stat64("st5CPETL", {st_mode=S_IFREG|0664, st_size=8713004, ...}) = 0
  ---
  > stat64("stp3aWpy", {st_mode=S_IFREG|0664, st_size=8713004, ...}) = 0
  187c187
  < chmod("st5CPETL", 0775)                 = 0
  ---
  > chmod("stp3aWpy", 0775)                 = 0
  193c193
  < rename("st5CPETL", "mlton-compile")     = 0
  ---
  > rename("stp3aWpy", "mlton-compile")     = 0

The only thing strip uses its one non-deterministic system call
(gettimeofday) for is to initialize a random number generator to make
a filename for its temporary file.

Could this be a filesystem problem on your setup, like running out of
space and thus truncating the created file?



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel