[MLton] MLton.TextIO.mkstemps

Matthew Fluet fluet at cs.cornell.edu
Fri Dec 1 06:43:45 PST 2006


>> Could you strace the simultaneous compiles of mlnlffigen to see what's
>> going on?
>
> I haven't been able to reliably reproduce it (although I've now encountered 
> it a total of three times), but I'll keep investigating.

I've only been able to reproduce the problem once with ktrace, and there, 
only one of the parallel compiles failed:

Compiling mlnlffigen
ktrace mlton @MLton max-heap 512m -- -target self -default-ann 'sequenceNonUnit warn' mlnlffigen.mlb
i686-apple-darwin8-gcc-4.0.1: /tmp/fileSEok6D.o: No such file or directory
call to system failed with exit status 1:
gcc -o mlnlffigen /tmp/fileobu7mC.o /tmp/fileWXTaN3.o /tmp/filexzFLWa.o 
/tmp/file7I4FUt.o /tmp/fileSEok6D.o /tmp/fileXj3DAy.o /tmp/fileYCIdUe.o 
/tmp/filemN3K3L.o /tmp/fileusnHj2.o /tmp/file1hR7xt.o /tmp/file0VpgSL.o 
/tmp/file9Q2L4I.o /tmp/file90c5H7.o /tmp/file6lKkl8.o /tmp/fileOX3LAj.o 
/tmp/filegexLYn.o 
-L/Users/fluet/devel/mlton/mlton.svn.x86_64.copy/build/lib/self -lmlton 
-L/opt/local/lib -L/sw/lib -lgdtoa -lm -lgmp
make[1]: *** [mlnlffigen] Error 1
make: *** [tools] Error 2

The ktrace looks o.k.:

  ...
  27925 mlton-compile CALL  open(0x3114468,0xa01,0x180)
  27925 mlton-compile NAMI  "/tmp/filefxTVI3.o"
  27925 mlton-compile RET   open -1 errno 17 File exists
  27925 mlton-compile CALL  open(0x31145ac,0xa01,0x180)
  27925 mlton-compile NAMI  "/tmp/fileSEok6D.o"
  27925 mlton-compile RET   open 5
  27925 mlton-compile CALL  ioctl(0x5,FIODTYPE,0xbfffde8c)
  27925 mlton-compile RET   ioctl -1 errno 25 Inappropriate ioctl for device
  27925 mlton-compile CALL  ioctl(0x5,TIOCGETA,0xbfffde60)
  27925 mlton-compile RET   ioctl -1 errno 25 Inappropriate ioctl for device
  27925 mlton-compile CALL  fstat(0x5,0xba9ce0)
  27925 mlton-compile RET   fstat 0
  27925 mlton-compile CALL  lseek(0x5,0,0x1)
  27925 mlton-compile RET   lseek 0
  27925 mlton-compile CALL  close(0x5)
  27925 mlton-compile RET   close 0
  ...
  27925 mlton-compile CALL  access(0x3114eb8,0)
  27925 mlton-compile NAMI  "/tmp/fileXj3DAy.o"
  27925 mlton-compile RET   access 0
  27925 mlton-compile CALL  unlink(0x3114ee0)
  27925 mlton-compile NAMI  "/tmp/fileXj3DAy.o"
  27925 mlton-compile RET   unlink 0
  27925 mlton-compile CALL  access(0x3114f00,0)
  27925 mlton-compile NAMI  "/tmp/fileSEok6D.o"
  27925 mlton-compile RET   access -1 errno 2 No such file or directory
  27925 mlton-compile CALL  access(0x3114f20,0)
  27925 mlton-compile NAMI  "/tmp/file7I4FUt.o"
  27925 mlton-compile RET   access 0
  27925 mlton-compile CALL  unlink(0x3114f48)
  27925 mlton-compile NAMI  "/tmp/file7I4FUt.o"
  27925 mlton-compile RET   unlink 0
  ...

The unlink happens after the fork/exec to call gcc.




More information about the MLton mailing list