[ 
https://issues.apache.org/jira/browse/ARROW-9448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17156988#comment-17156988
 ] 

David Li commented on ARROW-9448:
---------------------------------

Adding a test like this is enough
{code:java}
  @Test
  public void testZeroBuf() {
    allocator.getEmpty().print(new StringBuilder(), 0, 
BaseAllocator.Verbosity.LOG_WITH_STACKTRACE);
  }
{code}
 

> [Java] Circular initialization between ArrowBuf and BaseAllocator leads to 
> null HistoricalLog for empty buffer
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: ARROW-9448
>                 URL: https://issues.apache.org/jira/browse/ARROW-9448
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: 1.0.0
>            Reporter: David Li
>            Priority: Blocker
>
> Still working on a reproduction (this is internal code), but what I see is:
>  # Test initializes a RootAllocator in a JUnit @Before
>  # BaseAllocator.<clinit> creates a Config
>  # The constructor of ImmutableConfig gets the allocation manager
>  # This eventually runs NettyAllocationManager.<clinit>
>  # This creates a static ArrowBuf as the empty buffer
>  # The ArrowBuf has a null HistoricalLog as BaseAllocator hasn't fully 
> initialized yet



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to