[ https://issues.apache.org/jira/browse/HIVE-22175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16941322#comment-16941322 ]
John Sherman commented on HIVE-22175: ------------------------------------- I looked into this failure this morning, my investigation seems to indicate the root cause for this is: The fix for HIVE-21686 moved a call to BuddyAllocator#allocateWithExpand out of the while (true) loop in BuddyAllocator#allocateMultiple. The consequence of this change is that sometimes a thread will only see a subset of arenas due to arenaCount being set early in the method (so arenaCount could be 1 and other threads could have allocated additional arenas by the time the method reaches the while (true) loop). BuddyAllocator#allocateWithExpand would have ended up checking newly allocated arenas (at least once). The fix I'm proposing is simply updating arenaCount before retrying, so all available arenas are checked. Since this isn't my area and seems like sensitive code, a good review is needed. (I ran the test 50 times locally and it passed 100% with this change vs 20%-30% failure rate before). > TestBudyAllocator#testMTT test is flaky > --------------------------------------- > > Key: HIVE-22175 > URL: https://issues.apache.org/jira/browse/HIVE-22175 > Project: Hive > Issue Type: Bug > Components: llap > Reporter: Ádám Szita > Assignee: John Sherman > Priority: Major > Attachments: HIVE-22175.1.patch > > > This test has a fail rate of about 20%-25% -- This message was sent by Atlassian Jira (v8.3.4#803005)