On 2018-4-6 03:25 , Rainer Müller wrote: > On 2018-04-05 19:14, Joshua Root wrote: >> My guess is that this is a bug in Tcl's file command. Deleting a >> nonexistent file is not supposed to be considered an error. But by >> starting two instances of port(1) at the same time, a race condition >> arises. The 'file delete' command probably checks whether the file >> exists, returns TCL_OK if not, and then attempts to delete the file. If >> the file has been deleted by the other running instance (or indeed >> anything else) between these two steps, then the actual deletion fails, >> and it incorrectly returns an error. > > You are right. We hit a race condition in the implementation of 'file > delete' in Tcl. > > It is missing another check for ENOENT here, as done in line 381: > > https://github.com/macports/macports-base/blob/4b13207d9f7f9aba1cc9eba266b3071318637a8c/vendor/tcl8.5.19/generic/tclFCmd.c#L415
Still seems broken in 8.6 at first glance too. - Josh
