You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2015/08/18 01:28:45 UTC

[jira] [Commented] (SPARK-10072) BlockGenerator can deadlock when the queue block queue of generate blocks fills up to capacity

    [ https://issues.apache.org/jira/browse/SPARK-10072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14700426#comment-14700426 ] 

Apache Spark commented on SPARK-10072:
--------------------------------------

User 'tdas' has created a pull request for this issue:
https://github.com/apache/spark/pull/8257

> BlockGenerator can deadlock when the queue block queue of generate blocks fills up to capacity
> ----------------------------------------------------------------------------------------------
>
>                 Key: SPARK-10072
>                 URL: https://issues.apache.org/jira/browse/SPARK-10072
>             Project: Spark
>          Issue Type: Bug
>          Components: Streaming
>            Reporter: Tathagata Das
>            Assignee: Tathagata Das
>            Priority: Blocker
>
> Generated blocks are inserted into an ArrayBlockingQueue, and another thread pulls stuff from the ArrayBlockingQueue and pushes it into BlockManager. Now if that queue fills up to capacity (default is 10 blocks), then the inserting into queue (done in the function updateCurrentBuffer) get blocked inside a synchronized block. However, the thread that is pulling blocks from the queue uses the same lock to check the current (active or stopped) while pulling from the queue. Since the block generating threads is blocked (as the queue is full) on the lock, this thread that is supposed to drain the queue gets blocked. Ergo, deadlock.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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