drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venki Korukanti (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-2088) BitVector.Mutator.setValueCount() fails with invalid buffer access
Date Wed, 28 Jan 2015 02:20:34 GMT
Venki Korukanti created DRILL-2088:

             Summary: BitVector.Mutator.setValueCount() fails with invalid buffer access
                 Key: DRILL-2088
                 URL: https://issues.apache.org/jira/browse/DRILL-2088
             Project: Apache Drill
          Issue Type: Bug
            Reporter: Venki Korukanti

Run the following physical plan:

            url: "http://apache.org",
                {records: 100, types: [
                  {name: "blue", type: "BIT", mode: "REQUIRED"},
                  {name: "red", type: "BIGINT", mode: "REQUIRED"},
                  {name: "green", type: "INT", mode: "OPTIONAL"}
            child: 1,
            @id: 3,
            child: 2,
            pop: "screen"

It fails with:

Failure while running fragment., index: 0, length: 8192 (expected: range(0, 1024))

Couple of issues:
1. We don't transfer valueCapacity as part of TransferPair.transfer(). This causes the vector
that got the buffers to have 0 as valueCapacity. During the realloc of vector that got the
buffer, we rely on valueCapacity to decide whether to realloc or not.

2. When BitVector.Mutator.setValueCount() is called we try to reallocate the buffer as the
valueCapacity is zero. As part of realloc, we allocate a buffer of size 1028bytes and try
to copy the existing buffer. Problem is existing buffer has size more than 1028bytes and we
fail in copying. 

This message was sent by Atlassian JIRA

View raw message