Skip to content

branch-2.1:[bug](catalog) Fix coredump in VFileScanner#61079

Open
xy720 wants to merge 3 commits intoapache:branch-2.1from
xy720:fix-coredump-catalog
Open

branch-2.1:[bug](catalog) Fix coredump in VFileScanner#61079
xy720 wants to merge 3 commits intoapache:branch-2.1from
xy720:fix-coredump-catalog

Conversation

@xy720
Copy link
Member

@xy720 xy720 commented Mar 5, 2026

Proposed changes

*** Query id: 82815f9fa4be4b6c-ba6647ac4169c9eb ***
*** is nereids: 1 ***
*** tablet id: 0 ***
*** Aborted at 1772689566 (unix time) try "date -d @1772689566" if you are using GNU date ***
*** Current BE git commitID: 2505262 ***
*** SIGSEGV address not mapped to object (@0x0) received by PID 8666 (TID 2158381 OR 0x7f73a1dff6c0) from PID 0; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) in /usr/local/service/doris/lib/be/doris_be
 1# os::Linux::chained_handler(int, siginfo*, void*) in /usr/local/jdk/jre/lib/amd64/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/local/jdk/jre/lib/amd64/server/libjvm.so
 3# signalHandler(int, siginfo*, void*) in /usr/local/jdk/jre/lib/amd64/server/libjvm.so
 4# 0x00007F928CE54AD0 in /lib64/libc.so.6
 5# doris::vectorized::VFileScanner::_generate_fill_columns() in /usr/local/service/doris/lib/be/doris_be
 6# doris::vectorized::VFileScanner::_get_next_reader() in /usr/local/service/doris/lib/be/doris_be
 7# doris::vectorized::VFileScanner::_get_block_wrapped(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /usr/local/service/doris/lib/be
/doris_be
 8# doris::vectorized::VFileScanner::_get_block_impl(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /usr/local/service/doris/lib/be/do
ris_be
 9# doris::vectorized::VScanner::get_block(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /usr/local/service/doris/lib/be/doris_be
10# doris::vectorized::VScanner::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /usr/local/service/doris/lib/
be/doris_be
11# doris::vectorized::ScannerScheduler::_scanner_scan(std::shared_ptr<doris::vectorized::ScannerContext>, std::shared_ptr<doris::vectorized::Scan
Task>) in /usr/local/service/doris/lib/be/doris_be
12# std::_Function_handler<void (), doris::vectorized::ScannerScheduler::submit(std::shared_ptr<doris::vectorized::ScannerContext>, std::shared_pt
r<doris::vectorized::ScanTask>)::$_1::operator()() const::{lambda()#1}>::_M_invoke(std::_Any_data const&) in /usr/local/service/doris/lib/be/doris
_be
13# doris::ThreadPool::dispatch_thread() in /usr/local/service/doris/lib/be/doris_be
14# doris::Thread::supervise_thread(void*) in /usr/local/service/doris/lib/be/doris_be
15# start_thread in /lib64/libc.so.6
16# __GI___clone3 in /lib64/libc.so.6

To fix it, need to pick #40273

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

…che#40273)

## Proposed changes

Issue Number: close #xxx

cur_reader pointer can be null in VFileScanner. can cause BE crash



[ RUN      ] VfileScannerExcepTest.failure_case
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1892247==ERROR: AddressSanitizer: SEGV on unknown address
0x000000000000 (pc 0x5cdbe26eb5f8 bp 0x7ffed6728610 sp 0x7ffed67277a0
T0)
==1892247==The signal is caused by a READ memory access.
==1892247==Hint: address points to the zero page.
#0 0x5cdbe26eb5f8 in doris::vectorized::VFileScanner::_get_next_reader()
/root/doris/workspace/doris/be/src/vec/exec/scan/vfile_scanner.cpp:980:9
#1 0x5cdbe26e3512 in
doris::vectorized::VFileScanner::_get_block_wrapped(doris::RuntimeState*,
doris::vectorized::Block*, bool*)
/root/doris/workspace/doris/be/src/vec/exec/scan/vfile_scanner.cpp:286:25
#2 0x5cdbe26e2e46 in
doris::vectorized::VFileScanner::_get_block_impl(doris::RuntimeState*,
doris::vectorized::Block*, bool*)
/root/doris/workspace/doris/be/src/vec/exec/scan/vfile_scanner.cpp:252:17
#3 0x5cdbe28e05ce in
doris::vectorized::VScanner::get_block(doris::RuntimeState*,
doris::vectorized::Block*, bool*)
/root/doris/workspace/doris/be/src/vec/exec/scan/vscanner.cpp:117:17
#4 0x5cdbc405a922 in
doris::vectorized::VfileScannerExcepTest_failure_case_Test::TestBody()
/root/doris/workspace/doris/be/test/vec/exec/vfile_scanner_excep_test.cpp:309:24
#5 0x5cdbff5b191a in void
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,
void>(testing::Test*, void (testing::Test::*)(), char const*)
(/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51eb491a)
(BuildId: 21d41a2d207823b9)
#6 0x5cdbff59f989 in void
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,
void>(testing::Test*, void (testing::Test::*)(), char const*)
(/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51ea2989)
(BuildId: 21d41a2d207823b9)
#7 0x5cdbff57a9c2 in testing::Test::Run()
(/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51e7d9c2)
(BuildId: 21d41a2d207823b9)
#8 0x5cdbff57b708 in testing::TestInfo::Run()
(/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51e7e708)
(BuildId: 21d41a2d207823b9)
#9 0x5cdbff57bec3 in testing::TestSuite::Run()
(/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51e7eec3)
(BuildId: 21d41a2d207823b9)



After fix:

I20240902 09:11:07.722273 1946048 run_all_tests.cpp:67] init config 1
Note: Google Test filter = VfileScannerE*
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from VfileScannerExceptionTest
[ RUN      ] VfileScannerExceptionTest.failure_case
msg = [INTERNAL_ERROR]cur path: . Failed to create reader for file
format: 11
[       OK ] VfileScannerExceptionTest.failure_case (3 ms)
[----------] 1 test from VfileScannerExceptionTest (3 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (3 ms total)
[  PASSED  ] 1 test.
=== Finished. Gtest output:
/root/doris/workspace/doris/be/ut_build_ASAN/gtest_output
@xy720 xy720 requested a review from yiguolei as a code owner March 5, 2026 09:41
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@xy720
Copy link
Member Author

xy720 commented Mar 5, 2026

run buildall

@xy720 xy720 changed the title branch-2.1: [bug] Fix coredump in VFileScanner branch-2.1:[bug](catalog) Fix coredump in VFileScanner Mar 5, 2026
@xy720
Copy link
Member Author

xy720 commented Mar 5, 2026

run buildall

@xy720
Copy link
Member Author

xy720 commented Mar 5, 2026

run beut

@xy720
Copy link
Member Author

xy720 commented Mar 5, 2026

run p0

yiguolei
yiguolei previously approved these changes Mar 6, 2026
@yiguolei
Copy link
Contributor

yiguolei commented Mar 6, 2026

Does 4.0 also have this problem?

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

PR approved by anyone and no changes requested.

@xy720
Copy link
Member Author

xy720 commented Mar 6, 2026

Does 4.0 also have this problem?

This problem has been fixed in 4.0

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Mar 6, 2026
@xy720
Copy link
Member Author

xy720 commented Mar 6, 2026

run buildall

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 62.50% (5/8) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 39.39% (10464/26568)
Line Coverage 30.26% (86638/286291)
Region Coverage 27.82% (50060/179941)
Branch Coverage 24.30% (24499/100830)

@xy720
Copy link
Member Author

xy720 commented Mar 6, 2026

run p0

@xy720
Copy link
Member Author

xy720 commented Mar 6, 2026

run external

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants