[jira] [Updated] (ARROW-4242) [C++] Seg fault when running unit tests on fresh Arch Linux install

2019-03-04 Thread Uwe L. Korn (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARROW-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uwe L. Korn updated ARROW-4242:
---
Fix Version/s: (was: 0.14.0)

> [C++] Seg fault when running unit tests on fresh Arch Linux install
> ---
>
> Key: ARROW-4242
> URL: https://issues.apache.org/jira/browse/ARROW-4242
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: C++
> Environment: Arch Linux x86-64
>Reporter: Michael Vilim
>Assignee: Uwe L. Korn
>Priority: Minor
> Attachments: Dockerfile
>
>
> First, let me say I appreciate all the work that has been put into this 
> project. I have been following it with great interest and recently decided to 
> include it in one of my projects.
> However, I have run into an issue with a segmentation fault when trying to 
> run the C++ unit tests (which previously worked for me). This issue appears 
> to be something specific to my system (I am running Arch Linux). I can 
> reproduce the issue with the minimal Docker install of Arch:
> {noformat}
> FROM archimg/base
> RUN \
>  pacman -Sy --noconfirm git cmake gcc make boost autoconf python; \
>  git clone --recursive https://github.com/apache/arrow.git; \
>  cd arrow/cpp; \
>  mkdir build; \
>  cd build; \
>  cmake -DARROW_BUILD_TESTS=ON ..; \
>  make
> {noformat}
> If you create a Dockerfile with those contents and then run
> {noformat}
> docker build -t mvilim/arch-arrow-test-segfault .
> docker run mvilim/arch-arrow-test-segfault /bin/bash -c "cd /arrow/cpp/build; 
> make unittest; gcc --version; cmake --version"{noformat}
> you should be able to reproduce the issue:
> {noformat}
> The following tests FAILED:
>  2 - arrow-array-test (Failed)
>  3 - arrow-buffer-test (Failed)
>  8 - arrow-stl-test (Failed)
>  9 - arrow-type-test (Failed)
>  10 - arrow-table-test (Failed)
>  15 - arrow-compute-boolean-test (Failed)
>  16 - arrow-compute-cast-test (Failed)
>  17 - arrow-compute-hash-test (Failed)
>  18 - arrow-feather-test (Failed)
>  19 - arrow-ipc-read-write-test (Failed)
>  20 - arrow-ipc-json-simple-test (Failed)
>  21 - arrow-ipc-json-test (Failed)
>  24 - arrow-csv-column-builder-test (Failed)
>  28 - arrow-io-compressed-test (Failed)
>  31 - arrow-io-memory-test (Failed){noformat}
> If you run the container interactively and inspect the logs, you will see 
> that all the failures are caused by seg faults.
> I used git bisect to narrow the problem down to commit 7cdab9b06 when the 
> tests were switched to use shared linking by default. Static linking works 
> fine for me (using -DARROW_TEST_LINKAGE=static).
> I also compiled with Clang and -DARROW_USE_ASAN=ON and inspected several of 
> the stack traces. It looks like all the seg faults happen during creation of 
> a shared pointer, but in varied places.
> On creation of Int32Type:
> {noformat}
> ./debug/arrow-array-test
>  AddressSanitizer:DEADLYSIGNAL
>  =
>  ==29563==ERROR: AddressSanitizer: SEGV on unknown address 0x (pc 
> 0x558afa951b70 bp 0x7ffcf1c34880 sp 0x7ffcf1c34810 T0)
>  ==29563==The signal is caused by a READ memory access.
>  ==29563==Hint: address points to the zero page.
>  #0 0x558afa951b6f in std::type_info::operator==(std::type_info const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/typeinfo:123:12
>  #1 0x558afa9b2c16 in std::Sp_counted_ptr_inplace std::allocator, 
> (_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:573:16
>  #2 0x7fe7b711e6f1 in 
> std::_shared_count<(_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info 
> const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:751:31
>  #3 0x7fe7b73ec240 in std::_shared_ptr (gnu_cxx::_Lock_policy)2>::_shared_ptr 
> >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:1328:28
>  #4 0x7fe7b73ec1c7 in 
> std::shared_ptr::shared_ptr
>  >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:360:4
>  #5 0x7fe7b73ec14b in std::shared_ptr 
> std::allocate_shared 
> >(std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:706:14
>  #6 0x7fe7b73cd323 in std::shared_ptr 
> std::make_shared() 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:722:14
>  #7 0x7fe7b73c3f2f in arrow::int32() 
> /home/mvilim/repos/arrow/cpp/src/arrow/type.cc:484:1
>  #8 

[jira] [Updated] (ARROW-4242) [C++] Seg fault when running unit tests on fresh Arch Linux install

2019-03-03 Thread Wes McKinney (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARROW-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wes McKinney updated ARROW-4242:

Fix Version/s: (was: 0.13.0)
   0.14.0

> [C++] Seg fault when running unit tests on fresh Arch Linux install
> ---
>
> Key: ARROW-4242
> URL: https://issues.apache.org/jira/browse/ARROW-4242
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: C++
> Environment: Arch Linux x86-64
>Reporter: Michael Vilim
>Assignee: Uwe L. Korn
>Priority: Minor
> Fix For: 0.14.0
>
> Attachments: Dockerfile
>
>
> First, let me say I appreciate all the work that has been put into this 
> project. I have been following it with great interest and recently decided to 
> include it in one of my projects.
> However, I have run into an issue with a segmentation fault when trying to 
> run the C++ unit tests (which previously worked for me). This issue appears 
> to be something specific to my system (I am running Arch Linux). I can 
> reproduce the issue with the minimal Docker install of Arch:
> {noformat}
> FROM archimg/base
> RUN \
>  pacman -Sy --noconfirm git cmake gcc make boost autoconf python; \
>  git clone --recursive https://github.com/apache/arrow.git; \
>  cd arrow/cpp; \
>  mkdir build; \
>  cd build; \
>  cmake -DARROW_BUILD_TESTS=ON ..; \
>  make
> {noformat}
> If you create a Dockerfile with those contents and then run
> {noformat}
> docker build -t mvilim/arch-arrow-test-segfault .
> docker run mvilim/arch-arrow-test-segfault /bin/bash -c "cd /arrow/cpp/build; 
> make unittest; gcc --version; cmake --version"{noformat}
> you should be able to reproduce the issue:
> {noformat}
> The following tests FAILED:
>  2 - arrow-array-test (Failed)
>  3 - arrow-buffer-test (Failed)
>  8 - arrow-stl-test (Failed)
>  9 - arrow-type-test (Failed)
>  10 - arrow-table-test (Failed)
>  15 - arrow-compute-boolean-test (Failed)
>  16 - arrow-compute-cast-test (Failed)
>  17 - arrow-compute-hash-test (Failed)
>  18 - arrow-feather-test (Failed)
>  19 - arrow-ipc-read-write-test (Failed)
>  20 - arrow-ipc-json-simple-test (Failed)
>  21 - arrow-ipc-json-test (Failed)
>  24 - arrow-csv-column-builder-test (Failed)
>  28 - arrow-io-compressed-test (Failed)
>  31 - arrow-io-memory-test (Failed){noformat}
> If you run the container interactively and inspect the logs, you will see 
> that all the failures are caused by seg faults.
> I used git bisect to narrow the problem down to commit 7cdab9b06 when the 
> tests were switched to use shared linking by default. Static linking works 
> fine for me (using -DARROW_TEST_LINKAGE=static).
> I also compiled with Clang and -DARROW_USE_ASAN=ON and inspected several of 
> the stack traces. It looks like all the seg faults happen during creation of 
> a shared pointer, but in varied places.
> On creation of Int32Type:
> {noformat}
> ./debug/arrow-array-test
>  AddressSanitizer:DEADLYSIGNAL
>  =
>  ==29563==ERROR: AddressSanitizer: SEGV on unknown address 0x (pc 
> 0x558afa951b70 bp 0x7ffcf1c34880 sp 0x7ffcf1c34810 T0)
>  ==29563==The signal is caused by a READ memory access.
>  ==29563==Hint: address points to the zero page.
>  #0 0x558afa951b6f in std::type_info::operator==(std::type_info const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/typeinfo:123:12
>  #1 0x558afa9b2c16 in std::Sp_counted_ptr_inplace std::allocator, 
> (_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:573:16
>  #2 0x7fe7b711e6f1 in 
> std::_shared_count<(_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info 
> const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:751:31
>  #3 0x7fe7b73ec240 in std::_shared_ptr (gnu_cxx::_Lock_policy)2>::_shared_ptr 
> >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:1328:28
>  #4 0x7fe7b73ec1c7 in 
> std::shared_ptr::shared_ptr
>  >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:360:4
>  #5 0x7fe7b73ec14b in std::shared_ptr 
> std::allocate_shared 
> >(std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:706:14
>  #6 0x7fe7b73cd323 in std::shared_ptr 
> std::make_shared() 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:722:14
>  #7 0x7fe7b73c3f2f in arrow::int32() 
> 

[jira] [Updated] (ARROW-4242) [C++] Seg fault when running unit tests on fresh Arch Linux install

2019-01-16 Thread Uwe L. Korn (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARROW-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Uwe L. Korn updated ARROW-4242:
---
Fix Version/s: 0.13.0

> [C++] Seg fault when running unit tests on fresh Arch Linux install
> ---
>
> Key: ARROW-4242
> URL: https://issues.apache.org/jira/browse/ARROW-4242
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: C++
> Environment: Arch Linux x86-64
>Reporter: Michael Vilim
>Priority: Minor
> Fix For: 0.13.0
>
> Attachments: Dockerfile
>
>
> First, let me say I appreciate all the work that has been put into this 
> project. I have been following it with great interest and recently decided to 
> include it in one of my projects.
> However, I have run into an issue with a segmentation fault when trying to 
> run the C++ unit tests (which previously worked for me). This issue appears 
> to be something specific to my system (I am running Arch Linux). I can 
> reproduce the issue with the minimal Docker install of Arch:
> {noformat}
> FROM archimg/base
> RUN \
>  pacman -Sy --noconfirm git cmake gcc make boost autoconf python; \
>  git clone --recursive https://github.com/apache/arrow.git; \
>  cd arrow/cpp; \
>  mkdir build; \
>  cd build; \
>  cmake -DARROW_BUILD_TESTS=ON ..; \
>  make
> {noformat}
> If you create a Dockerfile with those contents and then run
> {noformat}
> docker build -t mvilim/arch-arrow-test-segfault .
> docker run mvilim/arch-arrow-test-segfault /bin/bash -c "cd /arrow/cpp/build; 
> make unittest; gcc --version; cmake --version"{noformat}
> you should be able to reproduce the issue:
> {noformat}
> The following tests FAILED:
>  2 - arrow-array-test (Failed)
>  3 - arrow-buffer-test (Failed)
>  8 - arrow-stl-test (Failed)
>  9 - arrow-type-test (Failed)
>  10 - arrow-table-test (Failed)
>  15 - arrow-compute-boolean-test (Failed)
>  16 - arrow-compute-cast-test (Failed)
>  17 - arrow-compute-hash-test (Failed)
>  18 - arrow-feather-test (Failed)
>  19 - arrow-ipc-read-write-test (Failed)
>  20 - arrow-ipc-json-simple-test (Failed)
>  21 - arrow-ipc-json-test (Failed)
>  24 - arrow-csv-column-builder-test (Failed)
>  28 - arrow-io-compressed-test (Failed)
>  31 - arrow-io-memory-test (Failed){noformat}
> If you run the container interactively and inspect the logs, you will see 
> that all the failures are caused by seg faults.
> I used git bisect to narrow the problem down to commit 7cdab9b06 when the 
> tests were switched to use shared linking by default. Static linking works 
> fine for me (using -DARROW_TEST_LINKAGE=static).
> I also compiled with Clang and -DARROW_USE_ASAN=ON and inspected several of 
> the stack traces. It looks like all the seg faults happen during creation of 
> a shared pointer, but in varied places.
> On creation of Int32Type:
> {noformat}
> ./debug/arrow-array-test
>  AddressSanitizer:DEADLYSIGNAL
>  =
>  ==29563==ERROR: AddressSanitizer: SEGV on unknown address 0x (pc 
> 0x558afa951b70 bp 0x7ffcf1c34880 sp 0x7ffcf1c34810 T0)
>  ==29563==The signal is caused by a READ memory access.
>  ==29563==Hint: address points to the zero page.
>  #0 0x558afa951b6f in std::type_info::operator==(std::type_info const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/typeinfo:123:12
>  #1 0x558afa9b2c16 in std::Sp_counted_ptr_inplace std::allocator, 
> (_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:573:16
>  #2 0x7fe7b711e6f1 in 
> std::_shared_count<(_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info 
> const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:751:31
>  #3 0x7fe7b73ec240 in std::_shared_ptr (gnu_cxx::_Lock_policy)2>::_shared_ptr 
> >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:1328:28
>  #4 0x7fe7b73ec1c7 in 
> std::shared_ptr::shared_ptr
>  >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:360:4
>  #5 0x7fe7b73ec14b in std::shared_ptr 
> std::allocate_shared 
> >(std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:706:14
>  #6 0x7fe7b73cd323 in std::shared_ptr 
> std::make_shared() 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:722:14
>  #7 0x7fe7b73c3f2f in arrow::int32() 
> /home/mvilim/repos/arrow/cpp/src/arrow/type.cc:484:1
>  #8 0x558afa76cc8d 

[jira] [Updated] (ARROW-4242) [C++] Seg fault when running unit tests on fresh Arch Linux install

2019-01-12 Thread Michael Vilim (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARROW-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Vilim updated ARROW-4242:
-
Attachment: Dockerfile

> [C++] Seg fault when running unit tests on fresh Arch Linux install
> ---
>
> Key: ARROW-4242
> URL: https://issues.apache.org/jira/browse/ARROW-4242
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: C++
> Environment: Arch Linux x86-64
>Reporter: Michael Vilim
>Priority: Minor
> Attachments: Dockerfile
>
>
> First, let me say I appreciate all the work that has been put into this 
> project. I have been following it with great interest and recently decided to 
> include it in one of my projects.
> However, I have run into an issue with a segmentation fault when trying to 
> run the C++ unit tests (which previously worked for me). This issue appears 
> to be something specific to my system (I am running Arch Linux). I can 
> reproduce the issue with the minimal Docker install of Arch:
> {noformat}
> FROM archimg/base
> RUN \
>  pacman -Sy --noconfirm git cmake gcc make boost autoconf python; \
>  git clone --recursive https://github.com/apache/arrow.git; \
>  cd arrow/cpp; \
>  mkdir build; \
>  cd build; \
>  cmake -DARROW_BUILD_TESTS=ON ..; \
>  make
> {noformat}
> If you create a Dockerfile with those contents and then run
> {noformat}
> docker build -t mvilim/arch-arrow-test-segfault .
> docker run mvilim/arch-arrow-test-segfault /bin/bash -c "cd /arrow/cpp/build; 
> make unittest; gcc --version; cmake --version"{noformat}
> you should be able to reproduce the issue:
> {noformat}
> The following tests FAILED:
>  2 - arrow-array-test (Failed)
>  3 - arrow-buffer-test (Failed)
>  8 - arrow-stl-test (Failed)
>  9 - arrow-type-test (Failed)
>  10 - arrow-table-test (Failed)
>  15 - arrow-compute-boolean-test (Failed)
>  16 - arrow-compute-cast-test (Failed)
>  17 - arrow-compute-hash-test (Failed)
>  18 - arrow-feather-test (Failed)
>  19 - arrow-ipc-read-write-test (Failed)
>  20 - arrow-ipc-json-simple-test (Failed)
>  21 - arrow-ipc-json-test (Failed)
>  24 - arrow-csv-column-builder-test (Failed)
>  28 - arrow-io-compressed-test (Failed)
>  31 - arrow-io-memory-test (Failed){noformat}
> If you run the container interactively and inspect the logs, you will see 
> that all the failures are caused by seg faults.
> I used git bisect to narrow the problem down to commit 7cdab9b06 when the 
> tests were switched to use shared linking by default. Static linking works 
> fine for me (using -DARROW_TEST_LINKAGE=static).
> I also compiled with Clang and -DARROW_USE_ASAN=ON and inspected several of 
> the stack traces. It looks like all the seg faults happen during creation of 
> a shared pointer, but in varied places.
> On creation of Int32Type:
> {noformat}
> ./debug/arrow-array-test
>  AddressSanitizer:DEADLYSIGNAL
>  =
>  ==29563==ERROR: AddressSanitizer: SEGV on unknown address 0x (pc 
> 0x558afa951b70 bp 0x7ffcf1c34880 sp 0x7ffcf1c34810 T0)
>  ==29563==The signal is caused by a READ memory access.
>  ==29563==Hint: address points to the zero page.
>  #0 0x558afa951b6f in std::type_info::operator==(std::type_info const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/typeinfo:123:12
>  #1 0x558afa9b2c16 in std::Sp_counted_ptr_inplace std::allocator, 
> (_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:573:16
>  #2 0x7fe7b711e6f1 in 
> std::_shared_count<(_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info 
> const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:751:31
>  #3 0x7fe7b73ec240 in std::_shared_ptr (gnu_cxx::_Lock_policy)2>::_shared_ptr 
> >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:1328:28
>  #4 0x7fe7b73ec1c7 in 
> std::shared_ptr::shared_ptr
>  >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:360:4
>  #5 0x7fe7b73ec14b in std::shared_ptr 
> std::allocate_shared 
> >(std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:706:14
>  #6 0x7fe7b73cd323 in std::shared_ptr 
> std::make_shared() 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:722:14
>  #7 0x7fe7b73c3f2f in arrow::int32() 
> /home/mvilim/repos/arrow/cpp/src/arrow/type.cc:484:1
>  #8 0x558afa76cc8d in __cxx_global_var_init.1 

[jira] [Updated] (ARROW-4242) [C++] Seg fault when running unit tests on fresh Arch Linux install

2019-01-12 Thread Michael Vilim (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARROW-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Vilim updated ARROW-4242:
-
Attachment: (was: Dockerfile)

> [C++] Seg fault when running unit tests on fresh Arch Linux install
> ---
>
> Key: ARROW-4242
> URL: https://issues.apache.org/jira/browse/ARROW-4242
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: C++
> Environment: Arch Linux x86-64
>Reporter: Michael Vilim
>Priority: Minor
> Attachments: Dockerfile
>
>
> First, let me say I appreciate all the work that has been put into this 
> project. I have been following it with great interest and recently decided to 
> include it in one of my projects.
> However, I have run into an issue with a segmentation fault when trying to 
> run the C++ unit tests (which previously worked for me). This issue appears 
> to be something specific to my system (I am running Arch Linux). I can 
> reproduce the issue with the minimal Docker install of Arch:
> {noformat}
> FROM archimg/base
> RUN \
>  pacman -Sy --noconfirm git cmake gcc make boost autoconf python; \
>  git clone --recursive https://github.com/apache/arrow.git; \
>  cd arrow/cpp; \
>  mkdir build; \
>  cd build; \
>  cmake -DARROW_BUILD_TESTS=ON ..; \
>  make
> {noformat}
> If you create a Dockerfile with those contents and then run
> {noformat}
> docker build -t mvilim/arch-arrow-test-segfault .
> docker run mvilim/arch-arrow-test-segfault /bin/bash -c "cd /arrow/cpp/build; 
> make unittest; gcc --version; cmake --version"{noformat}
> you should be able to reproduce the issue:
> {noformat}
> The following tests FAILED:
>  2 - arrow-array-test (Failed)
>  3 - arrow-buffer-test (Failed)
>  8 - arrow-stl-test (Failed)
>  9 - arrow-type-test (Failed)
>  10 - arrow-table-test (Failed)
>  15 - arrow-compute-boolean-test (Failed)
>  16 - arrow-compute-cast-test (Failed)
>  17 - arrow-compute-hash-test (Failed)
>  18 - arrow-feather-test (Failed)
>  19 - arrow-ipc-read-write-test (Failed)
>  20 - arrow-ipc-json-simple-test (Failed)
>  21 - arrow-ipc-json-test (Failed)
>  24 - arrow-csv-column-builder-test (Failed)
>  28 - arrow-io-compressed-test (Failed)
>  31 - arrow-io-memory-test (Failed){noformat}
> If you run the container interactively and inspect the logs, you will see 
> that all the failures are caused by seg faults.
> I used git bisect to narrow the problem down to commit 7cdab9b06 when the 
> tests were switched to use shared linking by default. Static linking works 
> fine for me (using -DARROW_TEST_LINKAGE=static).
> I also compiled with Clang and -DARROW_USE_ASAN=ON and inspected several of 
> the stack traces. It looks like all the seg faults happen during creation of 
> a shared pointer, but in varied places.
> On creation of Int32Type:
> {noformat}
> ./debug/arrow-array-test
>  AddressSanitizer:DEADLYSIGNAL
>  =
>  ==29563==ERROR: AddressSanitizer: SEGV on unknown address 0x (pc 
> 0x558afa951b70 bp 0x7ffcf1c34880 sp 0x7ffcf1c34810 T0)
>  ==29563==The signal is caused by a READ memory access.
>  ==29563==Hint: address points to the zero page.
>  #0 0x558afa951b6f in std::type_info::operator==(std::type_info const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/typeinfo:123:12
>  #1 0x558afa9b2c16 in std::Sp_counted_ptr_inplace std::allocator, 
> (_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:573:16
>  #2 0x7fe7b711e6f1 in 
> std::_shared_count<(_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info 
> const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:751:31
>  #3 0x7fe7b73ec240 in std::_shared_ptr (gnu_cxx::_Lock_policy)2>::_shared_ptr 
> >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:1328:28
>  #4 0x7fe7b73ec1c7 in 
> std::shared_ptr::shared_ptr
>  >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:360:4
>  #5 0x7fe7b73ec14b in std::shared_ptr 
> std::allocate_shared 
> >(std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:706:14
>  #6 0x7fe7b73cd323 in std::shared_ptr 
> std::make_shared() 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:722:14
>  #7 0x7fe7b73c3f2f in arrow::int32() 
> /home/mvilim/repos/arrow/cpp/src/arrow/type.cc:484:1
>  #8 0x558afa76cc8d in 

[jira] [Updated] (ARROW-4242) [C++] Seg fault when running unit tests on fresh Arch Linux install

2019-01-12 Thread Michael Vilim (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARROW-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Vilim updated ARROW-4242:
-
Description: 
First, let me say I appreciate all the work that has been put into this 
project. I have been following it with great interest and recently decided to 
include it in one of my projects.

However, I have run into an issue with a segmentation fault when trying to run 
the C++ unit tests (which previously worked for me). This issue appears to be 
something specific to my system (I am running Arch Linux). I can reproduce the 
issue with the minimal Docker install of Arch:
{noformat}
FROM archimg/base

RUN \
 pacman -Sy --noconfirm git cmake gcc make boost autoconf python; \
 git clone --recursive https://github.com/apache/arrow.git; \
 cd arrow/cpp; \
 mkdir build; \
 cd build; \
 cmake -DARROW_BUILD_TESTS=ON ..; \
 make
{noformat}
If you create a Dockerfile with those contents and then run
{noformat}
docker build -t mvilim/arch-arrow-test-segfault .
docker run mvilim/arch-arrow-test-segfault /bin/bash -c "cd /arrow/cpp/build; 
make unittest; gcc --version; cmake --version"{noformat}
you should be able to reproduce the issue:
{noformat}
The following tests FAILED:
 2 - arrow-array-test (Failed)
 3 - arrow-buffer-test (Failed)
 8 - arrow-stl-test (Failed)
 9 - arrow-type-test (Failed)
 10 - arrow-table-test (Failed)
 15 - arrow-compute-boolean-test (Failed)
 16 - arrow-compute-cast-test (Failed)
 17 - arrow-compute-hash-test (Failed)
 18 - arrow-feather-test (Failed)
 19 - arrow-ipc-read-write-test (Failed)
 20 - arrow-ipc-json-simple-test (Failed)
 21 - arrow-ipc-json-test (Failed)
 24 - arrow-csv-column-builder-test (Failed)
 28 - arrow-io-compressed-test (Failed)
 31 - arrow-io-memory-test (Failed){noformat}
If you run the container interactively and inspect the logs, you will see that 
all the failures are caused by seg faults.

I used git bisect to narrow the problem down to commit 7cdab9b06 when the tests 
were switched to use shared linking by default. Static linking works fine for 
me (using -DARROW_TEST_LINKAGE=static).

I also compiled with Clang and -DARROW_USE_ASAN=ON and inspected several of the 
stack traces. It looks like all the seg faults happen during creation of a 
shared pointer, but in varied places.

On creation of Int32Type:
{noformat}
./debug/arrow-array-test
 AddressSanitizer:DEADLYSIGNAL
 =
 ==29563==ERROR: AddressSanitizer: SEGV on unknown address 0x (pc 
0x558afa951b70 bp 0x7ffcf1c34880 sp 0x7ffcf1c34810 T0)
 ==29563==The signal is caused by a READ memory access.
 ==29563==Hint: address points to the zero page.
 #0 0x558afa951b6f in std::type_info::operator==(std::type_info const&) const 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/typeinfo:123:12
 #1 0x558afa9b2c16 in std::Sp_counted_ptr_inplace, 
(_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&) 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:573:16
 #2 0x7fe7b711e6f1 in 
std::_shared_count<(_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info 
const&) const 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:751:31
 #3 0x7fe7b73ec240 in std::_shared_ptr::_shared_ptr 
>(std::_Sp_make_shared_tag, std::allocator const&) 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:1328:28
 #4 0x7fe7b73ec1c7 in 
std::shared_ptr::shared_ptr 
>(std::_Sp_make_shared_tag, std::allocator const&) 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:360:4
 #5 0x7fe7b73ec14b in std::shared_ptr 
std::allocate_shared 
>(std::allocator const&) 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:706:14
 #6 0x7fe7b73cd323 in std::shared_ptr 
std::make_shared() 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:722:14
 #7 0x7fe7b73c3f2f in arrow::int32() 
/home/mvilim/repos/arrow/cpp/src/arrow/type.cc:484:1
 #8 0x558afa76cc8d in __cxx_global_var_init.1 
/home/mvilim/repos/arrow/cpp/src/arrow/ipc/test-common.h:65:30
 #9 0x558afa779ef9 in GLOBAL_sub_I_array_test.cc 
/home/mvilim/repos/arrow/cpp/src/arrow/array-test.cc{noformat}
On creation of a Field:
{noformat}
#6 0x7f74f1947598 in std::shared_ptr 
std::make_shared, std::allocator > const&, 
std::shared_ptr const&, bool&, 
std::shared_ptr 
const&>(std::_cxx11::basic_string, 
std::allocator > const&, std::shared_ptr const&, bool&, 
std::shared_ptr const&) 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:722:14
 #7 0x7f74f193e1e3 in arrow::field(std::__cxx11::basic_string, std::allocator > const&, 
std::shared_ptr const&, bool, 

[jira] [Updated] (ARROW-4242) [C++] Seg fault when running unit tests on fresh Arch Linux install

2019-01-11 Thread Michael Vilim (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARROW-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Vilim updated ARROW-4242:
-
Description: 
First, let me say I appreciate all the work that has been put into this 
project. I have been following it with great interest and recently decided to 
include it in one of my projects.

However, I have run into an issue with a segmentation fault when trying to run 
the C++ unit tests (which previously worked for me). This issue appears to be 
something specific to my system (I am running Arch Linux). I can reproduce the 
issue with the minimal Docker install of Arch:
{noformat}
FROM archimg/base

RUN \
 pacman -Sy --noconfirm git cmake gcc make boost autoconf python; \
 git clone https://github.com/apache/arrow.git; \
 git clone --recursive https://github.com/apache/arrow.git; \
 cd arrow/cpp; \
 mkdir build; \
 cd build; \
 cmake -DARROW_BUILD_TESTS=ON ..; \
 make
{noformat}
If you create a Dockerfile with those contents and then run
{noformat}
docker build -t mvilim/arch-arrow-test-segfault .
docker run mvilim/arch-arrow-test-segfault /bin/bash -c "cd /arrow/cpp/build; 
make unittest; gcc --version; cmake --version"{noformat}
you should be able to reproduce the issue:
{noformat}
The following tests FAILED:
 2 - arrow-array-test (Failed)
 3 - arrow-buffer-test (Failed)
 8 - arrow-stl-test (Failed)
 9 - arrow-type-test (Failed)
 10 - arrow-table-test (Failed)
 15 - arrow-compute-boolean-test (Failed)
 16 - arrow-compute-cast-test (Failed)
 17 - arrow-compute-hash-test (Failed)
 18 - arrow-feather-test (Failed)
 19 - arrow-ipc-read-write-test (Failed)
 20 - arrow-ipc-json-simple-test (Failed)
 21 - arrow-ipc-json-test (Failed)
 24 - arrow-csv-column-builder-test (Failed)
 28 - arrow-io-compressed-test (Failed)
 31 - arrow-io-memory-test (Failed){noformat}
If you run the container interactively and inspect the logs, you will see that 
all the failures are caused by seg faults.

I used git bisect to narrow the problem down to commit 7cdab9b06 when the tests 
were switched to use shared linking by default. Static linking works fine for 
me (using -DARROW_TEST_LINKAGE=static).

I also compiled with Clang and -DARROW_USE_ASAN=ON and inspected several of the 
stack traces. It looks like all the seg faults happen during creation of a 
shared pointer, but in varied places.

On creation of Int32Type:
{noformat}
./debug/arrow-array-test
 AddressSanitizer:DEADLYSIGNAL
 =
 ==29563==ERROR: AddressSanitizer: SEGV on unknown address 0x (pc 
0x558afa951b70 bp 0x7ffcf1c34880 sp 0x7ffcf1c34810 T0)
 ==29563==The signal is caused by a READ memory access.
 ==29563==Hint: address points to the zero page.
 #0 0x558afa951b6f in std::type_info::operator==(std::type_info const&) const 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/typeinfo:123:12
 #1 0x558afa9b2c16 in std::Sp_counted_ptr_inplace, 
(_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&) 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:573:16
 #2 0x7fe7b711e6f1 in 
std::_shared_count<(_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info 
const&) const 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:751:31
 #3 0x7fe7b73ec240 in std::_shared_ptr::_shared_ptr 
>(std::_Sp_make_shared_tag, std::allocator const&) 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:1328:28
 #4 0x7fe7b73ec1c7 in 
std::shared_ptr::shared_ptr 
>(std::_Sp_make_shared_tag, std::allocator const&) 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:360:4
 #5 0x7fe7b73ec14b in std::shared_ptr 
std::allocate_shared 
>(std::allocator const&) 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:706:14
 #6 0x7fe7b73cd323 in std::shared_ptr 
std::make_shared() 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:722:14
 #7 0x7fe7b73c3f2f in arrow::int32() 
/home/mvilim/repos/arrow/cpp/src/arrow/type.cc:484:1
 #8 0x558afa76cc8d in __cxx_global_var_init.1 
/home/mvilim/repos/arrow/cpp/src/arrow/ipc/test-common.h:65:30
 #9 0x558afa779ef9 in GLOBAL_sub_I_array_test.cc 
/home/mvilim/repos/arrow/cpp/src/arrow/array-test.cc{noformat}
On creation of a Field:
{noformat}
#6 0x7f74f1947598 in std::shared_ptr 
std::make_shared, std::allocator > const&, 
std::shared_ptr const&, bool&, 
std::shared_ptr 
const&>(std::_cxx11::basic_string, 
std::allocator > const&, std::shared_ptr const&, bool&, 
std::shared_ptr const&) 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:722:14
 #7 0x7f74f193e1e3 in arrow::field(std::__cxx11::basic_string, std::allocator > 

[jira] [Updated] (ARROW-4242) [C++] Seg fault when running unit tests on fresh Arch Linux install

2019-01-11 Thread Michael Vilim (JIRA)


 [ 
https://issues.apache.org/jira/browse/ARROW-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Vilim updated ARROW-4242:
-
Attachment: Dockerfile

> [C++] Seg fault when running unit tests on fresh Arch Linux install
> ---
>
> Key: ARROW-4242
> URL: https://issues.apache.org/jira/browse/ARROW-4242
> Project: Apache Arrow
>  Issue Type: Bug
>  Components: C++
> Environment: Arch Linux x86-64
>Reporter: Michael Vilim
>Priority: Minor
> Attachments: Dockerfile
>
>
> First, let me say I appreciate all the work that has been put into this 
> project. I have been following it with great interest and recently decided to 
> include it in one of my projects.
> However, I have run into an issue with a segmentation fault when trying to 
> run the C++ unit tests (which previously worked for me). This issue appears 
> to be something specific to my system (I am running Arch Linux). I can 
> reproduce the issue with the minimal Docker install of Arch:
> {noformat}
> FROM archimg/base
> RUN \
>  pacman -Sy --noconfirm git cmake gcc make boost autoconf python; \
>  git clone https://github.com/apache/arrow.git; \
>  git clone --recursive https://github.com/apache/arrow.git; \
>  cd arrow/cpp; \
>  mkdir build; \
>  cd build; \
>  cmake -DARROW_BUILD_TESTS=ON ..; \
>  make
> {noformat}
> If you create a Dockerfile with those contents and then run
> {noformat}
> docker build -t mvilim/arch-arrow-test-segfault .
> docker run mvilim/arch-arrow-test-segfault /bin/bash -c "cd /arrow/cpp/build; 
> make unittest; gcc --version; cmake --version"{noformat}
> you should be able to reproduce the issue:
> {noformat}
> The following tests FAILED:
>  2 - arrow-array-test (Failed)
>  3 - arrow-buffer-test (Failed)
>  8 - arrow-stl-test (Failed)
>  9 - arrow-type-test (Failed)
>  10 - arrow-table-test (Failed)
>  15 - arrow-compute-boolean-test (Failed)
>  16 - arrow-compute-cast-test (Failed)
>  17 - arrow-compute-hash-test (Failed)
>  18 - arrow-feather-test (Failed)
>  19 - arrow-ipc-read-write-test (Failed)
>  20 - arrow-ipc-json-simple-test (Failed)
>  21 - arrow-ipc-json-test (Failed)
>  24 - arrow-csv-column-builder-test (Failed)
>  28 - arrow-io-compressed-test (Failed)
>  31 - arrow-io-memory-test (Failed){noformat}
> If you run the container interactively and inspect the logs, you will see 
> that all the failures are caused by seg faults.
> I used git bisect to narrow the problem down to commit 7cdab9b06 when the 
> tests were switched to use shared linking by default. Static linking works 
> fine for me (using -DARROW_TEST_LINKAGE=static).
> I also compiled with Clang and -DARROW_USE_ASAN=ON and inspected several of 
> the stack traces. It looks like all the seg faults happen during creation of 
> a shared pointer, but in varied places.
> On creation of Int32Type:
> {noformat}
> ./debug/arrow-array-test
>  AddressSanitizer:DEADLYSIGNAL
>  =
>  ==29563==ERROR: AddressSanitizer: SEGV on unknown address 0x (pc 
> 0x558afa951b70 bp 0x7ffcf1c34880 sp 0x7ffcf1c34810 T0)
>  ==29563==The signal is caused by a READ memory access.
>  ==29563==Hint: address points to the zero page.
>  #0 0x558afa951b6f in std::type_info::operator==(std::type_info const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/typeinfo:123:12
>  #1 0x558afa9b2c16 in std::Sp_counted_ptr_inplace std::allocator, 
> (_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:573:16
>  #2 0x7fe7b711e6f1 in 
> std::_shared_count<(_gnu_cxx::_Lock_policy)2>::_M_get_deleter(std::type_info 
> const&) const 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:751:31
>  #3 0x7fe7b73ec240 in std::_shared_ptr (gnu_cxx::_Lock_policy)2>::_shared_ptr 
> >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr_base.h:1328:28
>  #4 0x7fe7b73ec1c7 in 
> std::shared_ptr::shared_ptr
>  >(std::_Sp_make_shared_tag, std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:360:4
>  #5 0x7fe7b73ec14b in std::shared_ptr 
> std::allocate_shared 
> >(std::allocator const&) 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:706:14
>  #6 0x7fe7b73cd323 in std::shared_ptr 
> std::make_shared() 
> /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/8.2.1/bits/shared_ptr.h:722:14
>  #7 0x7fe7b73c3f2f in arrow::int32() 
>