You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SC-6106] Atomic commit protocol unit test hangs in HashMap.elemEquals
## What changes were proposed in this pull request?
We saw the following hang during a jenkins run:
```
"Executor task launch worker for task 281" apache#24085 daemon prio=5 os_prio=0 tid=0x00007fa140696000 nid=0x78fc runnable [0x00007fa06e7f7000]
java.lang.Thread.State: RUNNABLE
at java.net.URI.equals(URI.java:1421)
at org.apache.hadoop.fs.Path.equals(Path.java:392)
at scala.collection.mutable.HashTable$class.elemEquals(HashTable.scala:358)
at scala.collection.mutable.HashMap.elemEquals(HashMap.scala:40)
at scala.collection.mutable.HashTable$class.scala$collection$mutable$HashTable$$findEntry0(HashTable.scala:136)
at scala.collection.mutable.HashTable$class.findOrAddEntry(HashTable.scala:165)
at scala.collection.mutable.HashMap.findOrAddEntry(HashMap.scala:40)
at scala.collection.mutable.HashMap.put(HashMap.scala:76)
at scala.collection.mutable.HashMap.update(HashMap.scala:81)
at org.apache.spark.sql.transaction.DatabricksAtomicCommitProtocolSuite$FakeClockFileSystem.create(DatabricksAtomicCommitProtocolSuite.scala:355)
```
Since URI.equals is non-blocking and the thread is at 100% cpu, the hash map must have gotten a loop in it due to concurrent accesses. The fix should be to synchronize on accesses to that map during tests.
## How was this patch tested?
Ran existing tests.
Author: Eric Liang <[email protected]>
Closesapache#269 from ericl/sc-6106.
0 commit comments