You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Sahil Takiar (Code Review)" <ge...@cloudera.org> on 2020/09/08 18:42:37 UTC

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Sahil Takiar has uploaded this change for review. ( http://gerrit.cloudera.org:8080/16426


Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................

IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

This patch fixes the remaining TSAN errors reported while running custom
cluster tests. After this patch, TSAN can be enabled for custom cluster
tests (currently it is only run for be tests).

Adds a data race suppression for
HdfsColumnarScanner::ProcessScratchBatchCodegenOrInterpret, which
usually calls a codegen function. TSAN currently does not support
codegen functions, so this warning needs to be suppressed. The call
stack of this warning is:

    #0 kudu::BlockBloomFilter::Find(unsigned int) const kudu/util/block_bloom_filter.cc:257:7
    #1 <null> <null> (0x7f19af1c74cd)
    #2 impala::HdfsColumnarScanner::ProcessScratchBatchCodegenOrInterpret(impala::RowBatch*) exec/hdfs-columnar-scanner.cc:106:10
    #3 impala::HdfsColumnarScanner::TransferScratchTuples(impala::RowBatch*) exec/hdfs-columnar-scanner.cc:66:34

Fixes a data race in DmlExecState::FinalizeHdfsInsert where a local
HdfsFsCache::HdfsFsMap is unsafely passed between threads of a
HdfsOperationSet. HdfsOperationSet instances are run in a
HdfsOpThreadPool and each operation is run in one of the threads from
the pool. Each operation uses HdfsFsCache::GetConnection to get a hdfsFs
instance. GetConnection can take in a 'local_cache' of hdfsFs instances
before using the global map. The race condition is that the same local
cache is used for all operations in HdfsOperationSet.

Testing:
* Re-ran TSAN tests and confirmed the data races have disappeared

Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
---
M be/src/runtime/dml-exec-state.cc
M be/src/util/hdfs-bulk-ops.cc
M be/src/util/hdfs-bulk-ops.h
M bin/tsan-suppressions.txt
4 files changed, 34 insertions(+), 13 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/26/16426/1
-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 1
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 4: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 4
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 10 Sep 2020 20:37:03 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................

IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

This patch fixes the remaining TSAN errors reported while running custom
cluster tests. After this patch, TSAN can be enabled for custom cluster
tests (currently it is only run for be tests).

Adds a data race suppression for
HdfsColumnarScanner::ProcessScratchBatchCodegenOrInterpret, which
usually calls a codegen function. TSAN currently does not support
codegen functions, so this warning needs to be suppressed. The call
stack of this warning is:

    #0 kudu::BlockBloomFilter::Find(unsigned int) const kudu/util/block_bloom_filter.cc:257:7
    #1 <null> <null> (0x7f19af1c74cd)
    #2 impala::HdfsColumnarScanner::ProcessScratchBatchCodegenOrInterpret(impala::RowBatch*) exec/hdfs-columnar-scanner.cc:106:10
    #3 impala::HdfsColumnarScanner::TransferScratchTuples(impala::RowBatch*) exec/hdfs-columnar-scanner.cc:66:34

Fixes a data race in DmlExecState::FinalizeHdfsInsert where a local
HdfsFsCache::HdfsFsMap is unsafely passed between threads of a
HdfsOperationSet. HdfsOperationSet instances are run in a
HdfsOpThreadPool and each operation is run in one of the threads from
the pool. Each operation uses HdfsFsCache::GetConnection to get a hdfsFs
instance. GetConnection can take in a 'local_cache' of hdfsFs instances
before using the global map. The race condition is that the same local
cache is used for all operations in HdfsOperationSet.

Testing:
* Re-ran TSAN tests and confirmed the data races have disappeared

Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Reviewed-on: http://gerrit.cloudera.org:8080/16426
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M be/src/util/hdfs-bulk-ops.cc
M be/src/util/hdfs-bulk-ops.h
M bin/tsan-suppressions.txt
3 files changed, 18 insertions(+), 4 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 5
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 4:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/6422/ DRY_RUN=false


-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 4
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 10 Sep 2020 15:22:51 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Sahil Takiar (Code Review)" <ge...@cloudera.org>.
Sahil Takiar has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 3:

Failed due to a Jenkins issue, there might have been maintenance going on.


-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 3
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 10 Sep 2020 15:22:21 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 2: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 2
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Wed, 09 Sep 2020 23:56:45 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 3: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 3
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 10 Sep 2020 00:35:47 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Tim Armstrong (Code Review)" <ge...@cloudera.org>.
Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/16426/1/be/src/runtime/dml-exec-state.cc
File be/src/runtime/dml-exec-state.cc:

http://gerrit.cloudera.org:8080/#/c/16426/1/be/src/runtime/dml-exec-state.cc@171
PS1, Line 171:       lock_guard<mutex> l(filesystem_connection_cache_lock);
I think it would be cleaner if HdfsOperationSet wrapped GetConnection() in a thread-safe way.

I don't really like this pattern of exposing locks to external code, pretty error prone.


http://gerrit.cloudera.org:8080/#/c/16426/1/be/src/util/hdfs-bulk-ops.h
File be/src/util/hdfs-bulk-ops.h:

http://gerrit.cloudera.org:8080/#/c/16426/1/be/src/util/hdfs-bulk-ops.h@96
PS1, Line 96:   /// owned.
Mention that connection_cache_ and connection_cache_lock must be valid as long as HdfsOperationSet lifetime.


http://gerrit.cloudera.org:8080/#/c/16426/1/be/src/util/hdfs-bulk-ops.h@140
PS1, Line 140:   std::mutex* connection_cache_lock_;
Mention ownership?



-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 1
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 08 Sep 2020 19:09:05 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 4: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 4
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 10 Sep 2020 15:22:50 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/7134/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 1
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 08 Sep 2020 19:01:47 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/6419/ DRY_RUN=false


-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 3
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 10 Sep 2020 00:35:48 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 3: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/6419/


-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 3
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Thu, 10 Sep 2020 05:54:12 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 2:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/7144/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 2
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Wed, 09 Sep 2020 23:15:27 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Sahil Takiar (Code Review)" <ge...@cloudera.org>.
Hello Tim Armstrong, Joe McDonnell, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/16426

to look at the new patch set (#2).

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................

IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

This patch fixes the remaining TSAN errors reported while running custom
cluster tests. After this patch, TSAN can be enabled for custom cluster
tests (currently it is only run for be tests).

Adds a data race suppression for
HdfsColumnarScanner::ProcessScratchBatchCodegenOrInterpret, which
usually calls a codegen function. TSAN currently does not support
codegen functions, so this warning needs to be suppressed. The call
stack of this warning is:

    #0 kudu::BlockBloomFilter::Find(unsigned int) const kudu/util/block_bloom_filter.cc:257:7
    #1 <null> <null> (0x7f19af1c74cd)
    #2 impala::HdfsColumnarScanner::ProcessScratchBatchCodegenOrInterpret(impala::RowBatch*) exec/hdfs-columnar-scanner.cc:106:10
    #3 impala::HdfsColumnarScanner::TransferScratchTuples(impala::RowBatch*) exec/hdfs-columnar-scanner.cc:66:34

Fixes a data race in DmlExecState::FinalizeHdfsInsert where a local
HdfsFsCache::HdfsFsMap is unsafely passed between threads of a
HdfsOperationSet. HdfsOperationSet instances are run in a
HdfsOpThreadPool and each operation is run in one of the threads from
the pool. Each operation uses HdfsFsCache::GetConnection to get a hdfsFs
instance. GetConnection can take in a 'local_cache' of hdfsFs instances
before using the global map. The race condition is that the same local
cache is used for all operations in HdfsOperationSet.

Testing:
* Re-ran TSAN tests and confirmed the data races have disappeared

Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
---
M be/src/util/hdfs-bulk-ops.cc
M be/src/util/hdfs-bulk-ops.h
M bin/tsan-suppressions.txt
3 files changed, 18 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/26/16426/2
-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 2
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Sahil Takiar (Code Review)" <ge...@cloudera.org>.
Sahil Takiar has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/16426/1/be/src/runtime/dml-exec-state.cc
File be/src/runtime/dml-exec-state.cc:

http://gerrit.cloudera.org:8080/#/c/16426/1/be/src/runtime/dml-exec-state.cc@171
PS1, Line 171:       lock_guard<mutex> l(filesystem_connection_cache_lock);
> I think it would be cleaner if HdfsOperationSet wrapped GetConnection() in 
Changed it so that the lock is owned by HdfsOperationSet, and is not exposed outside HdfsOperationSet.



-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 1
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Wed, 09 Sep 2020 22:56:11 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/16426 )

Change subject: IMPALA-9740, IMPALA-9403: Fix remaining custom cluster TSAN errors
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/16426/1/be/src/runtime/dml-exec-state.cc
File be/src/runtime/dml-exec-state.cc:

http://gerrit.cloudera.org:8080/#/c/16426/1/be/src/runtime/dml-exec-state.cc@283
PS1, Line 283:   HdfsOperationSet move_ops(&filesystem_connection_cache, &filesystem_connection_cache_lock);
line too long (93 > 90)


http://gerrit.cloudera.org:8080/#/c/16426/1/be/src/runtime/dml-exec-state.cc@284
PS1, Line 284:   HdfsOperationSet dir_deletion_ops(&filesystem_connection_cache, &filesystem_connection_cache_lock);
line too long (101 > 90)


http://gerrit.cloudera.org:8080/#/c/16426/1/be/src/runtime/dml-exec-state.cc@327
PS1, Line 327:     HdfsOperationSet chmod_ops(&filesystem_connection_cache, &filesystem_connection_cache_lock);
line too long (96 > 90)



-- 
To view, visit http://gerrit.cloudera.org:8080/16426
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If1658a9b56d220e2cfd1f8b958604edcdf7757f4
Gerrit-Change-Number: 16426
Gerrit-PatchSet: 1
Gerrit-Owner: Sahil Takiar <st...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>
Gerrit-Comment-Date: Tue, 08 Sep 2020 18:43:21 +0000
Gerrit-HasComments: Yes