New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[System] Fix TCP socket reuse. #2047

Merged
merged 3 commits into from Sep 17, 2015

Conversation

Projects
None yet
3 participants
@esdrubal
Contributor

esdrubal commented Sep 11, 2015

TCP sockets with option SocketOptionName.ReuseAddress were not working on Linux.

Fixes #31557.

esdrubal added some commits Sep 10, 2015

[System] Test Socket TCP double bind.
Test checks that when setting TCP socket option ReuseAddress, it is
possible to bind other sockets to the same endpoint.

Covers #31557.
[System] Fix TCP socket reuse.
TCP sockets with option SocketOptionName.ReuseAddress were not working on Linux.

Fixes #31557.
@stefansedich

This comment has been minimized.

Show comment
Hide comment
@stefansedich

stefansedich Sep 15, 2015

Contributor

Interesting @esdrubal the double bind tests failed on this one, when I did this fix during my experimenting it seemed to work fine, any ideas?

Contributor

stefansedich commented Sep 15, 2015

Interesting @esdrubal the double bind tests failed on this one, when I did this fix during my experimenting it seemed to work fine, any ideas?

@esdrubal

This comment has been minimized.

Show comment
Hide comment
@esdrubal

esdrubal Sep 15, 2015

Contributor

@stefansedich it should work but it seems Jenkins is using a Linux distribution that doesn't support SO_REUSEPORT.

It should work when grep -r SO_REUSEPORT /usr/include/ finds something.
@directhex do our Jenkins distros support SO_REUSEPORT?

Contributor

esdrubal commented Sep 15, 2015

@stefansedich it should work but it seems Jenkins is using a Linux distribution that doesn't support SO_REUSEPORT.

It should work when grep -r SO_REUSEPORT /usr/include/ finds something.
@directhex do our Jenkins distros support SO_REUSEPORT?

@akoeplinger

This comment has been minimized.

Show comment
Hide comment
@akoeplinger

akoeplinger Sep 15, 2015

Member

@esdrubal SO_REUSEPORT was only added in the Linux 3.9 kernel, most of the Jenkins workers use Debian 7 with 3.2 kernel. Is there a way to check and skip the test if the flag is not there?

Member

akoeplinger commented Sep 15, 2015

@esdrubal SO_REUSEPORT was only added in the Linux 3.9 kernel, most of the Jenkins workers use Debian 7 with 3.2 kernel. Is there a way to check and skip the test if the flag is not there?

[System] Updated SocketTest.TcpDoubleBind.
Multiple threads listening to the same address and port are not possible
before linux 3.9 kernel, where the socket option SO_REUSEPORT was
introduced.

This commit makes TcpDoubleBind sensible to this OS capability.

esdrubal added a commit that referenced this pull request Sep 17, 2015

Merge pull request #2047 from esdrubal/socketreuse
[System] Fix TCP socket reuse.

@esdrubal esdrubal merged commit 07bae96 into mono:master Sep 17, 2015

0 of 5 checks passed

AMD64 Linux Build finished. 44239 tests run, 1030 skipped, 1 failed.
Details
i386 Linux Build finished. 44239 tests run, 1019 skipped, 2 failed.
Details
i386 OSX (Proprietary) Build finished. No test results found.
Details
ARM hard float Linux Build triggered. sha1 is merged.
Details
ARM soft float Linux Build triggered. sha1 is merged.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment