You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Michael Smith (Code Review)" <ge...@cloudera.org> on 2026/09/18 17:13:28 UTC
[Impala-ASF-CR] IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window tuples
Michael Smith has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24893
Change subject: IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
......................................................................
IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
AnalyticEvalNode::GetNext() unconditionally called
window_tuples_.front() when deciding whether to transfer the prev
tuple pool to the output batch. window_tuples_ can legitimately be
empty at that point (e.g. right after all window tuples have been
popped, or when prev_pool_last_window_idx_ was recorded as the -1
sentinel), so calling front() on the empty deque is undefined
behavior. Under _GLIBCXX_ASSERTIONS (enabled whenever __OPTIMIZE__ is
unset, e.g. -O0/UBSAN/DEBUG_NOOPT builds) this aborts the process.
Reproduced by a query combining an analytic/window function with an
outer ORDER BY + LIMIT, e.g.:
select * from (
select l_partkey, l_quantity, l_orderkey,
rank() over (partition by l_partkey, l_quantity
order by l_orderkey desc) rk
from lineitem) dt
order by l_partkey, l_quantity, l_orderkey, rk
limit 10
which plans to a local TopNNode pulling rows from AnalyticEvalNode via
GetNext() in TopNNode::Open().
Guard the front() access by short-circuiting when window_tuples_ is
empty, since an empty window_tuples_ means nothing remains that could
still reference prev_tuple_pool_, so it's always safe to transfer.
Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Assisted-by: Claude Sonnet 5 (GitHub Copilot)
---
M be/src/exec/analytic-eval-node.cc
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/93/24893/1
--
To view, visit http://gerrit.cloudera.org:8080/24893
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Gerrit-Change-Number: 24893
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
[Impala-ASF-CR] IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window tuples
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/24893 )
Change subject: IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/24893/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/24893/1//COMMIT_MSG@15
PS1, Line 15: Under _GLIBCXX_ASSERTIONS (enabled whenever __OPTIMIZE__ is
: unset, e.g. -O0/UBSAN/DEBUG_NOOPT builds) this aborts the process.
> Only with newer GCC, right? With current GCC we don't hit this issue.
Yup. The build's with Clang, but we use GCC's libstdc++. I'll update the commit message.
--
To view, visit http://gerrit.cloudera.org:8080/24893
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Gerrit-Change-Number: 24893
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jiyoung Yoo <ji...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Tue, 22 Sep 2026 14:03:35 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window tuples
Posted by "Joe McDonnell (Code Review)" <ge...@cloudera.org>.
Joe McDonnell has posted comments on this change. ( http://gerrit.cloudera.org:8080/24893 )
Change subject: IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
......................................................................
Patch Set 1: Code-Review+1
This makes sense to me
--
To view, visit http://gerrit.cloudera.org:8080/24893
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Gerrit-Change-Number: 24893
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jiyoung Yoo <ji...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Mon, 21 Sep 2026 20:43:38 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window tuples
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24893 )
Change subject: IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
......................................................................
Patch Set 3: Verified+1
--
To view, visit http://gerrit.cloudera.org:8080/24893
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Gerrit-Change-Number: 24893
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jiyoung Yoo <ji...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Tue, 22 Sep 2026 18:41:13 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window tuples
Posted by "Zoltan Borok-Nagy (Code Review)" <ge...@cloudera.org>.
Zoltan Borok-Nagy has posted comments on this change. ( http://gerrit.cloudera.org:8080/24893 )
Change subject: IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
LGTM!
http://gerrit.cloudera.org:8080/#/c/24893/1//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/24893/1//COMMIT_MSG@15
PS1, Line 15: Under _GLIBCXX_ASSERTIONS (enabled whenever __OPTIMIZE__ is
: unset, e.g. -O0/UBSAN/DEBUG_NOOPT builds) this aborts the process.
Only with newer GCC, right? With current GCC we don't hit this issue.
--
To view, visit http://gerrit.cloudera.org:8080/24893
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Gerrit-Change-Number: 24893
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jiyoung Yoo <ji...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Tue, 22 Sep 2026 07:02:34 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window tuples
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Hello Jiyoung Yoo, Zoltan Borok-Nagy, Joe McDonnell, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24893
to look at the new patch set (#2).
Change subject: IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
......................................................................
IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
AnalyticEvalNode::GetNext() unconditionally called
window_tuples_.front() when deciding whether to transfer the prev
tuple pool to the output batch. window_tuples_ can legitimately be
empty at that point (e.g. right after all window tuples have been
popped, or when prev_pool_last_window_idx_ was recorded as the -1
sentinel), so calling front() on the empty deque is undefined
behavior. Under _GLIBCXX_ASSERTIONS on GCC 15+ (enabled whenever
__OPTIMIZE__ is unset, e.g. -O0/UBSAN/DEBUG_NOOPT builds) this
aborts the process.
Reproduced by a query combining an analytic/window function with an
outer ORDER BY + LIMIT, e.g.:
select * from (
select l_partkey, l_quantity, l_orderkey,
rank() over (partition by l_partkey, l_quantity
order by l_orderkey desc) rk
from lineitem) dt
order by l_partkey, l_quantity, l_orderkey, rk
limit 10
which plans to a local TopNNode pulling rows from AnalyticEvalNode via
GetNext() in TopNNode::Open().
Guard the front() access by short-circuiting when window_tuples_ is
empty, since an empty window_tuples_ means nothing remains that could
still reference prev_tuple_pool_, so it's always safe to transfer.
Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Assisted-by: Claude Sonnet 5 (GitHub Copilot)
---
M be/src/exec/analytic-eval-node.cc
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/93/24893/2
--
To view, visit http://gerrit.cloudera.org:8080/24893
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Gerrit-Change-Number: 24893
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jiyoung Yoo <ji...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
[Impala-ASF-CR] IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window tuples
Posted by "Michael Smith (Code Review)" <ge...@cloudera.org>.
Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/24893 )
Change subject: IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
......................................................................
Patch Set 2: Code-Review+2
Carry +2 for commit message update.
--
To view, visit http://gerrit.cloudera.org:8080/24893
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Gerrit-Change-Number: 24893
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jiyoung Yoo <ji...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Tue, 22 Sep 2026 14:04:34 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window tuples
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/24893 )
Change subject: IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
......................................................................
IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
AnalyticEvalNode::GetNext() unconditionally called
window_tuples_.front() when deciding whether to transfer the prev
tuple pool to the output batch. window_tuples_ can legitimately be
empty at that point (e.g. right after all window tuples have been
popped, or when prev_pool_last_window_idx_ was recorded as the -1
sentinel), so calling front() on the empty deque is undefined
behavior. Under _GLIBCXX_ASSERTIONS on GCC 15+ (enabled whenever
__OPTIMIZE__ is unset, e.g. -O0/UBSAN/DEBUG_NOOPT builds) this
aborts the process.
Reproduced by a query combining an analytic/window function with an
outer ORDER BY + LIMIT, e.g.:
select * from (
select l_partkey, l_quantity, l_orderkey,
rank() over (partition by l_partkey, l_quantity
order by l_orderkey desc) rk
from lineitem) dt
order by l_partkey, l_quantity, l_orderkey, rk
limit 10
which plans to a local TopNNode pulling rows from AnalyticEvalNode via
GetNext() in TopNNode::Open().
Guard the front() access by short-circuiting when window_tuples_ is
empty, since an empty window_tuples_ means nothing remains that could
still reference prev_tuple_pool_, so it's always safe to transfer.
Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Assisted-by: Claude Sonnet 5 (GitHub Copilot)
Reviewed-on: http://gerrit.cloudera.org:8080/24893
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M be/src/exec/analytic-eval-node.cc
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Impala Public Jenkins: Looks good to me, approved; Verified
--
To view, visit http://gerrit.cloudera.org:8080/24893
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Gerrit-Change-Number: 24893
Gerrit-PatchSet: 4
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jiyoung Yoo <ji...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
[Impala-ASF-CR] IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window tuples
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24893 )
Change subject: IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/24097/ : 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/24893
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Gerrit-Change-Number: 24893
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jiyoung Yoo <ji...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Fri, 18 Sep 2026 17:38:30 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window tuples
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24893 )
Change subject: IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
......................................................................
Patch Set 3:
Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/14119/ DRY_RUN=false
--
To view, visit http://gerrit.cloudera.org:8080/24893
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Gerrit-Change-Number: 24893
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jiyoung Yoo <ji...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Tue, 22 Sep 2026 14:04:47 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window tuples
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24893 )
Change subject: IMPALA-15376: Fix SIGABRT in AnalyticEvalNode::GetNext on empty window_tuples_
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/24893
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic17c5a6ea4cfada1faf7a1715aa83489c2db7658
Gerrit-Change-Number: 24893
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Jiyoung Yoo <ji...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Michael Smith <mi...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <bo...@cloudera.com>
Gerrit-Comment-Date: Tue, 22 Sep 2026 14:04:46 +0000
Gerrit-HasComments: No