You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "mdianjun (via GitHub)" <gi...@apache.org> on 2024/03/01 09:56:40 UTC

[I] Assert failed when concatenating batches [arrow]

mdianjun opened a new issue, #40304:
URL: https://github.com/apache/arrow/issues/40304

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   I encountered a crash in this stack:
   ```
   #0  0x00007f0bd7b5a2ab in raise () from /lib/x86_64-linux-gnu/libpthread.so.0
   #1  0x000055c040714fd6 in StandardHandlerForSigillSigsegvSigbus_OnMainThread (processName=0x55c040fd4e12 "Segment process", postgres_signal_arg=6) at elog.c:5116
   #2  0x000055c04053e48d in CdbProgramErrorHandler (postgres_signal_arg=6) at postgres.c:3796
   #3  <signal handler called>
   #4  0x00007f0bd764b00b in raise () from /lib/x86_64-linux-gnu/libc.so.6
   #5  0x00007f0bd762a859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
   #6  0x00007f0bdb5a6cac in arrow::util::CerrLog::~CerrLog (this=0x55c041eb6780, __in_chrg=<optimized out>) at /home/gpadmin/export/arrow/cpp/src/arrow/util/logging.cc:72
   #7  0x00007f0bdb5a6ccc in arrow::util::CerrLog::~CerrLog (this=0x55c041eb6780, __in_chrg=<optimized out>) at /home/gpadmin/export/arrow/cpp/src/arrow/util/logging.cc:74
   #8  0x00007f0bdb5a6adf in arrow::util::ArrowLog::~ArrowLog (this=0x7ffd49cd6cb0, __in_chrg=<optimized out>) at /home/gpadmin/export/arrow/cpp/src/arrow/util/logging.cc:250
   #9  0x00007f0bdb0cf8f9 in arrow::(anonymous namespace)::ConcatenateImpl::Buffers (this=0x7ffd49cd6f60, index=2, ranges=...) at /home/gpadmin/export/arrow/cpp/src/arrow/array/concatenate.cc:503
   #10 0x00007f0bdb0cbf21 in arrow::(anonymous namespace)::ConcatenateImpl::Visit (this=0x7ffd49cd6f60) at /home/gpadmin/export/arrow/cpp/src/arrow/array/concatenate.cc:219
   #11 0x00007f0bdb0d128c in arrow::VisitTypeInline<arrow::(anonymous namespace)::ConcatenateImpl> (type=..., visitor=0x7ffd49cd6f60) at /home/gpadmin/export/arrow/cpp/src/arrow/visit_type_inline.h:54
   #12 0x00007f0bdb0cb957 in arrow::(anonymous namespace)::ConcatenateImpl::Concatenate (this=0x7ffd49cd6f60, out=0x7ffd49cd6f30) at /home/gpadmin/export/arrow/cpp/src/arrow/array/concatenate.cc:197
   #13 0x00007f0bdb0d0d13 in arrow::Concatenate (arrays=..., pool=0x7f0bdd30f928 <arrow::global_state+8>) at /home/gpadmin/export/arrow/cpp/src/arrow/array/concatenate.cc:620
   ...
   ```
   
   Finally, I found this function of ConcatenateImpl possibly has a bug:
   ```C++
     Status Visit(const BinaryType&) {
       std::vector<Range> value_ranges;
       ARROW_ASSIGN_OR_RAISE(auto index_buffers, Buffers(1, sizeof(int32_t)));
       RETURN_NOT_OK(ConcatenateOffsets<int32_t>(index_buffers, pool_, &out_->buffers[1],
                                                 &value_ranges));
       ARROW_ASSIGN_OR_RAISE(auto value_buffers, Buffers(2, value_ranges));
       return ConcatenateBuffers(value_buffers, pool_).Value(&out_->buffers[2]);
     }
   ```
   The returned buffers from `Buffers(1, sizeof(int32_t))` may have different length with `in_` due to the nullptr buffer in `in_`, and then we get the same length with `index_buffers` for `value_ranges`, but `Buffers(2, value_ranges)` checks failed for the lengths of `in_` and `value_ranges`.
   
   
   
   
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Assert failed when concatenating batches [arrow]

Posted by "mdianjun (via GitHub)" <gi...@apache.org>.
mdianjun closed issue #40304: Assert failed when concatenating batches
URL: https://github.com/apache/arrow/issues/40304


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org