You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
connect frequently fails under DragonFly BSD, especially to localhost. The TestErrorNil
and TestSelfConnect tests are easy ways to reproduce the problem. The issue is related
to the fact that Go does a syscall.Connect on a non-blocking socket, then waits for the
socket to become writable. When it does we call syscall.Connect again on the same
socket, expecting that it will return syscall.EISCONN or the error that was previously
encountered.
Under DragonFly BSD this fails since the second syscall.Connect appears to retry the
connection and results in an syscall.EINPROGRESS. As a result, we sit in a loop:
954:2 net.test CALL connect(0x3,0xc20800c40c,0x10)
954:2 net.test RET connect -1 errno 36 Operation now in progress
954:2 net.test CALL kevent(0x4,0,0,0x7fffff9fd6c8,0x40,0x7fffff9fd6b0)
954:2 net.test RET kevent 2
954:2 net.test CALL connect(0x3,0xc20800c40c,0x10)
954:2 net.test RET connect -1 errno 36 Operation now in progress
954:2 net.test CALL kevent(0x4,0,0,0x7fffff9fd6c8,0x40,0x7fffff9fd6b0)
954:2 net.test RET kevent 2
954:2 net.test CALL connect(0x3,0xc20800c40c,0x10)
954:2 net.test RET connect -1 errno 36 Operation now in progress
954:2 net.test CALL kevent(0x4,0,0,0x7fffff9fd6c8,0x40,0x7fffff9fd6b0)
Instead, of repeated syscall.Connect calls we should use the the SO_ERROR socket option
to see if the connection succeeded or failed.
For more details see:
http://lists.dragonflybsd.org/pipermail/commits/2013-August/197962.html
Setting kern.ipc.soconnect_async=0 provides the same behaviour as other BSDs
(discovered/confirmed by Mikio).
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: