You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by witgo <gi...@git.apache.org> on 2014/10/24 15:59:29 UTC

[GitHub] spark pull request: NioBlockTransferService.fetchBlocks may cause ...

GitHub user witgo opened a pull request:

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

    NioBlockTransferService.fetchBlocks may cause spark to hang.

    cc @rxin 

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

    $ git pull https://github.com/witgo/spark SPARK-4064

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

    https://github.com/apache/spark/pull/2929.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 #2929
    
----
commit f8f319506889983fb0aecfd1725192602eddb400
Author: GuoQiang Li <wi...@qq.com>
Date:   2014-10-24T13:51:08Z

    If we create a lot of big broadcast variables, Spark may hang

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

    https://github.com/apache/spark/pull/2929#issuecomment-60401800
  
      [Test build #22137 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22137/consoleFull) for   PR 2929 at commit [`f8f3195`](https://github.com/apache/spark/commit/f8f319506889983fb0aecfd1725192602eddb400).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

    https://github.com/apache/spark/pull/2929#discussion_r19382312
  
    --- Diff: core/src/main/scala/org/apache/spark/network/nio/NioBlockTransferService.scala ---
    @@ -95,16 +95,21 @@ final class NioBlockTransferService(conf: SparkConf, securityManager: SecurityMa
         future.onSuccess { case message =>
           val bufferMessage = message.asInstanceOf[BufferMessage]
           val blockMessageArray = BlockMessageArray.fromBufferMessage(bufferMessage)
    -
    -      for (blockMessage <- blockMessageArray) {
    -        if (blockMessage.getType != BlockMessage.TYPE_GOT_BLOCK) {
    -          listener.onBlockFetchFailure(
    -            new SparkException(s"Unexpected message ${blockMessage.getType} received from $cmId"))
    -        } else {
    -          val blockId = blockMessage.getId
    -          val networkSize = blockMessage.getData.limit()
    -          listener.onBlockFetchSuccess(
    -            blockId.toString, new NioByteBufferManagedBuffer(blockMessage.getData))
    +      // SPARK-4064: In some cases(eg. Remote block was removed) blockMessageArray may be empty.
    +      if (blockMessageArray.isEmpty) {
    +        listener.onBlockFetchFailure(
    +          new SparkException(s"Not received data from $cmId"))
    --- End diff --
    
    Can this say "Received empty message from $cmId" or "Received no data from $cmId"?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

Posted by JoshRosen <gi...@git.apache.org>.
Github user JoshRosen commented on the pull request:

    https://github.com/apache/spark/pull/2929#issuecomment-62814044
  
    This is moot now, since the related code has already changed, but I just wanted to point out that this PR seems subtly incorrect in cases where _some_ but not _all_ of of the blocks are missing in the remote block manager.  As of this commit, `getBlock` returns `null` when blocks are missing, which ends up getting wrapped into a `None` in `processBlock`, so a fetch failure for a particular block results in the absence of a block result rather than an explicit error response.  In some later commits, this was changed (perhaps unintentionally) so that fetch failures result in exceptions that result in connection manager error messages, so these errors are now handled in the future's `onFailure` handler.
    
    In retrospect, I think that the right fix here would have been to either a) send negative error responses, or b) have the requester match the responses it received against the ids in its request and threat any missing blocks as failures.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

    https://github.com/apache/spark/pull/2929#issuecomment-60486282
  
      [Test build #22216 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22216/consoleFull) for   PR 2929 at commit [`c23e562`](https://github.com/apache/spark/commit/c23e562508fa5aae5b9a378e803641f98a283d72).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

    https://github.com/apache/spark/pull/2929#discussion_r19363491
  
    --- Diff: core/src/main/scala/org/apache/spark/network/nio/NioBlockTransferService.scala ---
    @@ -95,16 +95,20 @@ final class NioBlockTransferService(conf: SparkConf, securityManager: SecurityMa
         future.onSuccess { case message =>
           val bufferMessage = message.asInstanceOf[BufferMessage]
           val blockMessageArray = BlockMessageArray.fromBufferMessage(bufferMessage)
    -
    -      for (blockMessage <- blockMessageArray) {
    -        if (blockMessage.getType != BlockMessage.TYPE_GOT_BLOCK) {
    -          listener.onBlockFetchFailure(
    -            new SparkException(s"Unexpected message ${blockMessage.getType} received from $cmId"))
    -        } else {
    -          val blockId = blockMessage.getId
    -          val networkSize = blockMessage.getData.limit()
    -          listener.onBlockFetchSuccess(
    -            blockId.toString, new NioByteBufferManagedBuffer(blockMessage.getData))
    +      if (blockMessageArray.length == 0) {
    +        listener.onBlockFetchFailure(
    --- End diff --
    
    this change looks good. but can you comment on when this would happen and put it into the source code?
    
    thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

    https://github.com/apache/spark/pull/2929#issuecomment-60390980
  
      [Test build #22137 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22137/consoleFull) for   PR 2929 at commit [`f8f3195`](https://github.com/apache/spark/commit/f8f319506889983fb0aecfd1725192602eddb400).
     * This patch merges cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/2929#issuecomment-60715040
  
    Thanks. I'm merging this one.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

    https://github.com/apache/spark/pull/2929#issuecomment-60547913
  
      [Test build #22269 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22269/consoleFull) for   PR 2929 at commit [`20110f2`](https://github.com/apache/spark/commit/20110f28d34e9353abb1450eafc62f8a656cdc11).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

    https://github.com/apache/spark/pull/2929#discussion_r19363531
  
    --- Diff: core/src/main/scala/org/apache/spark/network/nio/NioBlockTransferService.scala ---
    @@ -95,16 +95,20 @@ final class NioBlockTransferService(conf: SparkConf, securityManager: SecurityMa
         future.onSuccess { case message =>
           val bufferMessage = message.asInstanceOf[BufferMessage]
           val blockMessageArray = BlockMessageArray.fromBufferMessage(bufferMessage)
    -
    -      for (blockMessage <- blockMessageArray) {
    -        if (blockMessage.getType != BlockMessage.TYPE_GOT_BLOCK) {
    -          listener.onBlockFetchFailure(
    -            new SparkException(s"Unexpected message ${blockMessage.getType} received from $cmId"))
    -        } else {
    -          val blockId = blockMessage.getId
    -          val networkSize = blockMessage.getData.limit()
    -          listener.onBlockFetchSuccess(
    -            blockId.toString, new NioByteBufferManagedBuffer(blockMessage.getData))
    +      if (blockMessageArray.length == 0) {
    +        listener.onBlockFetchFailure(
    --- End diff --
    
    cc @aarondav since this will conflict with your change


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/2929#issuecomment-60715056
  
    @aarondav this will conflict with your pr.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

    https://github.com/apache/spark/pull/2929#issuecomment-60484209
  
      [Test build #22216 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22216/consoleFull) for   PR 2929 at commit [`c23e562`](https://github.com/apache/spark/commit/c23e562508fa5aae5b9a378e803641f98a283d72).
     * This patch merges cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-4064]NioBlockTransferService.fetchBlock...

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

    https://github.com/apache/spark/pull/2929#issuecomment-60544657
  
      [Test build #22269 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/22269/consoleFull) for   PR 2929 at commit [`20110f2`](https://github.com/apache/spark/commit/20110f28d34e9353abb1450eafc62f8a656cdc11).
     * This patch merges cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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