Skip to content

[Bug] Crash when sorting in the outer query using a reference column from the inner subquery #27485

Closed

Description

@TomaYoko

Search before asking

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

Version

release-2.0.2.1 b387ac2

What's Wrong?

when sort use runtime predicate ,be crashed
be.out generated the flowing log

*** Query id: d0695a46cf6a45b8-a177521a64fb2ad3 ***
*** tablet id: 0 ***
*** Aborted at 1700646804 (unix time) try "date -d @1700646804" if you are using GNU date ***
*** Current BE git commitID: b387ac2 ***
*** SIGSEGV address not mapped to object (@0x28) received by PID 139715 (TID 140243 OR 0x7f513f316700) from PID 40; stack trace: ***
0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /data2/doris/be/src/common/signal_handler.h:417
1# os::Linux::chained_handler(int, siginfo_t*, void*) in /usr/lib/jvm/java-1.8.0/jre/lib/amd64/server/libjvm.so
2# JVM_handle_linux_signal in /usr/lib/jvm/java-1.8.0/jre/lib/amd64/server/libjvm.so
3# signalHandler(int, siginfo_t*, void*) in /usr/lib/jvm/java-1.8.0/jre/lib/amd64/server/libjvm.so
4# 0x00007F525DDAD400 in /lib64/libc.so.6
5# doris::TabletSchema::column(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const at /data2/doris/be/src/olap/tablet_schema.cpp:938
6# doris::vectorized::RuntimePredicate::update(doris::vectorized::Field const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool) at /data2/doris/be/src/runtime/runtime_predicate.cpp:162
7# doris::vectorized::VSortNode::sink(doris::RuntimeState*, doris::vectorized::Block*, bool) in /data2/doris/output/be/lib/doris_be
8# doris::vectorized::VSortNode::open(doris::RuntimeState*) at /data2/doris/be/src/vec/exec/vsort_node.cpp:190
9# doris::PlanFragmentExecutor::open_vectorized_internal() in /data2/doris/output/be/lib/doris_be
10# doris::PlanFragmentExecutor::open() at /data2/doris/be/src/runtime/plan_fragment_executor.cpp:271
11# doris::FragmentExecState::execute() at /data2/doris/be/src/runtime/fragment_mgr.cpp:265
12# doris::FragmentMgr::_exec_actual(std::shared_ptrdoris::FragmentExecState, std::function<void (doris::RuntimeState*, doris::Status*)> const&) at /data2/doris/be/src/runtime/fragment_mgr.cpp:534
13# std::_Function_handler<void (), doris::FragmentMgr::exec_plan_fragment(doris::TExecPlanFragmentParams const&, std::function<void (doris::RuntimeState*, doris::Status*)> const&)::$_0>::_M_invoke(std::_Any_data const&) at /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:291
14# doris::ThreadPool::dispatch_thread() in /data2/doris/output/be/lib/doris_be
15# doris::Thread::supervise_thread(void*) at /data2/doris/be/src/util/thread.cpp:470
16# start_thread in /lib64/libpthread.so.0
17# clone in /lib64/libc.so.6

What You Expected?

fix it

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. TomaYoko commented on Nov 23, 2023

    @TomaYoko
    ContributorAuthor

    sql example like : select * from (select cast((c1+c1) as int) t1 from test_int) t order by t1 limit 1;

  2. added a commit that references this issue on Dec 21, 2023
    4f1aebb
  3. added a commit that references this issue on Dec 27, 2023
    c31c088
  4. added a commit that references this issue on Dec 28, 2023
    a9f11e5
  5. added a commit that references this issue on Jan 12, 2024
    6358935
  6. added a commit that references this issue on Apr 24, 2026
    f3e1d07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions