You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Riza Suminto (Code Review)" <ge...@cloudera.org> on 2025/08/11 16:11:04 UTC
[Impala-ASF-CR] IMPALA-14289: Fix data race found in ThreadTokenAvailableCb
Riza Suminto has uploaded this change for review. ( http://gerrit.cloudera.org:8080/23281
Change subject: IMPALA-14289: Fix data race found in ThreadTokenAvailableCb
......................................................................
IMPALA-14289: Fix data race found in ThreadTokenAvailableCb
TSAN build in RHEL9 found a data race issue in
HdfsScanNode::ThreadTokenAvailableCb that has never surface in older
OSes. It revolves around timed_mutex usage that first introduced in
IMPALA-8322. Removing the timeout for lock acquisition fix the issue,
but not ideal since it will render IMPALA-8322 fix ineffective.
This patch retain the current timed_mutex and timeout, but fixed the
data races site by:
- Make all_ranges_started_ to AtomicBool.
- Adding mutex in ScannerThreadState::AddThread.
Testing:
Pass dataloading and BE tests in TSAN in RHEL9.
Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
---
M be/src/exec/hdfs-scan-node.cc
M be/src/exec/hdfs-scan-node.h
M be/src/exec/scan-node.cc
M be/src/exec/scan-node.h
4 files changed, 9 insertions(+), 5 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/81/23281/1
--
To view, visit http://gerrit.cloudera.org:8080/23281
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
Gerrit-Change-Number: 23281
Gerrit-PatchSet: 1
Gerrit-Owner: Riza Suminto <ri...@cloudera.com>
[Impala-ASF-CR] IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23281 )
Change subject: IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/23281
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
Gerrit-Change-Number: 23281
Gerrit-PatchSet: 3
Gerrit-Owner: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Xuebin Su <xs...@cloudera.com>
Gerrit-Comment-Date: Tue, 12 Aug 2025 16:48:26 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
Posted by "Joe McDonnell (Code Review)" <ge...@cloudera.org>.
Joe McDonnell has posted comments on this change. ( http://gerrit.cloudera.org:8080/23281 )
Change subject: IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
......................................................................
Patch Set 2: Code-Review+2
This looks good to me. I think the reason it would apply to Redhat 9 is that Redhat 9 moved to a newer glibc that has pthread APIs that TSAN doesn't handle yet. libstdc++ detects these at build time and will use them if they are present. This issue seems related: https://github.com/llvm/llvm-project/issues/62623
--
To view, visit http://gerrit.cloudera.org:8080/23281
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
Gerrit-Change-Number: 23281
Gerrit-PatchSet: 2
Gerrit-Owner: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Xuebin Su <xs...@cloudera.com>
Gerrit-Comment-Date: Tue, 12 Aug 2025 16:31:40 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23281 )
Change subject: IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
......................................................................
Patch Set 3: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/23281
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
Gerrit-Change-Number: 23281
Gerrit-PatchSet: 3
Gerrit-Owner: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Xuebin Su <xs...@cloudera.com>
Gerrit-Comment-Date: Tue, 12 Aug 2025 21:52:56 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/23281 )
Change subject: IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
......................................................................
Patch Set 3:
Thank you for the review!
--
To view, visit http://gerrit.cloudera.org:8080/23281
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
Gerrit-Change-Number: 23281
Gerrit-PatchSet: 3
Gerrit-Owner: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Xuebin Su <xs...@cloudera.com>
Gerrit-Comment-Date: Tue, 12 Aug 2025 16:48:36 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Hello Quanlong Huang, Xuebin Su, Joe McDonnell, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/23281
to look at the new patch set (#2).
Change subject: IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
......................................................................
IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
TSAN build in RHEL9 hit a data race issue in
HdfsScanNode::ThreadTokenAvailableCb from timed_mutex + try_lock_for
usage. It seems to be a known false-positive in ThreadSanitizer:
https://github.com/google/sanitizers/issues/1620
https://github.com/llvm/llvm-project/issues/142370
This patch suppress the TSAN error in ThreadTokenAvailableCb.
Testing:
Pass dataloading and BE tests in TSAN in RHEL9.
Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
---
M bin/tsan-suppressions.txt
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/81/23281/2
--
To view, visit http://gerrit.cloudera.org:8080/23281
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
Gerrit-Change-Number: 23281
Gerrit-PatchSet: 2
Gerrit-Owner: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Xuebin Su <xs...@cloudera.com>
[Impala-ASF-CR] IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23281 )
Change subject: IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
......................................................................
Patch Set 3:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12305/ DRY_RUN=false
--
To view, visit http://gerrit.cloudera.org:8080/23281
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
Gerrit-Change-Number: 23281
Gerrit-PatchSet: 3
Gerrit-Owner: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Xuebin Su <xs...@cloudera.com>
Gerrit-Comment-Date: Tue, 12 Aug 2025 16:48:26 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14289: Fix data race found in ThreadTokenAvailableCb
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23281 )
Change subject: IMPALA-14289: Fix data race found in ThreadTokenAvailableCb
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/20120/ : 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/23281
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
Gerrit-Change-Number: 23281
Gerrit-PatchSet: 1
Gerrit-Owner: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Xuebin Su <xs...@cloudera.com>
Gerrit-Comment-Date: Mon, 11 Aug 2025 16:38:47 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23281 )
Change subject: IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
......................................................................
Patch Set 2:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/20135/ : 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/23281
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
Gerrit-Change-Number: 23281
Gerrit-PatchSet: 2
Gerrit-Owner: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Xuebin Su <xs...@cloudera.com>
Gerrit-Comment-Date: Tue, 12 Aug 2025 05:31:35 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
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/23281 )
Change subject: IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
......................................................................
IMPALA-14289: Suppress data race in ThreadTokenAvailableCb
TSAN build in RHEL9 hit a data race issue in
HdfsScanNode::ThreadTokenAvailableCb from timed_mutex + try_lock_for
usage. It seems to be a known false-positive in ThreadSanitizer:
https://github.com/google/sanitizers/issues/1620
https://github.com/llvm/llvm-project/issues/142370
This patch suppress the TSAN error in ThreadTokenAvailableCb.
Testing:
Pass dataloading and BE tests in TSAN in RHEL9.
Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
Reviewed-on: http://gerrit.cloudera.org:8080/23281
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M bin/tsan-suppressions.txt
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Impala Public Jenkins: Looks good to me, approved; Verified
--
To view, visit http://gerrit.cloudera.org:8080/23281
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I87950cdc3fedc8d80adeb788c6d29791db58242a
Gerrit-Change-Number: 23281
Gerrit-PatchSet: 4
Gerrit-Owner: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Quanlong Huang <hu...@gmail.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Reviewer: Xuebin Su <xs...@cloudera.com>