[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] regression test puzling non-failure which should probably
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-dev] regression test puzling non-failure which should probably fail |
Date: |
Fri, 30 Jan 2015 15:01:32 -0500 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Greg Troxel <address@hidden>:
>
> "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.
You're not. I thought the odds of a pair collision were already low
enough not to justify additional conmplexity. But since it's come up
I might try putting retry logic in place.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
signature.asc
Description: Digital signature
- [gpsd-dev] regression test puzling non-failure which should probably fail, Greg Troxel, 2015/01/29
- Re: [gpsd-dev] regression test puzling non-failure which should probably fail, Greg Troxel, 2015/01/29
- Re: [gpsd-dev] regression test puzling non-failure which should probably fail, Hal Murray, 2015/01/29
- Re: [gpsd-dev] regression test puzling non-failure which should probably fail, Eric S. Raymond, 2015/01/29
- Re: [gpsd-dev] regression test puzling non-failure which should probably fail, Greg Troxel, 2015/01/30
- Re: [gpsd-dev] regression test puzling non-failure which should probably fail, Eric S. Raymond, 2015/01/30
- Re: [gpsd-dev] regression test puzling non-failure which should probably fail, Greg Troxel, 2015/01/30
- Re: [gpsd-dev] regression test puzling non-failure which should probably fail,
Eric S. Raymond <=
- Re: [gpsd-dev] regression test puzling non-failure which should probably fail, Hal Murray, 2015/01/30
- Re: [gpsd-dev] regression test puzling non-failure which should probably fail, Eric S. Raymond, 2015/01/30
- Re: [gpsd-dev] regression test puzling non-failure which should probably fail, Hal Murray, 2015/01/30
- Re: [gpsd-dev] regression test puzling non-failure which should probably fail, Eric S. Raymond, 2015/01/31