Skip to content

Conversation

@rdblue
Copy link
Contributor

@rdblue rdblue commented Sep 13, 2016

What changes were proposed in this pull request?

This adds information to the web UI thread dump page about the JVM locks
held by threads and the locks that threads are blocked waiting to
acquire. This should help find cases where lock contention is causing
Spark applications to run slowly.

How was this patch tested?

Tested by applying this patch and viewing the change in the web UI.

thread-lock-info

Additions:

  • A "Thread Locking" column with the locks held by the thread or that are blocking the thread
  • Links from the a blocked thread to the thread holding the lock
  • Stack frames show where threads are inside synchronized blocks, "holding Monitor(...)"

@SparkQA
Copy link

SparkQA commented Sep 14, 2016

Test build #65336 has finished for PR 15088 at commit f49b6aa.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using Option instead of negative/null values? not much difference either way. I'm not sure if thread IDs can be negative ever.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably cleaner that way. I was passing on what JMX returns, but I think you're right that we should translate to Scala expectations.

This adds information to the web UI thread dump page about the JVM locks
held by threads and the locks that threads are blocked waiting to
acquire. This should help find cases where lock contention is causing
Spark applications to run slowly.
@rdblue rdblue force-pushed the SPARK-17532-add-thread-lock-info branch from f49b6aa to 90bd2c8 Compare September 14, 2016 17:06
@SparkQA
Copy link

SparkQA commented Sep 14, 2016

Test build #65380 has finished for PR 15088 at commit 90bd2c8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@rdblue
Copy link
Contributor Author

rdblue commented Oct 5, 2016

@srowen, could you take another look at this? It has been useful for us to catch locking issues and I'd like to get it in for 2.1.0. Thanks!

@rdblue
Copy link
Contributor Author

rdblue commented Nov 1, 2016

@srowen, if you have a chance, could you look at this again? I think it will be helpful for tracking down live-lock issues. Thanks!

@rxin
Copy link
Contributor

rxin commented Nov 2, 2016

Thanks - merging in master/branch-2.1.

asfgit pushed a commit that referenced this pull request Nov 2, 2016
## What changes were proposed in this pull request?

This adds information to the web UI thread dump page about the JVM locks
held by threads and the locks that threads are blocked waiting to
acquire. This should help find cases where lock contention is causing
Spark applications to run slowly.
## How was this patch tested?

Tested by applying this patch and viewing the change in the web UI.

![thread-lock-info](https://cloud.githubusercontent.com/assets/87915/18493057/6e5da870-79c3-11e6-8c20-f54c18a37544.png)

Additions:
- A "Thread Locking" column with the locks held by the thread or that are blocking the thread
- Links from the a blocked thread to the thread holding the lock
- Stack frames show where threads are inside `synchronized` blocks, "holding Monitor(...)"

Author: Ryan Blue <[email protected]>

Closes #15088 from rdblue/SPARK-17532-add-thread-lock-info.

(cherry picked from commit 2dc0480)
Signed-off-by: Reynold Xin <[email protected]>
@asfgit asfgit closed this in 2dc0480 Nov 2, 2016
@rdblue
Copy link
Contributor Author

rdblue commented Nov 2, 2016

Thanks @rxin!

uzadude pushed a commit to uzadude/spark that referenced this pull request Jan 27, 2017
## What changes were proposed in this pull request?

This adds information to the web UI thread dump page about the JVM locks
held by threads and the locks that threads are blocked waiting to
acquire. This should help find cases where lock contention is causing
Spark applications to run slowly.
## How was this patch tested?

Tested by applying this patch and viewing the change in the web UI.

![thread-lock-info](https://cloud.githubusercontent.com/assets/87915/18493057/6e5da870-79c3-11e6-8c20-f54c18a37544.png)

Additions:
- A "Thread Locking" column with the locks held by the thread or that are blocking the thread
- Links from the a blocked thread to the thread holding the lock
- Stack frames show where threads are inside `synchronized` blocks, "holding Monitor(...)"

Author: Ryan Blue <[email protected]>

Closes apache#15088 from rdblue/SPARK-17532-add-thread-lock-info.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants