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

Jian Fang edited comment on PARQUET-1169 at 12/6/17 7:29 PM:
-------------------------------------------------------------

Here is the stacktrace from gdb:

{code}
Program received signal SIGSEGV, Segmentation fault.
__memmove_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1914
1914    ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: No such file or 
directory.
{code}

{code}
#0  __memmove_ssse3_back () at 
../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1914
#1  0x00007ffff79d2033 in std::__copy_move<false, true, 
std::random_access_iterator_tag>::__copy_m<short> (__first=0x2, __last=0x1c, 
__result=0x0) at /usr/include/c++/5/bits/stl_algobase.h:384
#2  0x00007ffff79d18d6 in std::__copy_move_a<false, short*, short*> 
(__first=0x2, __last=0x1c, __result=0x0) at 
/usr/include/c++/5/bits/stl_algobase.h:402
#3  0x00007ffff79d1201 in std::__copy_move_a2<false, short*, short*> 
(__first=0x2, __last=0x1c, __result=0x0) at 
/usr/include/c++/5/bits/stl_algobase.h:440
#4  0x00007ffff79cf2fc in std::copy<short*, short*> (__first=0x2, __last=0x1c, 
__result=0x0) at /usr/include/c++/5/bits/stl_algobase.h:472
#5  0x00007ffff79ccac2 in 
parquet::internal::RecordReader::RecordReaderImpl::Reset (this=0x621e80) at 
/root/parquet-cpp/src/parquet/arrow/record_reader.cc:259
#6  0x00007ffff79bfd7e in parquet::internal::RecordReader::Reset 
(this=0x621c40) at /root/parquet-cpp/src/parquet/arrow/record_reader.cc:770
#7  0x00007ffff7978736 in parquet::arrow::PrimitiveImpl::NextBatch 
(this=0x620f00, records_to_read=1, out=0x7fffffffec10) at 
/root/parquet-cpp/src/parquet/arrow/reader.cc:1141
#8  0x00007ffff797b730 in parquet::arrow::ColumnReader::NextBatch 
(this=0x6224d0, records_to_read=1, out=0x7fffffffec10) at 
/root/parquet-cpp/src/parquet/arrow/reader.cc:1238
#9  0x0000000000404a9a in main ()
{code}


was (Author: frankfang):
Here is the stacktrace from gdb:

{code}
Program received signal SIGSEGV, Segmentation fault.
__memmove_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1914
1914    ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: No such file or 
directory.
{code}

{code}
#0  __memmove_ssse3_back () at 
../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1914
#1  0x00007ffff7ad3642 in 
parquet::internal::RecordReader::RecordReaderImpl::Reset() () from 
/usr/local/lib/libparquet.so.1
#2  0x00007ffff7aba4bb in parquet::arrow::PrimitiveImpl::NextBatch(long, 
std::shared_ptr<arrow::Array>*) () from /usr/local/lib/libparquet.so.1
#3  0x00007ffff7ab798e in parquet::arrow::ColumnReader::NextBatch(long, 
std::shared_ptr<arrow::Array>*) () from /usr/local/lib/libparquet.so.1
#4  0x0000000000402b6e in main ()
{code}

> Segment fault when using NextBatch of parquet::arrow::ColumnReader in 
> parquet-cpp
> ---------------------------------------------------------------------------------
>
>                 Key: PARQUET-1169
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1169
>             Project: Parquet
>          Issue Type: Bug
>          Components: parquet-cpp
>            Reporter: Jian Fang
>         Attachments: test.parquet
>
>
> When I running the below code, I consistently get segment fault, not sure 
> whether this is a bug or I did something wrong. Anyone here could help me 
> take a look?
> {code:c++}
> #include <iostream>
> #include <string>
> #include "arrow/array.h"
> #include "arrow/io/file.h"
> #include "arrow/test-util.h"
> #include "parquet/arrow/reader.h"
> using arrow::Array;
> using arrow::default_memory_pool;
> using arrow::io::FileMode;
> using arrow::io::MemoryMappedFile;
> using parquet::arrow::ColumnReader;
> using parquet::arrow::FileReader;
> using parquet::arrow::OpenFile;
> int main(int argc, char** argv) {
>   if (argc > 1) {
>     std::string file_name = argv[1];
>     std::shared_ptr<MemoryMappedFile> file;
>     ABORT_NOT_OK(MemoryMappedFile::Open(file_name, FileMode::READ, &file));
>     std::unique_ptr<FileReader> file_reader;
>     ABORT_NOT_OK(OpenFile(file, default_memory_pool(), &file_reader));
>     std::unique_ptr<ColumnReader> column_reader;
>     ABORT_NOT_OK(file_reader->GetColumn(0, &column_reader));
>     std::shared_ptr<Array> array1;
>     ABORT_NOT_OK(column_reader->NextBatch(1, &array1));
>     std::cout << "length " << array1->length() << std::endl;
>     std::shared_ptr<Array> array2;
>     // segment fault
>     ABORT_NOT_OK(column_reader->NextBatch(1, &array2));
>     std::cout << "length " << array2->length() << std::endl;
>   }
>   return 0;
> }
> {code}
> Command to compile this program:
> {code}
> g++ test.c -I/usr/local/include/arrow -I/usr/local/include/parquet 
> --std=c++11 -lparquet -larrow -lgtest -o parquet_test
> {code}
> Command to run the program
> {code}
> ./parquet_test test.parquet
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to