ioctl() on socket fd's take 3 seconds on 1.7.7

Jason Curl
Mon Nov 22 20:29:00 GMT 2010

On 22/11/2010 14:17, Corinna Vinschen wrote:
 > On Nov 20 18:25, Jason Curl wrote:
 >> On 15/11/2010 17:22, Corinna Vinschen wrote:
 >>> On Nov  9 09:20, Jason Curl wrote:
 >>>>    166   65418 [main] ipcheck 5580 ioctl: fd 3, cmd 80087364
 >>>> --- Process 5580, exception C0000005 at 610C8C86
 >>> Crash in Cygwin, but the address doesn't help much, unfortunately.
 >>>> Interestingly enough, the program works. That is, it finds all
 >>>> interfaces and returns correct values (except interface names are
 >>>> UUIDs instead of something more friendly like "eth0" that existed in
 >>>> 1.5.26).
 >> I've generated a relatively simple test case that I can compile
 >> using cygwin1-20101102.dll.
 > Thank you.  I can't reproduce any slowness, each ioctl takes only a
 > couple of milliseconds.  At least I could reproduce the exception when
 > stracing the testcase and I've applied a matching patch to Cygwin.
 > Can you retry with the next developer snapshot?  Are the ioctl calls
 > still slow?  If so, I'm wondering if the GetAdaptersAddresses call is
 > rather slow if a lot of interfaces exist.  Every single ioctl in your
 > application calls GetAdaptersAddresses twice, like this:
 > Can you test how long this call takes in your scenario, and if it
 > might be the culprit?

I've downloaded cygwin1-20101118.dll as I didn't see anything newer and 
the problem still exists. So I downloaded the source and built my own 

The problem still exists. I did see a change in behaviour - when using 
"strace", the 3 second delays are now present (with previous versions of 
cygwin1.dll, strace implied no delays, running vanilla would show 
delays). So could have the crash while using strace shortcircuited the 3 
second timeout?

I've attached the output of 'strace'. What I see is the following:

    78   65155 [main] a 6984 ioctl: fd 3, cmd 80087364
3153263 3218418 [main] a 6984 fhandler_socket::ioctl: 0 = ioctl_socket 
(80087364, 28C8D4)
    46 3218464 [main] a 6984 ioctl: returning 0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: out.txt.bz2
Type: application/octet-stream
Size: 9683 bytes
Desc: not available
URL: <>
-------------- next part --------------
Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list