ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.18k stars 9.71k forks source link

Perception module Failed on Xavier #12846

Closed huangxiao2008 closed 4 years ago

huangxiao2008 commented 4 years ago

Currently, I run Apollo on Xavier with lgsvl.

After modifying some SSE2 code by sse2neon, I could successfully compile apollo on master branch.

However, when running Perception module by

mainboard -d /apollo/modules/perception/production/dag/dag_streaming_perception_lgsvl.dag

crash happens, and it seems to be running into an infinite recursive function. with part of the stack like this:

`#0 std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs ( this=this@entry=0x7fffffcbb0, match_mode=__match_mode@entry=std::detail::_Executor<gnu_cxx::__normal_iterator<char const*, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::normal_iterator<char const*, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_Match_mode::_Exact, __i=-9214364837600034816) at /usr/include/c++/5/bits/regex_executor.tcc:200

1 0x0000007fb55dbc58 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=this@entry=0x7fffffcbb0,

__match_mode=__match_mode@entry=std::__detail::_Executor<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::regex_traits<char>, true>::_Match_mode::_Exact, __i=1) at /usr/include/c++/5/bits/regex_executor.tcc:390

2 0x0000007fb55dbf68 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=this@entry=0x7fffffcbb0,

__match_mode=__match_mode@entry=std::__detail::_Executor<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::regex_traits<char>, true>::_Match_mode::_Exact, __i=-9214364837600034816) at /usr/include/c++/5/bits/regex_executor.tcc:257

3 0x0000007fb55dbc58 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=this@entry=0x7fffffcbb0,

__match_mode=__match_mode@entry=std::__detail::_Executor<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::regex_traits<char>, true>::_Match_mode::_Exact, __i=1) at /usr/include/c++/5/bits/regex_executor.tcc:390

4 0x0000007fb55dbf68 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=this@entry=0x7fffffcbb0,

__match_mode=__match_mode@entry=std::__detail::_Executor<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::regex_traits<char>, true>::_Match_mode::_Exact, __i=-9214364837600034816) at /usr/include/c++/5/bits/regex_executor.tcc:257

5 0x0000007fb55dbc58 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=this@entry=0x7fffffcbb0,

__match_mode=__match_mode@entry=std::__detail::_Executor<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::regex_traits<char>, true>::_Match_mode::_Exact, __i=1) at /usr/include/c++/5/bits/regex_executor.tcc:390

6 0x0000007fb55dbf68 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=this@entry=0x7fffffcbb0,

__match_mode=__match_mode@entry=std::__detail::_Executor<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::regex_traits<char>, true>::_Match_mode::_Exact, __i=-9214364837600034816) at /usr/include/c++/5/bits/regex_executor.tcc:257

7 0x0000007fb55dbc58 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=this@entry=0x7fffffcbb0,

__match_mode=__match_mode@entry=std::__detail::_Executor<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::regex_traits<char>, tr---Type <return> to continue, or q <return> to quit---

ue>::_Match_mode::_Exact, __i=1) at /usr/include/c++/5/bits/regex_executor.tcc:390

8 0x0000007fb55dbf68 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=this@entry=0x7fffffcbb0,

__match_mode=__match_mode@entry=std::__detail::_Executor<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::regex_traits<char>, true>::_Match_mode::_Exact, __i=-9214364837600034816) at /usr/include/c++/5/bits/regex_executor.tcc:257

9 0x0000007fb55dbc58 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=this@entry=0x7fffffcbb0,

__match_mode=__match_mode@entry=std::__detail::_Executor<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::regex_traits<char>, true>::_Match_mode::_Exact, __i=1) at /usr/include/c++/5/bits/regex_executor.tcc:390

10 0x0000007fb55dbf68 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=this@entry=0x7fffffcbb0,

__match_mode=__match_mode@entry=std::__detail::_Executor<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::regex_traits<char>, true>::_Match_mode::_Exact, __i=-9214364837600034816) at /usr/include/c++/5/bits/regex_executor.tcc:257`

So, what's wrong and could anyone solve the problem?

storypku commented 4 years ago

Thank you for your interest in running Apollo on Xavier. However, AArch64 support of Apollo is still WIP currently, and PRs are welcome to run Apollo on platforms other than x86_64.

huangxiao2008 commented 4 years ago

The stack printed in reverse by gdb, hoping Apollo be runnable soon~~~

30789 0x0000007fb55dbc58 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=0x7fffffcbb0,

__match_mode=__match_mode@entry=std::__detail::_Executor<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::__cxx11::regex_traits<char>, true>::_Match_mode::_Exact, __i=1) at /usr/include/c++/5/bits/regex_executor.tcc:390

30790 0x0000007fb55dbf68 in std::detail::_Executor<__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, std::cxx11::regex_traits, true>::_M_dfs (this=, __match_mode=, __i=0) at /usr/include/c++/5/bits/regex_executor.tcc:257

30791 0x0000007f370fe170 in bool std::detail::regex_algo_impl<gnu_cxx::__normal_iterator<char const*, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::normal_iterator<char const*, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >, char, std::cxx11::regex_traits<c---Type to continue, or q to quit---

har>, (std::detail::_RegexExecutorPolicy)0, true>(__gnu_cxx::normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, gnu_cxx::__normal_iterator<char const, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::cxx11::match_results<gnu_cxx::__normal_iterator<char const*, std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::cxx11::sub_match<__gnu_cxx::normal_iterator<char const*, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > > >&, std::cxx11::basic_regex<char, std::__cxx11::regex_traits > const&, std::regex_constants::match_flag_type) () from /usr/local/libtorch_gpu/lib/libc10.so

30792 0x0000007f370f6994 in c10::Device::Device(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) () from /usr/local/libtorch_gpu/lib/libc10.so

30793 0x0000007f35e81230 in torch::jit::Unpickler::readInstruction() () from /usr/local/libtorch_gpu/lib/libtorch_cpu.so

30794 0x0000007f35e82ba8 in torch::jit::Unpickler::run() () from /usr/local/libtorch_gpu/lib/libtorch_cpu.so

30795 0x0000007f35e82fbc in torch::jit::Unpickler::parse_ivalue() () from /usr/local/libtorch_gpu/lib/libtorch_cpu.so

30796 0x0000007f35e2d404 in torch::jit::readArchiveAndTensors(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, c10::optional<std::function<c10::StrongTypePtr (c10::QualifiedName const&)> >, c10::optional<std::function<c10::intrusive_ptr<c10::ivalue::Object, c10::detail::intrusive_target_default_null_type > (c10::StrongTypePtr, c10::IValue)> >, c10::optional, caffe2::serialize::PyTorchStreamReader&) () from /usr/local/libtorch_gpu/lib/libtorch_cpu.so

30797 0x0000007f35e2d724 in torch::jit::(anonymous namespace)::ScriptModuleDeserializer::readArchive(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) ()

from /usr/local/libtorch_gpu/lib/libtorch_cpu.so

30798 0x0000007f35e2e714 in torch::jit::(anonymous namespace)::ScriptModuleDeserializer::deserialize(c10::optional, std::unordered_map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::hash<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::equal_to<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >&) () from /usr/local/libtorch_gpu/lib/libtorch_cpu.so

30799 0x0000007f35e2f3c0 in torch::jit::load(std::unique_ptr<caffe2::serialize::ReadAdapterInterface, std::default_delete >, c10::optional, std::unordered_map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::hash<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::equal_to<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >&) ()

from /usr/local/libtorch_gpu/lib/libtorch_cpu.so

30800 0x0000007f35e313a4 in torch::jit::load(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, c10::optional, std::unordered_map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::hash<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::equal_to<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator > const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >&) () from /usr/local/libtorch_gpu/lib/libtorch_cpu.so

30801 0x0000007fac16c9a0 in apollo::perception::lidar::PointPillars::InitTorch() ()

from /apollo/bazel-bin/modules/perception/onboard/component/../../../../_solib_local/libmodules_Sperception_Slidar_Slib_Sdetection_Slidar_Upoint_Upillars_Slibpoint_Upillars.so

30802 0x0000007fac16a740 in apollo::perception::lidar::PointPillars::PointPillars(bool, float, float, std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >) ()

from /apollo/bazel-bin/modules/perception/onboard/component/../../../../_solib_local/libmodules_Sperception_Slidar_Slib_Sdetection_Slidar_Upoint_Upillars_Slibpoint_Upillars.so

30803 0x0000007fac2c8d54 in apollo::perception::lidar::PointPillarsDetection::Init(apollo::perception::lidar::DetectionInitOptions const&) ()

from /apollo/bazel-bin/modules/perception/onboard/component/../../../../_solib_local/libmodules_Sperception_Slidar_Slib_Sdetection_Slidar_Upoint_Upillars_Slibpoint_Upillars_Udetection.so

30804 0x0000007fb40b35c0 in apollo::perception::lidar::LidarObstacleDetection::Init(apollo::perception::lidar::LidarObstacleDetectionInitOptions const&) ()

from /apollo/bazel-bin/modules/perception/onboard/component/../../../../_solib_local/libmodules_Sperception_Slidar_Sapp_Sliblidar_Uobstacle_Udetection.so

30805 0x0000007fac690ea0 in apollo::perception::onboard::DetectionComponent::InitAlgorithmPlugin() ()

from /apollo/bazel-bin/modules/perception/onboard/component/../../../../_solib_local/libmodules_Sperception_Sonboard_Scomponent_Slibdetection_Ucomponent.so

30806 0x0000007fac690800 in apollo::perception::onboard::DetectionComponent::Init() ()

from /apollo/bazel-bin/modules/perception/onboard/component/../../../../_solib_local/libmodules_Sperception_Sonboard_Scomponent_Slibdetection_Ucomponent.so

30807 0x0000007fac6de5c0 in apollo::cyber::Component<apollo::drivers::PointCloud, apollo::cyber::NullType, apollo::cyber::NullType, apollo::cyber::NullType>::Initialize(apollo::cyber::proto::ComponentConfig const&) () from /apollo/bazel-bin/modules/perception/onboard/component/../../../../_solib_local/libmodules_Sperception_Sonboard_Scomponent_Slibdetection_Ucomponent.so

30808 0x000000555556a880 in apollo::cyber::mainboard::ModuleController::LoadModule(apollo::cyber::proto::DagConfig const&) ()

30809 0x000000555556ac2c in apollo::cyber::mainboard::ModuleController::LoadModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) ()

30810 0x000000555556a3d8 in apollo::cyber::mainboard::ModuleController::LoadAll() ()

30811 0x0000005555566f2c in apollo::cyber::mainboard::ModuleController::Init() ()

30812 0x0000005555565c00 in main ()