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

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

Commit b81ff2d25f53586914695b95c77a9d9e31a2a51a in impala's branch 
refs/heads/master from Tim Armstrong
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=b81ff2d ]

IMPALA-10276: thread-safe access to RuntimeProfile::counter_map_

The bug was that 'counter_map_' can be mutated concurrent with
total_time_counter() or inactive_timer() being called.

This is fixed by storing a pointer directly to those counters
and bypassing 'counter_map_'. This is then thread-safe and
also has low overhead (adding lock acquisitions might have
some perf impact, since total_time_counter() is called
throughout query execution).

Change-Id: Ic21a13acf9c7c326a27334e61ce3729f1e3cab42
Reviewed-on: http://gerrit.cloudera.org:8080/16739
Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>


> Release build sees SIGSEGV when updating the total time counter
> ---------------------------------------------------------------
>
>                 Key: IMPALA-10276
>                 URL: https://issues.apache.org/jira/browse/IMPALA-10276
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 4.0
>            Reporter: Joe McDonnell
>            Assignee: Tim Armstrong
>            Priority: Blocker
>              Labels: broken-build, crash, flaky
>
> A recent release build saw an Impalad crash with the following stack:
> {noformat}
> Crash reason:  SIGSEGV
> Crash address: 0x11
> #0 raise () from /lib64/libc.so.6
> #1 abort () from /lib64/libc.so.6
> #2 os::abort(bool) () from 
> /usr/java/jdk1.8.0_144/jre/lib/amd64/server/libjvm.so
> #3 VMError::report_and_die() () from 
> /usr/java/jdk1.8.0_144/jre/lib/amd64/server/libjvm.so
> #4 JVM_handle_linux_signal () from 
> /usr/java/jdk1.8.0_144/jre/lib/amd64/server/libjvm.so
> #5 signalHandler(int, siginfo*, void*) () from 
> /usr/java/jdk1.8.0_144/jre/lib/amd64/server/libjvm.so
> #6  <signal handler called>
> #7 UpdateCounter (this=0x7f93adc88030) at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/repos/Impala/be/src/util/runtime-profile-counters.h:933
> #8 impala::ScopedTimer<impala::MonotonicStopWatch>::~ScopedTimer 
> (this=0x7f93adc88030, __in_chrg=<optimized out>) at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/repos/Impala/be/src/util/runtime-profile-counters.h:954
> #9 impala::Coordinator::GetNext (this=this@entry=0x13ad09e00, 
> results=results@entry=0xa7e18460, max_rows=max_rows@entry=-1, 
> eos=eos@entry=0x7f93adc880ef, 
> block_on_wait_time_us=block_on_wait_time_us@entry=0) at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/repos/Impala/be/src/runtime/coordinator.cc:864
> #10 impala::ClientRequestState::FetchRowsInternal 
> (this=this@entry=0x11568000, max_rows=max_rows@entry=-1, 
> fetched_rows=fetched_rows@entry=0xa7e18460, 
> block_on_wait_time_us=block_on_wait_time_us@entry=0) at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/repos/Impala/be/src/service/client-request-state.cc:1090
> #11 impala::ClientRequestState::FetchRows (this=0x11568000, 
> max_rows=max_rows@entry=-1, fetched_rows=fetched_rows@entry=0xa7e18460, 
> block_on_wait_time_us=0) at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/repos/Impala/be/src/service/client-request-state.cc:938
> #12 impala::ImpalaServer::FetchInternal (this=this@entry=0xdd35b00, 
> query_id=..., start_over=start_over@entry=false, 
> fetch_size=fetch_size@entry=-1, 
> query_results=query_results@entry=0x7f93adc88498) at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/repos/Impala/be/src/service/impala-beeswax-server.cc:614
> #13 impala::ImpalaServer::fetch (this=0xdd35b00, query_results=..., 
> beeswax_handle=..., start_over=<optimized out>, fetch_size=-1) at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/repos/Impala/be/src/service/impala-beeswax-server.cc:191
> #14 beeswax::BeeswaxServiceProcessor::process_fetch (this=0x102b0c60, 
> seqid=0, iprot=<optimized out>, oprot=0xd45d0980, callContext=<optimized 
> out>) at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/repos/Impala/be/generated-sources/gen-cpp/BeeswaxService.cpp:3398
> #15 beeswax::BeeswaxServiceProcessor::dispatchCall (this=0x102b0c60, 
> iprot=0xd45d1e00, oprot=0xd45d0980, fname=..., seqid=0, 
> callContext=0x12ea9a80) at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/repos/Impala/be/generated-sources/gen-cpp/BeeswaxService.cpp:3200
> #16 apache::thrift::TDispatchProcessor::process (this=0x102b0c60, in=..., 
> out=..., connectionContext=0x12ea9a80) at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/Impala-Toolchain/toolchain-packages-gcc7.5.0/thrift-0.9.3-p8/include/thrift/TDispatchProcessor.h:121
> #17 apache::thrift::server::TAcceptQueueServer::Task::run (this=0x11a92e80) 
> at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/repos/Impala/be/src/rpc/TAcceptQueueServer.cpp:84
> #18 operator() (a2=<optimized out>, a1=..., p=<optimized out>, 
> this=<optimized out>) at 
> /data/jenkins/workspace/impala-cdpd-master-staging-exhaustive-release/Impala-Toolchain/toolchain-packages-gcc7.5.0/boost-1.61.0-p2/include/boost/bind/mem_fn_template.hpp:280{noformat}
> The code is updating the total time counter in the runtime profile via a 
> ScopedTimer. 
> This has been seen once



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to