port & root

Zero King l2dy at macports.org
Fri Apr 6 08:45:34 UTC 2018


On Thu, Apr 05, 2018 at 07:25:10PM +0200, 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
>
>
>@l2dy,
>Is our Travis job executing multiple 'port lint' commands in parallel?
>Then this is the same cause.

Not multiple lint commands, but lint and building ports (including
listing subports) are executed in parallel.

>Rainer

-- 
Best regards,
Zero King
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3612 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20180406/ba265176/attachment.bin>


More information about the macports-dev mailing list