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

Yaron Gvili commented on ARROW-16770:
-------------------------------------

To make sure we're on the same page, my interpretation of this issue is that it 
shows there exist a non-contrived setup (which is whatever I happen to have and 
work with for some time now) where a normal Arrow test invocation leads to a 
not-so-trivial SIGSEGV. My intentions in filing this issue are to save time for 
whoever may run into this in the future and to try to find someone who knows 
how to fix it.

[~lidavidm], [~westonpace]: yes, as noted in the description, there is a mixup 
in my setup of GTest 1.10 and 1.11 (I think one was installed by pyarrow-dev 
and another by Ubuntu's apt) yet the point is I didn't do anything contrived to 
reach this setup, so it could happen to others.

Since this issue is currently not a blocker for me and I'm occupied with a 
large project, I'm fine with this staying on hold for the time being.

> [C++] Arrow Substrait test fails with SIGSEGV, possibly due to gtest 1.11.0
> ---------------------------------------------------------------------------
>
>                 Key: ARROW-16770
>                 URL: https://issues.apache.org/jira/browse/ARROW-16770
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>            Reporter: Yaron Gvili
>            Priority: Major
>
> I built Arrow using the instructions in the Python development page, under 
> the pyarrow-dev environment, and found that `arrow-substrait-substrait-test` 
> fails with SIGSEGV - see gdb session below. The same Arrow builds and runs 
> correctly on my system, outside of pyarrow-dev. I suspect this is due to 
> something different about gtest 1.11.0 as compared to gtest 1.10.0 based on 
> the following observations:
>  # The backtrace in the gdb session shows gtest 1.11.0 is used.
>  # The backtrace also shows the error is deep inside gtest, working on an 
> `UnorderedElementsAre` expectation.
>  # My system, outside pyarrow-dev, uses gtest 1.10.0.
>  
> {noformat}
> $ gdb --args ./release/arrow-substrait-substrait-test 
> GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
> Copyright (C) 2020 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Type "show copying" and "show warranty" for details.
> This GDB was configured as "x86_64-linux-gnu".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
>     <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from ./release/arrow-substrait-substrait-test...
> (gdb) run
> Starting program: 
> /mnt/user1/tscontract/github/rtpsw/arrow/cpp/build/debug/release/arrow-substrait-substrait-test
>  
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> [New Thread 0x7ffff41ff700 (LWP 115128)]
> Running main() from 
> /home/conda/feedstock_root/build_artifacts/gtest_1647154636757/work/googletest/src/gtest_main.cc
> [==========] Running 33 tests from 3 test suites.
> [----------] Global test environment set-up.
> [----------] 4 tests from ExtensionIdRegistryTest
> [ RUN      ] ExtensionIdRegistryTest.RegisterTempTypes
> [       OK ] ExtensionIdRegistryTest.RegisterTempTypes (0 ms)
> [ RUN      ] ExtensionIdRegistryTest.RegisterTempFunctions
> [       OK ] ExtensionIdRegistryTest.RegisterTempFunctions (0 ms)
> [ RUN      ] ExtensionIdRegistryTest.RegisterNestedTypes
> [       OK ] ExtensionIdRegistryTest.RegisterNestedTypes (0 ms)
> [ RUN      ] ExtensionIdRegistryTest.RegisterNestedFunctions
> [       OK ] ExtensionIdRegistryTest.RegisterNestedFunctions (0 ms)
> [----------] 4 tests from ExtensionIdRegistryTest (0 ms total)
> [----------] 21 tests from Substrait
> [ RUN      ] Substrait.SupportedTypes
> [       OK ] Substrait.SupportedTypes (0 ms)
> [ RUN      ] Substrait.SupportedExtensionTypes
> [       OK ] Substrait.SupportedExtensionTypes (0 ms)
> [ RUN      ] Substrait.NamedStruct
> [       OK ] Substrait.NamedStruct (0 ms)
> [ RUN      ] Substrait.NoEquivalentArrowType
> [       OK ] Substrait.NoEquivalentArrowType (0 ms)
> [ RUN      ] Substrait.NoEquivalentSubstraitType
> [       OK ] Substrait.NoEquivalentSubstraitType (0 ms)
> [ RUN      ] Substrait.SupportedLiterals
> [       OK ] Substrait.SupportedLiterals (1 ms)
> [ RUN      ] Substrait.CannotDeserializeLiteral
> [       OK ] Substrait.CannotDeserializeLiteral (0 ms)
> [ RUN      ] Substrait.FieldRefRoundTrip
> [       OK ] Substrait.FieldRefRoundTrip (1 ms)
> [ RUN      ] Substrait.RecursiveFieldRef
> [       OK ] Substrait.RecursiveFieldRef (0 ms)
> [ RUN      ] Substrait.FieldRefsInExpressions
> [       OK ] Substrait.FieldRefsInExpressions (0 ms)
> [ RUN      ] Substrait.CallSpecialCaseRoundTrip
> [       OK ] Substrait.CallSpecialCaseRoundTrip (0 ms)
> [ RUN      ] Substrait.CallExtensionFunction
> [       OK ] Substrait.CallExtensionFunction (0 ms)
> [ RUN      ] Substrait.ReadRel
> Thread 1 "arrow-substrait" received signal SIGSEGV, Segmentation fault.
> 0x00005555555b02e6 in 
> testing::internal::MatcherBase<std::__cxx11::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > const&>::MatchAndExplain 
> (listener=0x7fffffffb3a0, x=..., 
>     this=<optimized out>) at 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/x86_64-conda-linux-gnu/include/c++/10.3.0/bits/shared_ptr_base.h:1324
> 1324          get() const noexcept
> (gdb) bt
> #0  0x00005555555b02e6 in 
> testing::internal::MatcherBase<std::__cxx11::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > const&>::MatchAndExplain 
> (listener=0x7fffffffb3a0, x=..., 
>     this=<optimized out>) at 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/x86_64-conda-linux-gnu/include/c++/10.3.0/bits/shared_ptr_base.h:1324
> #1  
> testing::internal::UnorderedElementsAreMatcherImpl<std::vector<std::__cxx11::basic_string<char,
>  std::char_traits<char>, std::allocator<char> >, 
> std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > > > 
> const&>::AnalyzeElements<__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char,
>  std::char_traits<char>, std::allocator<char> > const*, 
> std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, 
> std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > > > > > 
> (listener=0x7fffffffb640, 
>     element_printouts=0x7fffffffb3b0, elem_last=..., elem_first=..., 
> this=0x555555765610) at 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/include/gmock/gmock-matchers.h:3504
> #2  
> testing::internal::UnorderedElementsAreMatcherImpl<std::vector<std::__cxx11::basic_string<char,
>  std::char_traits<char>, std::allocator<char> >, 
> std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > > > const&>::MatchAndExplain (this=0x555555765610, 
> container=..., listener=0x7fffffffb640)
>     at 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/include/gmock/gmock-matchers.h:3464
> #3  0x00005555555af714 in 
> testing::internal::MatcherBase<std::vector<std::__cxx11::basic_string<char, 
> std::char_traits<char>, std::allocator<char> >, 
> std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > > > const&>::MatchAndExplain (listener=0x7fffffffb640, 
> x=..., this=0x7fffffffb620)
>     at 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/x86_64-conda-linux-gnu/include/c++/10.3.0/bits/shared_ptr_base.h:1324
> #4  
> testing::internal::MatcherBase<std::vector<std::__cxx11::basic_string<char, 
> std::char_traits<char>, std::allocator<char> >, 
> std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > > > const&>::Matches (x=..., this=0x7fffffffb620) at 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/include/gtest/gtest-matchers.h:270
> #5  
> testing::internal::PredicateFormatterFromMatcher<testing::internal::UnorderedElementsAreMatcher<std::tuple<char
>  const*, char const*> > 
> >::operator()<std::vector<std::__cxx11::basic_string<char, 
> std::char_traits<char>, std::allocator<char> >, 
> std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > > > > (this=this@entry=0x7fffffffbae0, 
>     value_text=value_text@entry=0x5555555b79f1 "dataset.files()", x=...) at 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/include/gmock/gmock-matchers.h:1544
> #6  0x0000555555598a2b in arrow::engine::Substrait_ReadRel_Test::TestBody 
> (this=<optimized out>) at 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/include/gmock/gmock-matchers.h:3533
> #7  0x00007ffff7c20d3e in void 
> testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, 
> void>(testing::Test*, void (testing::Test::*)(), char const*) ()
>    from 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/lib/libgtest.so.1.11.0
> #8  0x00007ffff7c21011 in testing::Test::Run() () from 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/lib/libgtest.so.1.11.0
> #9  0x00007ffff7c213a7 in testing::TestInfo::Run() () from 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/lib/libgtest.so.1.11.0
> #10 0x00007ffff7c21abc in testing::TestSuite::Run() () from 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/lib/libgtest.so.1.11.0
> #11 0x00007ffff7c2228e in testing::internal::UnitTestImpl::RunAllTests() () 
> from 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/lib/libgtest.so.1.11.0
> #12 0x00007ffff7c216ae in testing::UnitTest::Run() () from 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/lib/libgtest.so.1.11.0
> #13 0x00007ffff7c3f06f in main () from 
> /mnt/soft1/tscontract/pkg/miniconda3/envs/pyarrow-dev/lib/libgtest_main.so.1.11.0
> #14 0x00007ffff5b840b3 in __libc_start_main (main=0x7ffff7c3f030 <main>, 
> argc=1, argv=0x7fffffffc0d8, init=<optimized out>, fini=<optimized out>, 
> rtld_fini=<optimized out>, stack_end=0x7fffffffc0c8)
>     at ../csu/libc-start.c:308
> #15 0x00005555555780f1 in _start () at 
> /mnt/user1/tscontract/github/rtpsw/arrow/cpp/sr
> {noformat}
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to