Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/11546#discussion_r62278680
--- Diff:
core/src/test/scala/org/apache/spark/storage/BlockManagerSuite.scala ---
@@ -424,6 +424,32 @@ class BlockManagerSuite extends SparkFunSuite with
Matchers with BeforeAndAfterE
}
}
+ test("deadlock between dropFromMemory and removeBlock") {
+ store = makeBlockManager(2000)
+ val a1 = new Array[Byte](400)
+ store.putSingle("a1", a1, StorageLevel.MEMORY_ONLY)
+ val t1 = new Thread {
+ override def run() = {
+ store.memoryManager.synchronized {
+ Thread.sleep(1000)
--- End diff --
I was able to reproduce the deadlock locally with this test almost every
time, which is great. However, it would be good if you could rewrite this using
explicit locks or semaphores or something so we don't have to introduce
`Thread.sleep` here, which slows the test down and is more brittle.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]