lidavidm opened a new issue, #203:
URL: https://github.com/apache/arrow-nanoarrow/issues/203

   Why: otherwise, consumers like libarrow won't realize that the stream is 
already released:
   
   
https://github.com/apache/arrow/blob/6bd31f37ae66bd35594b077cb2f830be57e08acd/cpp/src/arrow/c/helpers.h#L107C1-L113
   
   Then, code that combines an [explicit 
Close](https://github.com/apache/arrow/blob/6bd31f37ae66bd35594b077cb2f830be57e08acd/cpp/src/arrow/c/bridge.cc#L1807-L1812)
 with the 
[destructor](https://github.com/apache/arrow/blob/6bd31f37ae66bd35594b077cb2f830be57e08acd/cpp/src/arrow/c/bridge.cc#L1782-L1787)
 will crash:
   
   ```
   Thread 1 "python" received signal SIGSEGV, Segmentation fault.
   0x0000555556620ba0 in ?? ()
   (gdb) bt
   #0  0x0000555556620ba0 in ?? ()
   #1  0x00007fff6724ea71 in nanoarrow::EmptyArrayStream::release_wrapper 
(stream=0x55555661c0c8)
       at 
/home/lidavidm/Code/upstream/adbc/adbc-1.1.0/c/vendor/nanoarrow/nanoarrow.hpp:252
   #2  0x00007ffff497eaf7 in std::_Sp_counted_ptr_inplace<arrow::(anonymous 
namespace)::ArrayStreamBatchReader, std::allocator<void>, 
(__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
      from 
/home/lidavidm/miniforge3/envs/adbc/lib/python3.11/site-packages/pyarrow/../../../libarrow.so.1100
   #3  0x00007ffff5f5a323 in 
__pyx_tp_dealloc_7pyarrow_3lib_RecordBatchReader(_object*) ()
      from 
/home/lidavidm/miniforge3/envs/adbc/lib/python3.11/site-packages/pyarrow/lib.cpython-311-x86_64-linux-gnu.so
   ```
   
   (I will also file a libarrow bug.)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to