Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5f1a923707f3de38a111a1b5b38640541fc49f4a
Ticket: 3325339fffffffffffffffffffffffffffffffff
socket-14.2 fails
User & Date: ferrieux on 2011-06-28 05:23:10
Changes

  1. icomment:
    After a bit of explanations on the chat, I agree that this may be useful for the IPv6 transition, as more and more servers will get DNS records for both their v4 and v6 address.
    
    Now I have found the critical OS behavior that makes the bug appear or disappear: though a first select(writable)  does end up calling TcpAsyncCallback (when the outcome of the asynchronous connection is known), at this spot the code calls getsockopt(SOL_SOCKET, SO_ERROR). On some OSes, like Fedora 12, it turns out that this has a side-effect: the OS no longer things the socket is writable when the outcome is "connection error". This can be seen very clearly through strace: the second select() doesn't wake up on the writable bit when the getsockopt is present, and does when it is not.
    
    By removing the resort to the cached getsockopt (->status field), everything works.
    Reinhard, can you explain why you added it ?
    
    
    
  2. login: "ferrieux"
  3. mimetype: "text/plain"
  4. username: "ferrieux"