You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by vanzin <gi...@git.apache.org> on 2018/04/20 00:06:27 UTC

[GitHub] spark pull request #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen so...

GitHub user vanzin opened a pull request:

    https://github.com/apache/spark/pull/21110

    [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

    This allows sockets to be bound even if there are sockets
    from a previous application that are still pending closure. It
    avoids bind issues when, for example, re-starting the SHS.
    
    Don't enable the option on Windows though. The following page
    explains some odd behavior that this option can have there:
    https://msdn.microsoft.com/en-us/library/windows/desktop/ms740621%28v=vs.85%29.aspx
    
    I intentionally ignored server sockets that always bind to
    ephemeral ports, since those don't benefit from this option.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vanzin/spark SPARK-24029

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/21110.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #21110
    
----
commit 7c84e1d4c5d9d3c90454a1060d12f3667809d71c
Author: Marcelo Vanzin <va...@...>
Date:   2018-04-19T23:43:50Z

    [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.
    
    This allows sockets to be bound even if there are still sockets
    from a previous application that are still pending closure. It
    avoids bind issues when, for example, re-starting the SHS.
    
    Don't enable the option on Windows though. The following page
    explains some odd behavior that this option can have there:
    https://msdn.microsoft.com/en-us/library/windows/desktop/ms740621%28v=vs.85%29.aspx
    
    I intentionally ignored server sockets that always bind to
    ephemeral ports, since those don't benefit from this options.

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    **[Test build #89667 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89667/testReport)** for PR 21110 at commit [`7c84e1d`](https://github.com/apache/spark/commit/7c84e1d4c5d9d3c90454a1060d12f3667809d71c).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen so...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21110#discussion_r182932853
  
    --- Diff: common/network-common/src/main/java/org/apache/spark/network/server/TransportServer.java ---
    @@ -98,7 +99,8 @@ private void init(String hostToBind, int portToBind) {
           .group(bossGroup, workerGroup)
           .channel(NettyUtils.getServerChannelClass(ioMode))
           .option(ChannelOption.ALLOCATOR, allocator)
    -      .childOption(ChannelOption.ALLOCATOR, allocator);
    +      .childOption(ChannelOption.ALLOCATOR, allocator)
    +      .childOption(ChannelOption.SO_REUSEADDR, !SystemUtils.IS_OS_WINDOWS);
    --- End diff --
    
    Where would you put it? Every place where this is set? Not a fan of that.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen so...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21110#discussion_r182933972
  
    --- Diff: common/network-common/src/main/java/org/apache/spark/network/server/TransportServer.java ---
    @@ -98,7 +99,8 @@ private void init(String hostToBind, int portToBind) {
           .group(bossGroup, workerGroup)
           .channel(NettyUtils.getServerChannelClass(ioMode))
           .option(ChannelOption.ALLOCATOR, allocator)
    -      .childOption(ChannelOption.ALLOCATOR, allocator);
    +      .childOption(ChannelOption.ALLOCATOR, allocator)
    +      .childOption(ChannelOption.SO_REUSEADDR, !SystemUtils.IS_OS_WINDOWS);
    --- End diff --
    
    I usually put some comments when it takes longer than usual to read tho. It's sometimes hard to debug in particular when it's OS specific. It bothered me to leave a comment saying you could leave it optionally if you feel in the same way. am fine as is too. 


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Merged to master.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    retest this please


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Merged build finished. Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/2554/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    **[Test build #89611 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89611/testReport)** for PR 21110 at commit [`7c84e1d`](https://github.com/apache/spark/commit/7c84e1d4c5d9d3c90454a1060d12f3667809d71c).
     * This patch **fails due to an unknown error code, -9**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    **[Test build #89602 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89602/testReport)** for PR 21110 at commit [`7c84e1d`](https://github.com/apache/spark/commit/7c84e1d4c5d9d3c90454a1060d12f3667809d71c).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/89602/
    Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/89611/
    Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/89667/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    **[Test build #89611 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89611/testReport)** for PR 21110 at commit [`7c84e1d`](https://github.com/apache/spark/commit/7c84e1d4c5d9d3c90454a1060d12f3667809d71c).


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen so...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21110#discussion_r182927595
  
    --- Diff: common/network-common/src/main/java/org/apache/spark/network/server/TransportServer.java ---
    @@ -98,7 +99,8 @@ private void init(String hostToBind, int portToBind) {
           .group(bossGroup, workerGroup)
           .channel(NettyUtils.getServerChannelClass(ioMode))
           .option(ChannelOption.ALLOCATOR, allocator)
    -      .childOption(ChannelOption.ALLOCATOR, allocator);
    +      .childOption(ChannelOption.ALLOCATOR, allocator)
    +      .childOption(ChannelOption.SO_REUSEADDR, !SystemUtils.IS_OS_WINDOWS);
    --- End diff --
    
    It could be even nicer if we leave a link and few comments here why we don't enable on Windows specifically though.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    retest this please


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    retest this please
    
    



---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    **[Test build #89602 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89602/testReport)** for PR 21110 at commit [`7c84e1d`](https://github.com/apache/spark/commit/7c84e1d4c5d9d3c90454a1060d12f3667809d71c).
     * This patch **fails from timeout after a configured wait of \`300m\`**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Merged build finished. Test FAILed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/2506/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen so...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/21110


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    **[Test build #89667 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89667/testReport)** for PR 21110 at commit [`7c84e1d`](https://github.com/apache/spark/commit/7c84e1d4c5d9d3c90454a1060d12f3667809d71c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/2514/
    Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    From a very quick look, the test failure looks global.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #21110: [SPARK-24029][core] Set SO_REUSEADDR on listen sockets.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21110
  
    Merged build finished. Test PASSed.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org