Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CatBoostModel.cpp calls dlerror from libc #27870

Closed
qoega opened this issue Aug 19, 2021 · 3 comments · Fixed by #39629 or #40897
Closed

CatBoostModel.cpp calls dlerror from libc #27870

qoega opened this issue Aug 19, 2021 · 3 comments · Fixed by #39629 or #40897
Assignees
Labels
st-in-progress We are working on the issue currenlty testing Special issue with list of bugs found by CI

Comments

@qoega
Copy link
Member

qoega commented Aug 19, 2021

test_catboost_model_first_evaluate

2021.08.19 13:59:13.236203 [ 348 ] {} <Fatal> BaseDaemon: ########################################
2021.08.19 13:59:13.237234 [ 348 ] {} <Fatal> BaseDaemon: (version 21.9.1.7821 (official build), build id: B93FC7D1AC073387F233DA0D5F4B5D59FC5A5F66) (from thread 194) (query_id: ec2b7d73-664e-46be-8e8a-e48c71f0b91a) Received signal Illegal instruction (4)
2021.08.19 13:59:13.237834 [ 348 ] {} <Fatal> BaseDaemon: Illegal operand.
2021.08.19 13:59:13.238528 [ 348 ] {} <Fatal> BaseDaemon: Stack trace: 0x139acebd 0x1e5d6e4a 0x1e5d17f7 0x1e5ccfa4 0x1e5cc7fa 0x1e5cc74d 0x1e5cc688 0x1e5cc620 0x1e5cc3e0 0x1e5cc064 0x1e5cbe92 0x1e5cbd31 0x1e5cb5dc 0x1e5cb2f7 0x1e5ca59f 0x1e5ca1f6 0x1e590120 0x1e5933d0 0x1e59335c 0x1e5932dc 0x1e59325a 0x1e5931e2 0x1e5a0368 0x1e5a027a 0x1e59cca6 0x1e59ac0b 0x1e598be9 0x1e5c6cff 0x1e5c6ac9 0x1e5c69d2 0x1e593c67 0x1e593bf5 0x1e593f8d 0x1717321d 0x171721b2 0x1631fa33 0x1dc60266 0x1dc5fdb0 0x1dc602c4 0x1e333ca3 0x1e6b61cb
2021.08.19 13:59:13.242518 [ 348 ] {} <Fatal> BaseDaemon: 4. ./obj-x86_64-linux-gnu/../base/harmful/harmful.c:199: dlerror @ 0x139acebd in /usr/bin/clickhouse
2021.08.19 13:59:13.304643 [ 348 ] {} <Fatal> BaseDaemon: 5. ./obj-x86_64-linux-gnu/../src/Common/SharedLibrary.cpp:36: DB::SharedLibrary::getImpl(std::__1::basic_string_view<char, std::__1::char_traits<char> >, bool) @ 0x1e5d6e4a in /usr/bin/clickhouse
2021.08.19 13:59:13.467250 [ 348 ] {} <Fatal> BaseDaemon: 6. ./obj-x86_64-linux-gnu/../src/Common/SharedLibrary.h:24: void* (*DB::SharedLibrary::get<void* (*)()>(std::__1::basic_string_view<char, std::__1::char_traits<char> >))() @ 0x1e5d17f7 in /usr/bin/clickhouse
2021.08.19 13:59:13.627541 [ 348 ] {} <Fatal> BaseDaemon: 7. ./obj-x86_64-linux-gnu/../src/Interpreters/CatBoostModel.cpp:456: void DB::(anonymous namespace)::CatBoostLibHolder::load<void* (*)()>(void* (*&)(), std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1e5ccfa4 in /usr/bin/clickhouse
2021.08.19 13:59:13.785122 [ 348 ] {} <Fatal> BaseDaemon: 8. ./obj-x86_64-linux-gnu/../src/Interpreters/CatBoostModel.cpp:464: DB::(anonymous namespace)::CatBoostLibHolder::initAPI() @ 0x1e5cc7fa in /usr/bin/clickhouse
2021.08.19 13:59:13.941766 [ 348 ] {} <Fatal> BaseDaemon: 9. ./obj-x86_64-linux-gnu/../src/Interpreters/CatBoostModel.cpp:443: DB::(anonymous namespace)::CatBoostLibHolder::CatBoostLibHolder(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x1e5cc74d in /usr/bin/clickhouse
2021.08.19 13:59:14.097582 [ 348 ] {} <Fatal> BaseDaemon: 10. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:886: void std::__1::allocator<DB::(anonymous namespace)::CatBoostLibHolder>::construct<DB::(anonymous namespace)::CatBoostLibHolder, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(DB::(anonymous namespace)::CatBoostLibHolder*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1e5cc688 in /usr/bin/clickhouse
2021.08.19 13:59:14.254706 [ 348 ] {} <Fatal> BaseDaemon: 11. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/__memory/allocator_traits.h:521: void std::__1::allocator_traits<std::__1::allocator<DB::(anonymous namespace)::CatBoostLibHolder> >::__construct<DB::(anonymous namespace)::CatBoostLibHolder, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(std::__1::integral_constant<bool, true>, std::__1::allocator<DB::(anonymous namespace)::CatBoostLibHolder>&, DB::(anonymous namespace)::CatBoostLibHolder*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1e5cc620 in /usr/bin/clickhouse
2021.08.19 13:59:14.411101 [ 348 ] {} <Fatal> BaseDaemon: 12. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/__memory/allocator_traits.h:482: void std::__1::allocator_traits<std::__1::allocator<DB::(anonymous namespace)::CatBoostLibHolder> >::construct<DB::(anonymous namespace)::CatBoostLibHolder, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(std::__1::allocator<DB::(anonymous namespace)::CatBoostLibHolder>&, DB::(anonymous namespace)::CatBoostLibHolder*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1e5cc3e0 in /usr/bin/clickhouse
2021.08.19 13:59:14.568291 [ 348 ] {} <Fatal> BaseDaemon: 13. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:2594: std::__1::__shared_ptr_emplace<DB::(anonymous namespace)::CatBoostLibHolder, std::__1::allocator<DB::(anonymous namespace)::CatBoostLibHolder> >::__shared_ptr_emplace<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(std::__1::allocator<DB::(anonymous namespace)::CatBoostLibHolder>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1e5cc064 in /usr/bin/clickhouse
2021.08.19 13:59:14.735862 [ 348 ] {} <Fatal> BaseDaemon: 14. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:3360: std::__1::shared_ptr<DB::(anonymous namespace)::CatBoostLibHolder> std::__1::allocate_shared<DB::(anonymous namespace)::CatBoostLibHolder, std::__1::allocator<DB::(anonymous namespace)::CatBoostLibHolder>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void>(std::__1::allocator<DB::(anonymous namespace)::CatBoostLibHolder> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1e5cbe92 in /usr/bin/clickhouse
2021.08.19 13:59:14.900351 [ 348 ] {} <Fatal> BaseDaemon: 15. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:3369: std::__1::shared_ptr<DB::(anonymous namespace)::CatBoostLibHolder> std::__1::make_shared<DB::(anonymous namespace)::CatBoostLibHolder, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, void>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1e5cbd31 in /usr/bin/clickhouse
2021.08.19 13:59:15.083533 [ 348 ] {} <Fatal> BaseDaemon: 16. ./obj-x86_64-linux-gnu/../src/Interpreters/CatBoostModel.cpp:490: DB::(anonymous namespace)::getCatBoostWrapperHolder(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) @ 0x1e5cb5dc in /usr/bin/clickhouse
2021.08.19 13:59:15.244953 [ 348 ] {} <Fatal> BaseDaemon: 17. ./obj-x86_64-linux-gnu/../src/Interpreters/CatBoostModel.cpp:502: DB::CatBoostModel::CatBoostModel(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, DB::ExternalLoadableLifetime const&) @ 0x1e5cb2f7 in /usr/bin/clickhouse
2021.08.19 13:59:15.469473 [ 348 ] {} <Fatal> BaseDaemon: 18. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/memory:2068: std::__1::__unique_if<DB::CatBoostModel>::__unique_single std::__1::make_unique<DB::CatBoostModel, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, DB::ExternalLoadableLifetime&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, DB::ExternalLoadableLifetime&) @ 0x1e5ca59f in /usr/bin/clickhouse
2021.08.19 13:59:15.691083 [ 348 ] {} <Fatal> BaseDaemon: 19. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalModelsLoader.cpp:30: DB::ExternalModelsLoader::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Util::AbstractConfiguration const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const @ 0x1e5ca1f6 in /usr/bin/clickhouse
2021.08.19 13:59:16.017786 [ 348 ] {} <Fatal> BaseDaemon: 20. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalLoader.cpp:1498: DB::ExternalLoader::createObject(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&) const @ 0x1e590120 in /usr/bin/clickhouse
2021.08.19 13:59:16.418175 [ 348 ] {} <Fatal> BaseDaemon: 21. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalLoader.cpp:1264: auto DB::ExternalLoader::ExternalLoader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Logger*)::$_1::operator()<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&) const @ 0x1e5933d0 in /usr/bin/clickhouse
2021.08.19 13:59:16.805223 [ 348 ] {} <Fatal> BaseDaemon: 22. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/type_traits:3676: decltype(std::__1::forward<DB::ExternalLoader::ExternalLoader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Logger*)::$_1&>(fp)(std::__1::forward<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(fp0), std::__1::forward<DB::ExternalLoader::ObjectConfig const&>(fp0), std::__1::forward<std::__1::shared_ptr<DB::IExternalLoadable const> const&>(fp0))) std::__1::__invoke<DB::ExternalLoader::ExternalLoader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Logger*)::$_1&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&>(DB::ExternalLoader::ExternalLoader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Logger*)::$_1&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&) @ 0x1e59335c in /usr/bin/clickhouse
2021.08.19 13:59:17.162490 [ 348 ] {} <Fatal> BaseDaemon: 23. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/__functional_base:317: std::__1::shared_ptr<DB::IExternalLoadable const> std::__1::__invoke_void_return_wrapper<std::__1::shared_ptr<DB::IExternalLoadable const> >::__call<DB::ExternalLoader::ExternalLoader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Logger*)::$_1&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&>(DB::ExternalLoader::ExternalLoader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Logger*)::$_1&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&) @ 0x1e5932dc in /usr/bin/clickhouse
2021.08.19 13:59:17.524810 [ 348 ] {} <Fatal> BaseDaemon: 24. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:1608: std::__1::__function::__default_alloc_func<DB::ExternalLoader::ExternalLoader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Logger*)::$_1, std::__1::shared_ptr<DB::IExternalLoadable const> (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&)>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&) @ 0x1e59325a in /usr/bin/clickhouse
2021.08.19 13:59:17.901028 [ 348 ] {} <Fatal> BaseDaemon: 25. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2089: std::__1::shared_ptr<DB::IExternalLoadable const> std::__1::__function::__policy_invoker<std::__1::shared_ptr<DB::IExternalLoadable const> (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&)>::__call_impl<std::__1::__function::__default_alloc_func<DB::ExternalLoader::ExternalLoader(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, Poco::Logger*)::$_1, std::__1::shared_ptr<DB::IExternalLoadable const> (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&)> >(std::__1::__function::__policy_storage const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&) @ 0x1e5931e2 in /usr/bin/clickhouse
2021.08.19 13:59:18.248391 [ 348 ] {} <Fatal> BaseDaemon: 26. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2221: std::__1::__function::__policy_func<std::__1::shared_ptr<DB::IExternalLoadable const> (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&)>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&) const @ 0x1e5a0368 in /usr/bin/clickhouse
2021.08.19 13:59:18.585908 [ 348 ] {} <Fatal> BaseDaemon: 27. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/functional:2560: std::__1::function<std::__1::shared_ptr<DB::IExternalLoadable const> (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&)>::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const> const&) const @ 0x1e5a027a in /usr/bin/clickhouse
2021.08.19 13:59:18.924246 [ 348 ] {} <Fatal> BaseDaemon: 28. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalLoader.cpp:1026: DB::ExternalLoader::LoadingDispatcher::loadSingleObject(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, DB::ExternalLoader::ObjectConfig const&, std::__1::shared_ptr<DB::IExternalLoadable const>) @ 0x1e59cca6 in /usr/bin/clickhouse
2021.08.19 13:59:19.254967 [ 348 ] {} <Fatal> BaseDaemon: 29. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalLoader.cpp:981: DB::ExternalLoader::LoadingDispatcher::doLoading(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long, bool, unsigned long, bool, std::__1::shared_ptr<DB::ThreadGroupStatus>) @ 0x1e59ac0b in /usr/bin/clickhouse
2021.08.19 13:59:19.582242 [ 348 ] {} <Fatal> BaseDaemon: 30. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalLoader.cpp:921: DB::ExternalLoader::LoadingDispatcher::startLoading(DB::ExternalLoader::LoadingDispatcher::Info&, bool, unsigned long) @ 0x1e598be9 in /usr/bin/clickhouse
2021.08.19 13:59:19.975862 [ 348 ] {} <Fatal> BaseDaemon: 31. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalLoader.cpp:0: DB::ExternalLoader::LoadingDispatcher::loadImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >, bool, std::__1::unique_lock<std::__1::mutex>&)::'lambda'()::operator()() const @ 0x1e5c6cff in /usr/bin/clickhouse
2021.08.19 13:59:20.370266 [ 348 ] {} <Fatal> BaseDaemon: 32. ./obj-x86_64-linux-gnu/../contrib/libcxx/include/__mutex_base:405: void std::__1::condition_variable::wait<DB::ExternalLoader::LoadingDispatcher::loadImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >, bool, std::__1::unique_lock<std::__1::mutex>&)::'lambda'()>(std::__1::unique_lock<std::__1::mutex>&, DB::ExternalLoader::LoadingDispatcher::loadImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >, bool, std::__1::unique_lock<std::__1::mutex>&)::'lambda'()) @ 0x1e5c6ac9 in /usr/bin/clickhouse
2021.08.19 13:59:20.758840 [ 348 ] {} <Fatal> BaseDaemon: 33. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalLoader.cpp:829: DB::ExternalLoader::LoadingDispatcher::loadImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >, bool, std::__1::unique_lock<std::__1::mutex>&) @ 0x1e5c69d2 in /usr/bin/clickhouse
2021.08.19 13:59:21.078837 [ 348 ] {} <Fatal> BaseDaemon: 34. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalLoader.cpp:595: DB::ExternalLoader::LoadResult DB::ExternalLoader::LoadingDispatcher::tryLoad<DB::ExternalLoader::LoadResult>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >) @ 0x1e593c67 in /usr/bin/clickhouse
2021.08.19 13:59:21.403902 [ 348 ] {} <Fatal> BaseDaemon: 35. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalLoader.cpp:1354: DB::ExternalLoader::LoadResult DB::ExternalLoader::tryLoad<DB::ExternalLoader::LoadResult, void>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >) const @ 0x1e593bf5 in /usr/bin/clickhouse
2021.08.19 13:59:21.738466 [ 348 ] {} <Fatal> BaseDaemon: 36. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalLoader.cpp:1366: std::__1::shared_ptr<DB::IExternalLoadable const> DB::ExternalLoader::load<std::__1::shared_ptr<DB::IExternalLoadable const>, void>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const @ 0x1e593f8d in /usr/bin/clickhouse
2021.08.19 13:59:22.002970 [ 348 ] {} <Fatal> BaseDaemon: 37. ./obj-x86_64-linux-gnu/../src/Interpreters/ExternalModelsLoader.h:25: DB::ExternalModelsLoader::getModel(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const @ 0x1717321d in /usr/bin/clickhouse
2021.08.19 13:59:22.256946 [ 348 ] {} <Fatal> BaseDaemon: 38. ./obj-x86_64-linux-gnu/../src/Functions/FunctionsExternalModels.cpp:52: DB::FunctionModelEvaluate::getReturnTypeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x171721b2 in /usr/bin/clickhouse
2021.08.19 13:59:22.363653 [ 348 ] {} <Fatal> BaseDaemon: 39. ./obj-x86_64-linux-gnu/../src/Functions/IFunctionAdaptors.h:123: DB::FunctionToOverloadResolverAdaptor::getReturnTypeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x1631fa33 in /usr/bin/clickhouse
2021.08.19 13:59:22.713087 [ 348 ] {} <Fatal> BaseDaemon: 40. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:359: DB::IFunctionOverloadResolver::getReturnTypeWithoutLowCardinality(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x1dc60266 in /usr/bin/clickhouse
2021.08.19 13:59:23.066185 [ 348 ] {} <Fatal> BaseDaemon: 41. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:314: DB::IFunctionOverloadResolver::getReturnType(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x1dc5fdb0 in /usr/bin/clickhouse
2021.08.19 13:59:23.419197 [ 348 ] {} <Fatal> BaseDaemon: 42. ./obj-x86_64-linux-gnu/../src/Functions/IFunction.cpp:329: DB::IFunctionOverloadResolver::build(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName> > const&) const @ 0x1dc602c4 in /usr/bin/clickhouse
2021.08.19 13:59:25.033066 [ 348 ] {} <Fatal> BaseDaemon: 43. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsDAG.cpp:204: DB::ActionsDAG::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<DB::ActionsDAG::Node const*, std::__1::allocator<DB::ActionsDAG::Node const*> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x1e333ca3 in /usr/bin/clickhouse
2021.08.19 13:59:25.662213 [ 348 ] {} <Fatal> BaseDaemon: 44. ./obj-x86_64-linux-gnu/../src/Interpreters/ActionsVisitor.cpp:570: DB::ScopeStack::addFunction(std::__1::shared_ptr<DB::IFunctionOverloadResolver> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) @ 0x1e6b61cb in /usr/bin/clickhouse
2021.08.19 13:59:27.013815 [ 348 ] {} <Fatal> BaseDaemon: Checksum of the binary: 1EFCD06204779A2EAFBED96BAEF63211, integrity check passed.
2021.08.19 13:59:35.964010 [ 190 ] {} <Fatal> Application: Child process was terminated by signal 4.
@qoega qoega added the testing Special issue with list of bugs found by CI label Aug 19, 2021
@qoega qoega changed the title CatBoostModel.cpp calls dlerror from libc CatBoostModel.cpp calls dlerror from libc Aug 19, 2021
@alexey-milovidov
Copy link
Member

@qoega Actually dlerror is Ok. Remove it from harmful.

@alexey-milovidov
Copy link
Member

Although it's not quite clear:

ATTRIBUTES
       For an explanation of the terms used in this section, see attributes(7).

       ┌──────────┬───────────────┬─────────┐
       │Interface │ Attribute     │ Value   │
       ├──────────┼───────────────┼─────────┤
       │dlerror() │ Thread safety │ MT-Safe │
       └──────────┴───────────────┴─────────┘
CONFORMING TO
       POSIX.1-2001.

NOTES
       The message returned by dlerror() may reside in a statically allocated buffer that is overwritten by subsequent dlerror() calls.

The NOTES contradicts with Thread safety.
But I cannot find dlerror_r function.

@alexey-milovidov
Copy link
Member

But our goal is to get rid of dlopen altogether.

@alexey-milovidov alexey-milovidov added the st-in-progress We are working on the issue currenlty label Aug 11, 2022
rschu1ze added a commit that referenced this issue Aug 12, 2022
This commit moves the catboost model evaluation out of the server
process into the library-bridge binary. This serves two goals: On the
one hand, crashes / memory corruptions of the catboost library no longer
affect the server. On the other hand, we can forbid loading dynamic
libraries in the server (catboost was the last consumer of this
functionality), thus improving security.

SQL syntax:

  SELECT
    catboostEvaluate('/path/to/model.bin', FEAT_1, ..., FEAT_N) > 0 AS prediction,
    ACTION AS target
  FROM amazon_train
  LIMIT 10

Required configuration:

  <catboost_lib_path>/path/to/libcatboostmodel.so</catboost_lib_path>

*** Implementation Details ***

The internal protocol between the server and the library-bridge is
simple:

- HTTP GET on path "/extdict_ping":
  A ping, used during the handshake to check if the library-bridge runs.

- HTTP POST on path "extdict_request"
  (1) Send a "catboost_GetTreeCount" request from the server to the
      bridge, containing a library path (e.g /home/user/libcatboost.so) and
      a model path (e.g. /home/user/model.bin). Rirst, this unloads the
      catboost library handler associated to the model path (if it was
      loaded), then loads the catboost library handler associated to the
      model path, then executes GetTreeCount() on the library handler and
      finally sends the result back to the server. Step (1) is called once
      by the server from FunctionCatBoostEvaluate::getReturnTypeImpl(). The
      library path handler is unloaded in the beginning because it contains
      state which may no longer be valid if the user runs
      catboost("/path/to/model.bin", ...) more than once and if "model.bin"
      was updated in between.
  (2) Send "catboost_Evaluate" from the server to the bridge, containing
      the model path and the features to run the interference on. Step (2)
      is called multiple times (once per chunk) by the server from function
      FunctionCatBoostEvaluate::executeImpl(). The library handler for the
      given model path is expected to be already loaded by Step (1).

Fixes #27870
rschu1ze added a commit that referenced this issue Aug 29, 2022
This commit moves the catboost model evaluation out of the server
process into the library-bridge binary. This serves two goals: On the
one hand, crashes / memory corruptions of the catboost library no longer
affect the server. On the other hand, we can forbid loading dynamic
libraries in the server (catboost was the last consumer of this
functionality), thus improving security.

SQL syntax:

  SELECT
    catboostEvaluate('/path/to/model.bin', FEAT_1, ..., FEAT_N) > 0 AS prediction,
    ACTION AS target
  FROM amazon_train
  LIMIT 10

Required configuration:

  <catboost_lib_path>/path/to/libcatboostmodel.so</catboost_lib_path>

*** Implementation Details ***

The internal protocol between the server and the library-bridge is
simple:

- HTTP GET on path "/extdict_ping":
  A ping, used during the handshake to check if the library-bridge runs.

- HTTP POST on path "extdict_request"
  (1) Send a "catboost_GetTreeCount" request from the server to the
      bridge, containing a library path (e.g /home/user/libcatboost.so) and
      a model path (e.g. /home/user/model.bin). Rirst, this unloads the
      catboost library handler associated to the model path (if it was
      loaded), then loads the catboost library handler associated to the
      model path, then executes GetTreeCount() on the library handler and
      finally sends the result back to the server. Step (1) is called once
      by the server from FunctionCatBoostEvaluate::getReturnTypeImpl(). The
      library path handler is unloaded in the beginning because it contains
      state which may no longer be valid if the user runs
      catboost("/path/to/model.bin", ...) more than once and if "model.bin"
      was updated in between.
  (2) Send "catboost_Evaluate" from the server to the bridge, containing
      the model path and the features to run the interference on. Step (2)
      is called multiple times (once per chunk) by the server from function
      FunctionCatBoostEvaluate::executeImpl(). The library handler for the
      given model path is expected to be already loaded by Step (1).

Fixes #27870
rschu1ze added a commit that referenced this issue Sep 1, 2022
This commit moves the catboost model evaluation out of the server
process into the library-bridge binary. This serves two goals: On the
one hand, crashes / memory corruptions of the catboost library no longer
affect the server. On the other hand, we can forbid loading dynamic
libraries in the server (catboost was the last consumer of this
functionality), thus improving security.

SQL syntax:

  SELECT
    catboostEvaluate('/path/to/model.bin', FEAT_1, ..., FEAT_N) > 0 AS prediction,
    ACTION AS target
  FROM amazon_train
  LIMIT 10

Required configuration:

  <catboost_lib_path>/path/to/libcatboostmodel.so</catboost_lib_path>

*** Implementation Details ***

The internal protocol between the server and the library-bridge is
simple:

- HTTP GET on path "/extdict_ping":
  A ping, used during the handshake to check if the library-bridge runs.

- HTTP POST on path "extdict_request"
  (1) Send a "catboost_GetTreeCount" request from the server to the
      bridge, containing a library path (e.g /home/user/libcatboost.so) and
      a model path (e.g. /home/user/model.bin). Rirst, this unloads the
      catboost library handler associated to the model path (if it was
      loaded), then loads the catboost library handler associated to the
      model path, then executes GetTreeCount() on the library handler and
      finally sends the result back to the server. Step (1) is called once
      by the server from FunctionCatBoostEvaluate::getReturnTypeImpl(). The
      library path handler is unloaded in the beginning because it contains
      state which may no longer be valid if the user runs
      catboost("/path/to/model.bin", ...) more than once and if "model.bin"
      was updated in between.
  (2) Send "catboost_Evaluate" from the server to the bridge, containing
      the model path and the features to run the interference on. Step (2)
      is called multiple times (once per chunk) by the server from function
      FunctionCatBoostEvaluate::executeImpl(). The library handler for the
      given model path is expected to be already loaded by Step (1).

Fixes #27870
rschu1ze added a commit that referenced this issue Sep 12, 2022
This commit moves the catboost model evaluation out of the server
process into the library-bridge binary. This serves two goals: On the
one hand, crashes / memory corruptions of the catboost library no longer
affect the server. On the other hand, we can forbid loading dynamic
libraries in the server (catboost was the last consumer of this
functionality), thus improving security.

SQL syntax:

  SELECT
    catboostEvaluate('/path/to/model.bin', FEAT_1, ..., FEAT_N) > 0 AS prediction,
    ACTION AS target
  FROM amazon_train
  LIMIT 10

Required configuration:

  <catboost_lib_path>/path/to/libcatboostmodel.so</catboost_lib_path>

*** Implementation Details ***

The internal protocol between the server and the library-bridge is
simple:

- HTTP GET on path "/extdict_ping":
  A ping, used during the handshake to check if the library-bridge runs.

- HTTP POST on path "extdict_request"
  (1) Send a "catboost_GetTreeCount" request from the server to the
      bridge, containing a library path (e.g /home/user/libcatboost.so) and
      a model path (e.g. /home/user/model.bin). Rirst, this unloads the
      catboost library handler associated to the model path (if it was
      loaded), then loads the catboost library handler associated to the
      model path, then executes GetTreeCount() on the library handler and
      finally sends the result back to the server. Step (1) is called once
      by the server from FunctionCatBoostEvaluate::getReturnTypeImpl(). The
      library path handler is unloaded in the beginning because it contains
      state which may no longer be valid if the user runs
      catboost("/path/to/model.bin", ...) more than once and if "model.bin"
      was updated in between.
  (2) Send "catboost_Evaluate" from the server to the bridge, containing
      the model path and the features to run the interference on. Step (2)
      is called multiple times (once per chunk) by the server from function
      FunctionCatBoostEvaluate::executeImpl(). The library handler for the
      given model path is expected to be already loaded by Step (1).

Fixes #27870
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
st-in-progress We are working on the issue currenlty testing Special issue with list of bugs found by CI
Projects
None yet
3 participants