rapidsai / cuml

cuML - RAPIDS Machine Learning Library
https://docs.rapids.ai/api/cuml/stable/
Apache License 2.0
4.16k stars 525 forks source link

[BUG] spdlog symbols in libcuml++.so conflict with the dynamic loaded library use spdlog. #4451

Closed AndrewTsao closed 1 year ago

AndrewTsao commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

We integrate rapids in an application that load a dynamic loaded library build with spdlog and build with another verion gcc(4.8.5). then crash. Because of symbol conflict with spdlog in libcuml++.so.

Steps/Code to reproduce bug Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.

[2021-12-15 18:31:12.916] [info] [fil.cpp:161] Loaded model from ./data/lgbm_clean.txt, ok!

Program received signal SIGFPE, Arithmetic exception.
0x00000000004151ad in std::__detail::_Mod_range_hashing::operator() (this=0x2af50078, __num=76, __den=0)
    at /usr/include/c++/4.8.2/bits/hashtable_policy.h:345
345         { return __num % __den; }
Missing separate debuginfos, use: debuginfo-install glibc-2.17-324.el7_9.x86_64
(gdb) bt
#0  0x00000000004151ad in std::__detail::_Mod_range_hashing::operator() (this=0x2af50078, __num=76, __den=0)
    at /usr/include/c++/4.8.2/bits/hashtable_policy.h:345
#1  0x00002aaaab0982b7 in std::__detail::_Hash_code_base<char, std::pair<char const, std::unique_ptr<spdlog::custom_flag_formatter, std::default_delete<spdlog::custom_flag_formatter> > >, std::__detail::_Select1st, std::hash<char>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, false>::_M_bucket_index (this=0x2af50078, __c=76, __n=0) at /usr/include/c++/4.8.2/bits/hashtable_policy.h:1023
#2  0x00002aaaab081fc2 in std::_Hashtable<char, std::pair<char const, std::unique_ptr<spdlog::custom_flag_formatter, std::default_delete<spdlog::custom_flag_formatter> > >, std::allocator<std::pair<char const, std::unique_ptr<spdlog::custom_flag_formatter, std::default_delete<spdlog::custom_flag_formatter> > > >, std::__detail::_Select1st, std::equal_to<char>, std::hash<char>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_bucket_index (this=0x2af50078, __k=@0x7fffffffc464: 76 'L', __c=76) at /usr/include/c++/4.8.2/bits/hashtable.h:593
#3  0x00002aaaab0823b8 in std::_Hashtable<char, std::pair<char const, std::unique_ptr<spdlog::custom_flag_formatter, std::default_delete<spdlog::custom_flag_formatter> > >, std::allocator<std::pair<char const, std::unique_ptr<spdlog::custom_flag_formatter, std::default_delete<spdlog::custom_flag_formatter> > > >, std::__detail::_Select1st, std::equal_to<char>, std::hash<char>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::find (
    this=0x2af50078, __k=@0x7fffffffc464: 76 'L') at /usr/include/c++/4.8.2/bits/hashtable.h:1024
#4  0x00002aaaab0711a1 in std::unordered_map<char, std::unique_ptr<spdlog::custom_flag_formatter, std::default_delete<spdlog::custom_flag_formatter> >, std::hash<char>, std::equal_to<char>, std::allocator<std::pair<char const, std::unique_ptr<spdlog::custom_flag_formatter, std::default_delete<spdlog::custom_flag_formatter> > > > >::find (this=0x2af50078, __x=@0x7fffffffc464: 76 'L')
    at /usr/include/c++/4.8.2/bits/unordered_map.h:543
#5  0x00002aaaab06c106 in spdlog::pattern_formatter::handle_flag_<spdlog::details::null_scoped_padder> (this=0x2af50000, flag=76 'L',
    padding=...) at /home/caosw/U/Projects/cux/examples/../third-party/spdlog/include/spdlog/pattern_formatter-inl.h:1086
#6  0x00002aaaac36c2be in spdlog::pattern_formatter::compile_pattern_(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /opt/rapidsai-21.06/lib/libcuml++.so
#7  0x00002aaaac35fe77 in ML::Logger::setPattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    () from /opt/rapidsai-21.06/lib/libcuml++.so
#8  0x00002aaaac360645 in ML::Logger::Logger() () from /opt/rapidsai-21.06/lib/libcuml++.so
#9  0x00002aaaac360804 in ML::Logger::get() () from /opt/rapidsai-21.06/lib/libcuml++.so
#10 0x00002aaaac4b0d17 in void ML::fil::from_treelite<double, double>(raft::handle_t const&, ML::fil::forest**, treelite::ModelImpl<double, double> const&, ML::fil::treelite_params_t const*) () from /opt/rapidsai-21.06/lib/libcuml++.so
#11 0x00002aaaac49ef1c in ML::fil::from_treelite(raft::handle_t const&, ML::fil::forest**, void*, ML::fil::treelite_params_t const*) ()
   from /opt/rapidsai-21.06/lib/libcuml++.so
#12 0x00002aaaaba4d428 in cux::fil::ForestInferenceImpl::BuildFILForest(cux::fil::Options const&) ()
   from /home/caosw/U/Projects/cux/examples/cux/lib/libcux_fil.so
#13 0x00002aaaaba4e62b in cux::fil::ForestInferenceImpl::LoadLightGBM(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cux::fil::Options const&) () from /home/caosw/U/Projects/cux/examples/cux/lib/libcux_fil.so
#14 0x00002aaaaba4e8e5 in cux::fil::Load(char const*, unsigned long, std::unique_ptr<cux::fil::ForestInference, std::default_delete<cux::fil::ForestInference> >&, cux::fil::Options const&) () from /home/caosw/U/Projects/cux/examples/cux/lib/libcux_fil.so
#15 0x00002aaaaacd330f in RunFilDemo () at /home/caosw/U/Projects/cux/examples/cux-demo.cpp:33
#16 0x00002aaaaacd3ef3 in xmain (argc=1, argv=0x7fffffffdc88) at /home/caosw/U/Projects/cux/examples/cux-demo.cpp:147
#17 0x0000000000411b59 in main (argc=1, argv=0x7fffffffdc88) at /home/caosw/U/Projects/cux/examples/main.cpp:13

Expected behavior A clear and concise description of what you expected to happen.

Environment details (please complete the following information):

Additional context Add any other context about the problem here.

github-actions[bot] commented 2 years ago

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

github-actions[bot] commented 2 years ago

This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.