Re: select() and svn 1.5
Re: select() and svn 1.5
- Subject: Re: select() and svn 1.5
- From: Luke Daley <email@hidden>
- Date: Sat, 30 Aug 2008 18:24:19 +1000
On 30/08/2008, at 5:56 PM, Jordan K. Hubbard wrote:
(some nice hooks in Libsystem, for example, right below the point
where all the API variants converge so you don't have do all that
crazy entrypoint gymnastics... Hurm... Mumble... Moving on...).
Yes please :)
What happens with svn (say `svn log http://blah.com`), is that it
calls select() with a single fd in the writefds set (presumably the
fd that the network request is going out on) and a timeout of 3600.
With svn < 1.5 with this implementation injected everything works
fine. With svn 1.5, the syscall() returns immediately with -1 and
the error is 'Bad file descriptor'.
Well, one obvious question, I suppose, is what happens when you
trace both svn 1.4 and svn 1.5 and then compare the results? It's
easy enough to do stuff like this with drace, to wit:
Interesting. Here is svn 1.4…
svn: select(nfds=4, readfds=bfffe918, writefds=0, errorfds=0,
timeout=bfffe998)
svn: select(nfds=4, readfds=bfffe988, writefds=0, errorfds=0,
timeout=bfffea08)
svn: select(nfds=4, readfds=bfffe918, writefds=0, errorfds=0,
timeout=bfffe998)
svn: select(nfds=4, readfds=bfffe928, writefds=0, errorfds=0,
timeout=bfffe9a8)
svn: select(nfds=4, readfds=bfffe928, writefds=0, errorfds=0,
timeout=bfffe9a8)
svn: select(nfds=4, readfds=bfffe988, writefds=0, errorfds=0,
timeout=bfffea08)
svn: select(nfds=4, readfds=bfffea88, writefds=0, errorfds=0,
timeout=bfffeb08)
svn: select(nfds=4, readfds=bfffea98, writefds=0, errorfds=0,
timeout=bfffeb18)
svn: select(nfds=4, readfds=bfffe9e8, writefds=0, errorfds=0,
timeout=bfffea68)
svn: select(nfds=4, readfds=bfffe9f8, writefds=0, errorfds=0,
timeout=bfffea78)
svn: select(nfds=4, readfds=bfffea58, writefds=0, errorfds=0,
timeout=bfffead8)
svn: select(nfds=4, readfds=bfffeaf8, writefds=0, errorfds=0,
timeout=bfffeb78)
svn: select(nfds=4, readfds=bfffea48, writefds=0, errorfds=0,
timeout=bfffeac8)
svn: select(nfds=4, readfds=bfffeab8, writefds=0, errorfds=0,
timeout=bfffeb38)
svn: select(nfds=4, readfds=bfffec78, writefds=0, errorfds=0,
timeout=bfffecf8)
svn: select(nfds=4, readfds=bfffef48, writefds=0, errorfds=0,
timeout=bfffefc8)
And 1.5…
svn: select(nfds=4, readfds=7fff5fbfe580, writefds=7fff5fbfe500,
errorfds=0, timeout=7fff5fbfe4f0)
svn: select(nfds=4, readfds=7fff5fbfe660, writefds=7fff5fbfe5e0,
errorfds=0, timeout=7fff5fbfe5d0)
svn: select(nfds=4, readfds=7fff5fbfe260, writefds=7fff5fbfe1e0,
errorfds=0, timeout=7fff5fbfe1d0)
svn: select(nfds=4, readfds=7fff5fbfe2f0, writefds=7fff5fbfe270,
errorfds=0, timeout=7fff5fbfe260)
svn: select(nfds=4, readfds=7fff5fbfe380, writefds=7fff5fbfe300,
errorfds=0, timeout=7fff5fbfe2f0)
svn: select(nfds=4, readfds=7fff5fbfe4e0, writefds=7fff5fbfe460,
errorfds=0, timeout=7fff5fbfe450)
svn: select(nfds=4, readfds=7fff5fbfe4c0, writefds=7fff5fbfe440,
errorfds=0, timeout=7fff5fbfe430)
svn: select(nfds=4, readfds=7fff5fbfe3c0, writefds=7fff5fbfe340,
errorfds=0, timeout=7fff5fbfe330)
svn: select(nfds=4, readfds=7fff5fbfe450, writefds=7fff5fbfe3d0,
errorfds=0, timeout=7fff5fbfe3c0)
svn: select(nfds=4, readfds=7fff5fbfe550, writefds=7fff5fbfe4d0,
errorfds=0, timeout=7fff5fbfe4c0)
svn: select(nfds=5, readfds=7fff5fbfe740, writefds=7fff5fbfe6c0,
errorfds=0, timeout=7fff5fbfe6b0)
svn: select(nfds=6, readfds=7fff5fbfe580, writefds=7fff5fbfe500,
errorfds=0, timeout=7fff5fbfe4f0)
svn: select(nfds=4, readfds=7fff5fbfe5e0, writefds=7fff5fbfe560,
errorfds=0, timeout=7fff5fbfe550)
svn: select(nfds=5, readfds=7fff5fbfe660, writefds=7fff5fbfe5e0,
errorfds=0, timeout=7fff5fbfe5d0)
svn: select(nfds=6, readfds=7fff5fbfe660, writefds=7fff5fbfe5e0,
errorfds=0, timeout=7fff5fbfe5d0)
svn: select(nfds=6, readfds=7fff5fbfe450, writefds=7fff5fbfe3d0,
errorfds=0, timeout=7fff5fbfe3c0)
svn: select(nfds=6, readfds=7fff5fbfe260, writefds=7fff5fbfe1e0,
errorfds=0, timeout=7fff5fbfe1d0)
svn: select(nfds=6, readfds=7fff5fbfe2f0, writefds=7fff5fbfe270,
errorfds=0, timeout=7fff5fbfe260)
svn: select(nfds=6, readfds=7fff5fbfe380, writefds=7fff5fbfe300,
errorfds=0, timeout=7fff5fbfe2f0)
svn: select(nfds=6, readfds=7fff5fbfe3c0, writefds=7fff5fbfe340,
errorfds=0, timeout=7fff5fbfe330)
svn: select(nfds=6, readfds=7fff5fbfe4e0, writefds=7fff5fbfe460,
errorfds=0, timeout=7fff5fbfe450)
svn: select(nfds=6, readfds=7fff5fbfe3d0, writefds=7fff5fbfe350,
errorfds=0, timeout=7fff5fbfe340)
svn: select(nfds=6, readfds=7fff5fbfe4f0, writefds=7fff5fbfe470,
errorfds=0, timeout=7fff5fbfe460)
svn: select(nfds=6, readfds=7fff5fbfe800, writefds=7fff5fbfe780,
errorfds=0, timeout=7fff5fbfe770)
svn: select(nfds=6, readfds=7fff5fbfe840, writefds=7fff5fbfe7c0,
errorfds=0, timeout=7fff5fbfe7b0)
Tried several times and got the same behaviour all times. The command
was `svn log http://macromates.com/svn/Bundles --limit 1`, without my
library injected. This unfortunately doesn't ring any bells for me.
What I don't understand is why the syscall to select in my code, using
the exact params that were passed to select untouched, fails.
--
LD.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden