Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: query could't be killed #8028

Closed
1 of 2 tasks
FANNG1 opened this issue Oct 4, 2022 · 1 comment · Fixed by #8248
Closed
1 of 2 tasks

bug: query could't be killed #8028

FANNG1 opened this issue Oct 4, 2022 · 1 comment · Fixed by #8248
Assignees
Labels
C-bug Category: something isn't working

Comments

@FANNG1
Copy link

FANNG1 commented Oct 4, 2022

Search before asking

  • I had searched in the issues and found no similar issues.

Version

5f0ea05

What's Wrong?

set max_execute_time to 10min, but a query runs serval hours, and kill query command takes no effect.

How to Reproduce?

  1. run databend with 3 nodes
  2. run sql
SELECT count(*) AS sqlrewriter0
FROM. db.xxx
WHERE p_date BETWEEN '20220901' AND '20220927'
  AND agent_id IN
    (SELECT agent_id
     FROM db.xxxxx
     WHERE dt = '2022-09-27'
     GROUP BY agent_id)
GROUP BY agent_id
ORDER BY sqlrewriter0
LIMIT 100
  1. kill query $query_id

databend cpu is 100%, and the thread dump is

#0  0x000055f9d71f3b72 in databend_query::pipelines::processors::transforms::hash_join::result_blocks::_$LT$impl$u20$databend_query..pipelines..processors..transforms..hash_join..join_hash_table..JoinHashTable$GT$::result_blocks::h46f9186f799dbdce ()
#1  0x000055f9d725e9c8 in _$LT$databend_query..pipelines..processors..transforms..hash_join..join_hash_table..JoinHashTable$u20$as$u20$databend_query..pipelines..processors..transforms..hash_join..hash_join_state..HashJoinState$GT$::probe::hef6a8885a95eb1c4 ()
#2  0x000055f9d77d9e48 in _$LT$databend_query..pipelines..processors..transforms..transform_hash_join..TransformHashJoinProbe$u20$as$u20$common_pipeline_core..processors..processor..Processor$GT$::process::h5858b691ce9bf194 ()
#3  0x000055f9d7bec1b8 in databend_query::pipelines::executor::executor_worker_context::ExecutorWorkerContext::execute_task::h044794c1f8c8586e ()
#4  0x000055f9d7be9dd8 in databend_query::pipelines::executor::pipeline_executor::PipelineExecutor::execute_single_thread::hd2a668c4d7c0c276 ()
#5  0x000055f9d7291d6b in _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::hdcbb8474153b9076 ()
#6  0x000055f9d7be98e0 in databend_query::pipelines::executor::pipeline_executor::PipelineExecutor::execute_threads::_$u7b$$u7b$closure$u7d$$u7d$::h6e78e3ee712fb3f9 ()
#7  0x000055f9d7a744c9 in std::sys_common::backtrace::__rust_begin_short_backtrace::hb97ab8724f09bbc9 ()
#8  0x000055f9d7a85d75 in core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hf2fa816957e0c89d ()
#9  0x000055f9d8563f73 in std::sys::unix::thread::Thread::new::thread_start::hdc948a6935722a5a ()
#10 0x00007f62dd7d3dd5 in start_thread () from /lib64/libpthread.so.0

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@FANNG1 FANNG1 added the C-bug Category: something isn't working label Oct 4, 2022
@BohuTANG
Copy link
Member

BohuTANG commented Oct 4, 2022

It looks hash join doesn't handle the processor abortion, cc @zhang2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants