You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2022/01/10 15:47:00 UTC

[jira] [Commented] (ARROW-15286) pyarrow.dataset.FileSystemDataset.take method causes Segmentation Fault

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

Joris Van den Bossche commented on ARROW-15286:
-----------------------------------------------

[~dzubke] thanks for the report! 

I can reproduce this, and running it under gdb gives me the following traceback:

{code}
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fb5d0f2b8dc in std::__shared_ptr<arrow::ArrayData, (__gnu_cxx::_Lock_policy)2>::get (this=0x8)
    at /home/joris/miniconda3/envs/arrow-dev/x86_64-conda-linux-gnu/include/c++/9.3.0/bits/shared_ptr_base.h:1310
1310	      { return _M_ptr; }
(gdb) bt
#0  0x00007fb5d0f2b8dc in std::__shared_ptr<arrow::ArrayData, (__gnu_cxx::_Lock_policy)2>::get (this=0x8)
    at /home/joris/miniconda3/envs/arrow-dev/x86_64-conda-linux-gnu/include/c++/9.3.0/bits/shared_ptr_base.h:1310
#1  0x00007fb5d0f2864b in std::__shared_ptr_access<arrow::ArrayData, (__gnu_cxx::_Lock_policy)2, false, false>::_M_get (this=0x8)
    at /home/joris/miniconda3/envs/arrow-dev/x86_64-conda-linux-gnu/include/c++/9.3.0/bits/shared_ptr_base.h:1021
#2  0x00007fb5d0f25495 in std::__shared_ptr_access<arrow::ArrayData, (__gnu_cxx::_Lock_policy)2, false, false>::operator-> (this=0x8)
    at /home/joris/miniconda3/envs/arrow-dev/x86_64-conda-linux-gnu/include/c++/9.3.0/bits/shared_ptr_base.h:1015
#3  0x00007fb5d0f22387 in arrow::Array::null_count (this=0x0) at ../src/arrow/array/array_base.cc:52
#4  0x00007fb5cd0cd9ea in arrow::dataset::Scanner::TakeRows (this=0x5584436ebbd0, indices=...) at ../src/arrow/dataset/scanner.cc:1036
#5  0x00007fb5cd32cfcc in __pyx_pw_7pyarrow_8_dataset_7Scanner_15take(_object*, _object*) () from /home/joris/scipy/repos/arrow/python/pyarrow/_dataset.cpython-38-x86_64-linux-gnu.so
{code}

> pyarrow.dataset.FileSystemDataset.take method causes Segmentation Fault
> -----------------------------------------------------------------------
>
>                 Key: ARROW-15286
>                 URL: https://issues.apache.org/jira/browse/ARROW-15286
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>    Affects Versions: 5.0.0, 6.0.0, 6.0.1
>         Environment: Ubuntu 18.04, Python 3.8.6; macOS 11.6.2, Python 3.7.5
>            Reporter: Dustin Zubke
>            Priority: Major
>
> Whenever I try calling the `pyarrow.dataset.FileSystemDataset.take` method, I get a segmentation fault. 
> I first encountered this using a proprietary dataset and recreated it with the UC Davis data below. I can successfully run the pyarrow.dataset.FileSystemDataset.to_batches method but not the take() method.  
> Steps to recreate:
> {code:java}
> !wget https://anson.ucdavis.edu/~clarkf/pems_parquet.zip
> !unzip -q pems_parquet.zip
> import pyarrow.dataset as ds
> file_path= "./pems_sorted/station=402264/part-r-00151-ddaee723-f3f6-4f25-a34b-3312172aa6d7.snappy.parquet"
> dataset = ds.dataset(file_path)
> dataset.take(1)
> >>> 80874 segmentation fault
> {code}
> Creating a dataset from a directory as below also results in a segfault.
> {code:java}
> dir_path = "./pems_sorted/station=402264"
> dataset = ds.dataset(dir_path)
> dataset.take(1)
> {code}
> Environments tried:
>  * Ubuntu 18.04, Python 3.8.6
>  * macOS 11.6.2, Python 3.7.5



--
This message was sent by Atlassian Jira
(v8.20.1#820001)