Breaking change to AcceptEx and IOCP in Server 2012 and Windows 8?

Answered Breaking change to AcceptEx and IOCP in Server 2012 and Windows 8?

  • Tuesday, August 28, 2012 11:24 AM
     
     

    Firstly, I'd like to apologise for cross posting but a) someone suggested that this forum was a better place and b) I'm not getting any responses in the forum that I originally posted in...

    If this is NOT the correct place for usermode winsock questions please direct me to the correct place - better still, answer the question ;)

    There appears to be a change to how Server 2012 RC handles an AcceptEx() call where the thread that called AcceptEx() is blocking on a synchronous ReadFile() call.

    There's an example program here: http://stackoverflow.com/questions/12047960/getqueuedcompletionstatus-cant-dequeue-io-from-iocp-if-the-thread-which-origina which works correctly on all versions of Windows except Windows 8 and Server 2012 RC.

    The example has a thread to set up the IOCP and listening socket and which starts a single thread to service the IOCP. It has a second thread which posts an AcceptEx() call and then blocks on a call to ReadFile() on a named pipe. When you connect to the test program using telnet the TCP handshake completes (as can be seen using WireShark) but the completion from the AcceptEx() is NOT handled on the IOCP servicing thread. On all other versions of Windows it IS handled correctly.

    The example code is not my own, but a) I don't see anything wrong with it. b) it fails in exactly the same way if AcceptEx is loaded via the IOCTL route rather than linked to directly. c) the problem does not occur with overlapped WSARecvs only with AcceptEx.

    Could someone either confirm that this is a deliberate breaking change, or that it's a bug (happy for someone to point out how stupid I am for not spotting the bug in the test program if that's where it is!)

    (copied from http://social.technet.microsoft.com/Forums/en-US/winserver8gen/thread/5764cd0f-fda1-4cfa-ae35-808210bae77e/ as I got no response there and then from http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/3ef54b76-ef12-4079-88c7-ee7c31770f2a/ as I got nothing useful there either)...


All Replies

  • Wednesday, August 29, 2012 9:17 AM
     
     
    This should really be on MS Connect :)
  • Wednesday, August 29, 2012 9:27 AM
     
     

    Thanks Nathan,

    Where exactly on MS Connect. I looked there first for an appropriate place to report bugs in Windows 8 and/or Server 2012 and couldn't see anything at all obvious.

    I guess if there's nowhere to report bugs then there are fewer reported bugs ;)
    • Edited by Len Holgate Wednesday, August 29, 2012 9:27 AM
    •  
  • Monday, September 03, 2012 4:30 PM
     
     Answered

    And, for the actual answer...

    See https://connect.microsoft.com/WindowsServer/feedback/details/760161/breaking-change-to-acceptex-and-iocp-in-server-2012-and-windows-8

    This is a bug and the official MS response is "We've passed this to the base OS team and they will consider this for a future update. I'm resolving this postponed."
    • Marked As Answer by Len Holgate Monday, September 03, 2012 4:30 PM
    •  
  • Monday, September 03, 2012 5:11 PM
     
     Answered

    And, for the actual answer...

    See https://connect.microsoft.com/WindowsServer/feedback/details/760161/breaking-change-to-acceptex-and-iocp-in-server-2012-and-windows-8

    This is a bug and the official MS response is "We've passed this to the base OS team and they will consider this for a future update. I'm resolving this postponed."
    • Marked As Answer by Len Holgate Monday, September 03, 2012 5:11 PM
    •