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

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

Commit 9c81c37364a60aaaf7e806545962f7c110ec06b7 in impala's branch 
refs/heads/master from stiga-huang
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=9c81c3736 ]

IMPALA-14994: Fix data race in destructor of ScopedGetNextEventAdder

The last_batch_returned_ boolean flag of ExecNode is written in the
fragment instance thread and read by the query state thread in
constructing the status reports. This patch changes its type to
AtomicBool to fix the data race issue.

Note that it's OK if the query state thread sees last_batch_returned_ =
false while the fragment instance thread is finishing. The query state
thread will send a final status report which reads the final
last_batch_returned_ value.

Testing
 - Ran TSAN build

Change-Id: Ia3bf17f56974e471994ca889190c7065574a3414
Reviewed-on: http://gerrit.cloudera.org:8080/24345
Reviewed-by: Peter Rozsa <[email protected]>
Reviewed-by: Zoltan Borok-Nagy <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> TSAN builds fail in destructor of ScopedGetNextEventAdder
> ---------------------------------------------------------
>
>                 Key: IMPALA-14994
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14994
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Zoltán Borók-Nagy
>            Assignee: Quanlong Huang
>            Priority: Critical
>              Labels: broken-build
>         Attachments: tsan_error.txt
>
>
> We can see the following stack trace in TSAN builds:
> {noformat}
> WARNING: ThreadSanitizer: data race (pid=2852464)
>   Write of size 1 at 0x7b5800132c29 by thread T55:
>     #0 impala::ScopedGetNextEventAdder::~ScopedGetNextEventAdder() 
> /data/jenkins/workspace/impala-asf-master-core-tsan/repos/Impala/be/src/exec/exec-node-util.h:70:35
>  (impalad+0x34949a2)
>     #1 impala::ExchangeNode::GetNext(impala::RuntimeState*, 
> impala::RowBatch*, bool*) 
> /data/jenkins/workspace/impala-asf-master-core-tsan/repos/Impala/be/src/exec/exchange-node.cc:242:1
>  (impalad+0x3492244)
>     #2 impala::SortNode::SortInput(impala::RuntimeState*) 
> /data/jenkins/workspace/impala-asf-master-core-tsan/repos/Impala/be/src/exec/sort-node.cc:227:5
>  (impalad+0x3562caf)
>     #3 impala::SortNode::Open(impala::RuntimeState*) 
> /data/jenkins/workspace/impala-asf-master-core-tsan/repos/Impala/be/src/exec/sort-node.cc:142:3
>  (impalad+0x3562b16)
> {noformat}
> exec-node-util.h:70 was added recently by IMPALA-14843.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to