8000 [BugFix] Fix BE crash caused by filesystem is_symlink exception by wyb · Pull Request #60028 · StarRocks/starrocks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[BugFix] Fix BE crash caused by filesystem is_symlink exception #60028

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

Merged
merged 2 commits into from
Jun 19, 2025

Conversation

wyb
Copy link
Contributor
@wyb wyb commented Jun 18, 2025

Why I'm doing:

When BE has no permission to access the storage path, BE will crash on creating directory.

terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
  what():  filesystem error: symlink_status: Permission denied [/home/disk3/storage/data/520]
3.5.0-ee RELEASE (build c3103dd)
query_id:00000000-0000-0000-0000-000000000000, fragment_instance:00000000-0000-0000-0000-000000000000
*** Aborted at 1750231214 (unix time) try "date -d @1750231214" if you are using GNU date ***
terminate called recursively
PC: @     0x7fef56d83387 __GI_raise
*** SIGABRT (@0x3e80000142d) received by PID 5165 (TID 0x7fec3dbb0700) LWP(38539) from PID 5165; stack trace: ***
    @     0x7fef592df20b __pthread_once_slow
terminate called recursively
    @          0xb7cd294 google::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*)
    @     0x7fef592e8630 (/usr/lib64/libpthread-2.17.so+0xf62f)
    @     0x7fef56d83387 __GI_raise
    @     0x7fef56d84a78 __GI_abort
    @          0x3a6a003 __gnu_cxx::__verbose_terminate_handler() [clone .cold]
    @          0xf29d096 __cxxabiv1::__terminate(void (*)())
    @          0x3a69e9b std::terminate()
    @          0xf29d233 __cxa_throw
    @          0x3a6d9d3 std::filesystem::symlink_status(std::filesystem::__cxx11::path const&) [clone .cold]
    @          0x6fd7f8c starrocks::PosixFileSystem::create_dir_recursive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    @          0x71d9e8c starrocks::DataDir::get_shard(unsigned long*)
    @          0x7224b27 starrocks::TabletManager::_create_tablet_meta_unlocked(starrocks::TCreateTabletReq const&, starrocks::DataDir*, bool, starrocks::Tablet const*, std::shared_ptr<starrocks::TabletMeta>*)
    @          0x7225ce7 starrocks::TabletManager::_create_tablet_meta_and_dir_unlocked(starrocks::TCreateTabletReq const&, bool, starrocks::Tablet const*, std::vector<starrocks::DataDir*, std::allocator<starrocks::DataDir*> &g
8000
t; const&)
    @          0x7226af5 starrocks::TabletManager::_internal_create_tablet_unlocked(starrocks::AlterTabletType, starrocks::TCreateTabletReq const&, bool, starrocks::Tablet const*, std::vector<starrocks::DataDir*, std::allocator<starrocks::DataDir*> > const&)
    @          0x72277c8 starrocks::TabletManager::create_tablet(starrocks::TCreateTabletReq const&, std::vector<starrocks::DataDir*, std::allocator<starrocks::DataDir*> >)
    @          0x71c384e starrocks::StorageEngine::create_tablet(starrocks::TCreateTabletReq const&)
    @          0x4800591 starrocks::run_create_tablet_task(std::shared_ptr<starrocks::AgentTaskRequestWithReqBody<starrocks::TCreateTabletReq> > const&, starrocks::ExecEnv*)
    @          0x40dd79f starrocks::ThreadPool::dispatch_thread()
    @          0x40d4d70 starrocks::Thread::supervise_thread(void*)
    @     0x7fef592e0ea5 start_thread
    @     0x7fef56e4bb0d __clone

What I'm doing:

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.5
    • 3.4
    • 3.3

@wyb wyb requested a review from a team as a code owner June 18, 2025 09:00
@github-actions github-actions bot added the 3.5 label Jun 18, 2025
@mergify mergify bot assigned wyb Jun 18, 2025
@wyb wyb force-pushed the is_symlink_error branch from d38bf3d to b45efef Compare June 18, 2025 10:05
Signed-off-by: wyb <wybb86@gmail.com>
@wyb wyb force-pushed the is_symlink_error branch from 6598d45 to c103888 Compare June 19, 2025 04:30
Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[BE Incremental Coverage Report]

fail : 7 / 12 (58.33%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/fs/fs_posix.cpp 7 12 58.33% [545, 550, 553, 555, 562]

@andyziye andyziye merged commit 96340a0 into StarRocks:main Jun 19, 2025
69 of 72 checks passed
Copy link

@Mergifyio backport branch-3.4

Copy link

@Mergifyio backport branch-3.3

Copy link

@Mergifyio backport branch-3.5

@github-actions github-actions bot removed the 3.5 label Jun 19, 2025
Copy link
Contributor
mergify bot commented Jun 19, 2025

backport branch-3.4

✅ Backports have been created

Copy link
Contributor
mergify bot commented Jun 19, 2025

backport branch-3.3

✅ Backports have been created

Copy link
Contributor
mergify bot commented Jun 19, 2025

backport branch-3.5

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 19, 2025
Signed-off-by: wyb <wybb86@gmail.com>
(cherry picked from commit 96340a0)
mergify bot pushed a commit that referenced this pull request Jun 19, 2025
Signed-off-by: wyb <wybb86@gmail.com>
(cherry picked from commit 96340a0)
mergify bot pushed a commit that referenced this pull request Jun 19, 2025
Signed-off-by: wyb <wybb86@gmail.com>
(cherry picked from commit 96340a0)
wanpengfei-git pushed a commit that referenced this pull request Jun 19, 2025
…port #60028) (#60070)

Signed-off-by: wyb <wybb86@gmail.com>
Co-authored-by: wyb <wybb86@gmail.com>
wanpengfei-git pushed a commit that referenced this pull request Jun 19, 2025
…port #60028) (#60071)

Signed-off-by: wyb <wybb86@gmail.com>
Co-authored-by: wyb <wybb86@gmail.com>
wanpengfei-git pushed a commit that referenced this pull request Jun 19, 2025
…port #60028) (#60069)

Signed-off-by: wyb <wybb86@gmail.com>
Co-authored-by: wyb <wybb86@gmail.com>
AntiTopQuark pushed a commit to AntiTopQuark/starrocks that referenced this pull request Jun 19, 2025
…Rocks#60028)

Signed-off-by: wyb <wybb86@gmail.com>
Signed-off-by: AntiTopQuark <AntiTopQuark1350@outlook.com>
dengliu pushed a commit to dengliu/starrocks that referenced this pull request Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0