gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] regression test puzling non-failure which should probably


From: Greg Troxel
Subject: Re: [gpsd-dev] regression test puzling non-failure which should probably fail
Date: Fri, 30 Jan 2015 09:42:28 -0500
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.4 (berkeley-unix)

"Eric S. Raymond" <address@hidden> writes:

>> Is it really trying the port in one half before forking?
>
> No, because I couldn't see any way to eliminate the TOCTOU problem.

I don't follow.   It seems that on picking a random port two potential
realities could play out:

  The port is already in use (with odds n/16384, for n the number of
  outgoing connections on the machine).

  The port isn't in use, and within a second becomes in use (with odds
  n/16384 * L, where L is the poisson rate of new connections/second,
  and these odds should be near zero).

The second is TOCTOU, and I can see that's hard to fix, but the first
isn't a TOCTOU issue.

But I could be missing something.

>> I wonder if it would make sense to try running the test up to 10 times,
>> to avoid losing test coverage.
>
> That might be doable.

Attachment: pgppVN1vQ6efd.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]