You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2024/09/06 13:35:00 UTC

[jira] [Commented] (IMPALA-13347) TSAN failure in backend tests after IMPALA-12737

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

ASF subversion and git services commented on IMPALA-13347:
----------------------------------------------------------

Commit f78b3c5cb0f4672007efc618f0317ae7701e4866 in impala's branch refs/heads/master from Jason Fehr
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=f78b3c5cb ]

IMPALA-13347: Fixes TSAN Thread Leak of Workload Management Thread

The workload management processing runs in a separate thread declared
in impala-server.h. This thread runs until a graceful shutdown is
initiated. The last step of the Impala coordinator shutdown process
is to drain the completed queries queue to the query log table thus
ensuring completed queries do not get lost.

This thread has to run to completion, but the coordinator shutdown
process never joins that thread. This patch adds the joining of that
thread during the coordinator shutdown process. If the workload
management shutdown process exceedes the allotted time, the thread is
detached.

Info level logging was added to indicate which completed queries
queue drain situation occurred - successful or timed out.

A new custom cluster test was added to test the situation where the
completed queries queue drain process times out.

Change-Id: I1e95967bb6e04470a8900c9ba69080eea8aaa25e
Reviewed-on: http://gerrit.cloudera.org:8080/21744
Reviewed-by: Riza Suminto <ri...@cloudera.com>
Reviewed-by: Michael Smith <mi...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> TSAN failure in backend tests after IMPALA-12737
> ------------------------------------------------
>
>                 Key: IMPALA-13347
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13347
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 4.5.0
>            Reporter: Michael Smith
>            Assignee: Jason Fehr
>            Priority: Critical
>
> Impala backend tests (expr-test, session-expiry-test, internal-server-test) started detecting a thread leak in TSAN builds after IMPALA-12737 "Refactor the Workload Management Initialization Process" was merged. Example:
> {code:java}
>  WARNING: ThreadSanitizer: thread leak (pid=475)
>   Thread T566 (tid=1135, finished) created by main thread at:
>     #0 pthread_create <null> (unifiedbetests+0x23d7083)
>     #1 boost::thread::start_thread_noexcept() <null> (unifiedbetests+0x521607d)
>     #2 boost::thread::thread<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::function<void ()>, impala::ThreadDebugInfo*, impala::Promise<long, (impala::PromiseMode)0>*>(void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void ()>, impala::ThreadDebugInfo const*, impala::Promise<long, (impala::PromiseMode)0>*), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::function<void ()>, impala::ThreadDebugInfo*, impala::Promise<long, (impala::PromiseMode)0>*) /data/jenkins/workspace/impala-cdw-master-staging-core-tsan/Impala-Toolchain/toolchain-packages-gcc10.4.0/boost-1.74.0-p1/include/boost/thread/detail/thread.hpp:424:13 (unifiedbetests+0x4f8b214)
>     #3 impala::Thread::StartThread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void ()> const&, std::unique_ptr<impala::Thread, std::default_delete<impala::Thread> >*, bool) /data/jenkins/workspace/impala-cdw-master-staging-core-tsan/repos/Impala/be/src/util/thread.cc:317:13 (unifiedbetests+0x4f8761c)
>     #4 impala::Status impala::Thread::Create<boost::_bi::bind_t<void, boost::_mfi::mf0<void, impala::ImpalaServer>, boost::_bi::list1<boost::_bi::value<impala::ImpalaServer*> > > >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::_bi::bind_t<void, boost::_mfi::mf0<void, impala::ImpalaServer>, boost::_bi::list1<boost::_bi::value<impala::ImpalaServer*> > > const&, std::unique_ptr<impala::Thread, std::default_delete<impala::Thread> >*, bool) /data/jenkins/workspace/impala-cdw-master-staging-core-tsan/repos/Impala/be/src/util/thread.h:74:12 (unifiedbetests+0x4c695f2)
>     #5 impala::ImpalaServer::Start(int, int, int, int) /data/jenkins/workspace/impala-cdw-master-staging-core-tsan/repos/Impala/be/src/service/impala-server.cc:3220:5 (unifiedbetests+0x4c63e4a)
>     #6 impala::InProcessImpalaServer::StartWithClientServers(int, int, int) /data/jenkins/workspace/impala-cdw-master-staging-core-tsan/repos/Impala/be/src/testutil/in-process-servers.cc:97:3 (unifiedbetests+0x501bd3b)
>     #7 impala::InProcessImpalaServer::StartWithEphemeralPorts(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, impala::InProcessImpalaServer**) /data/jenkins/workspace/impala-cdw-master-staging-core-tsan/repos/Impala/be/src/testutil/in-process-servers.cc:69:21 (unifiedbetests+0x501bc22)
>     #8 impala::ExprTest::SetUpTestCase() /data/jenkins/workspace/impala-cdw-master-staging-core-tsan/repos/Impala/be/src/exprs/expr-test.cc:235:5 (unifiedbetests+0x26d42f9)
>     #9 void testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite, void>(testing::TestSuite*, void (testing::TestSuite::*)(), char const*) <null> (unifiedbetests+0x6876a5c)
>     #10 main /data/jenkins/workspace/impala-cdw-master-staging-core-tsan/repos/Impala/be/src/service/unified-betest-main.cc:48:10 (unifiedbetests+0x24363e0)
> SUMMARY: ThreadSanitizer: thread leak (/data0/jenkins/workspace/impala-cdw-master-staging-core-tsan/repos/Impala/be/build/debug/service/unifiedbetests+0x23d7083) in __interceptor_pthread_create{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org