Skip to content

Commit

Permalink
HPCC-31111 Fix unusual roxie crash on keyed join within library
Browse files Browse the repository at this point in the history
Only occurs if the library is used more than once within the same query
and the keyed joins execute at the same time.

Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Jan 16, 2024
1 parent cc28f70 commit 7936c36
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions common/thorhelper/roxierow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,12 @@ class CAllocatorCache : public CSimpleInterfaceOf<IRowAllocatorMetaActIdCache>
CAllocatorCacheItem *container = _lookup(meta, activityId, flags);
if (container)
{
if (0 == (roxiemem::RHFunique & flags))
if (0 == ((roxiemem::RHFunique|roxiemem::RHFblocked) & flags))
return LINK(&container->queryElement());
// if in cache but unique, reuse allocatorId
// If in cache but unique, reuse allocatorId, but create a unique allocator (and heap)
// If blocked the allocator must not be commoned up! (The underlying heap will be within roxiemem.)
// This is very unusual, but can happen if a library is used more than once within the same query
// since you will have multiple activity instances with the same activityId.
SpinUnblock b(allAllocatorsLock);
return callback->createAllocator(this, meta, activityId, container->queryAllocatorId(), flags);
}
Expand Down

0 comments on commit 7936c36

Please sign in to comment.