Project

General

Profile

Actions

Bug #52582

closed

AddressSanitizer: stack-use-after-scope

Added by Yingxin Cheng over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Reproduce: build and run unittest-staged-fltree under Debug build

DEBUG 2021-09-13 17:30:48,417 [shard 0] seastore - Scanner::scan_valid_records: read complete paddr_t<3, 4096>
DEBUG 2021-09-13 17:30:48,417 [shard 0] seastore - Scanner::scan_valid_records: valid record read at paddr_t<3, 4096>
DEBUG 2021-09-13 17:30:48,417 [shard 0] seastore - Scanner::scan_valid_records: valid record read, processing queue
=================================================================
==54018==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f373b8c7210 at pc 0x5556753091ea bp 0x7f373b8c6f10 sp 0x7f373b8c6f00
READ of size 8 at 0x7f373b8c7210 thread T1
    #0 0x5556753091e9 in operator() ../src/crimson/os/seastore/scanner.cc:170
    #1 0x55567534066c in invoke<crimson::os::seastore::Scanner::scan_valid_records(crimson::os::seastore::scan_valid_records_cursor&, crimson::os::seastore::segment_nonce_t, size_t, crimson::os::seastore::Scanner::found_record_handler_t&)::<lambda()> mutable::<lambda()>::<lambda()>::<lambda()>&> ../src/crimson/common/errorator.h:1221
    #2 0x55567534066c in futurize_invoke<crimson::os::seastore::Scanner::scan_valid_records(crimson::os::seastore::scan_valid_records_cursor&, crimson::os::seastore::segment_nonce_t, size_t, crimson::os::seastore::Scanner::found_record_handler_t&)::<lambda()> mutable::<lambda()>::<lambda()>::<lambda()>&> ../src/seastar/include/seastar/core/future.hh:2166
    #3 0x555675351b99 in repeat<crimson::os::seastore::Scanner::scan_valid_records(crimson::os::seastore::scan_valid_records_cursor&, crimson::os::seastore::segment_nonce_t, size_t, crimson::os::seastore::Scanner::found_record_handler_t&)::<lambda()> mutable::<lambda()>::<lambda()>::<lambda()> > ../src/crimson/common/errorator.h:66
    #4 0x555675352af3 in operator() ../src/crimson/os/seastore/scanner.cc:181
    #5 0x555675352af3 in invoke<crimson::os::seastore::Scanner::scan_valid_records(crimson::os::seastore::scan_valid_records_cursor&, crimson::os::seastore::segment_nonce_t, size_t, crimson::os::seastore::Scanner::found_record_handler_t&)::<lambda()> mutable::<lambda()>::<lambda()> > ../src/crimson/common/errorator.h:1221
    #6 0x555675352af3 in futurize_invoke<crimson::os::seastore::Scanner::scan_valid_records(crimson::os::seastore::scan_valid_records_cursor&, crimson::os::seastore::segment_nonce_t, size_t, crimson::os::seastore::Scanner::found_record_handler_t&)::<lambda()> mutable::<lambda()>::<lambda()> > ../src/seastar/include/seastar/core/future.hh:2166
    #7 0x5556753533df in invoke<crimson::os::seastore::Scanner::scan_valid_records(crimson::os::seastore::scan_valid_records_cursor&, crimson::os::seastore::segment_nonce_t, size_t, crimson::os::seastore::Scanner::found_record_handler_t&)::<lambda()> mutable::<lambda()>::<lambda()> > ../src/crimson/common/errorator.h:985
    #8 0x5556753533df in operator()<seastar::future<> > ../src/crimson/common/errorator.h:601
    #9 0x5556753533df in invoke<crimson::errorator<crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)5>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)22>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)2>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)34>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)61>))> >::_future<crimson::errorated_future_marker<void> >::safe_then<crimson::os::seastore::Scanner::scan_valid_records(crimson::os::seastore::scan_valid_records_cursor&, crimson::os::seastore::segment_nonce_t, size_t, crimson::os::seastore::Scanner::found_record_handler_t&)::<lambda()> mutable::<lambda()>::<lambda()>, crimson::errorator<crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)5>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)22>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)2>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)34>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)61>))> >::pass_further>(crimson::os::seastore::Scanner::scan_valid_records(crimson::os::seastore::scan_valid_records_cursor&, crimson::os::seastore::segment_nonce_t, size_t, crimson::os::seastore::Scanner::found_record_handler_t&)::<lambda()> mutable::<lambda()>::<lambda()>&&, crimson::errorator<crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)5>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)22>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)2>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)34>))>, crimson::unthrowable_wrapper<const std::error_code&, ((const std::error_code&)(& crimson::ec<(std::errc)61>))> >::pass_further&&)::<lambda(auto:51&&)>&, seastar::future<void> > ../src/crimson/common/errorator.h:1221
    #10 0x5556753533df in operator() ../src/seastar/include/seastar/core/future.hh:1652
    #11 0x5556753533df in call ../src/seastar/include/seastar/util/noncopyable_function.hh:124
Reactor stalled for 526 ms on shard 0. Backtrace: 0x45c5d 0x20623cc0 0x20380019 0x2039cb3e 0x2039cfce 0x2039d1a1 0x2039d448 0x29e0eb0e13bf 0x29e0eb1d57fe 0x29e0eb1d58a4 0x29e0eb1d5d1f 0x29e0eb1d5d1f 0x29e0eb1d58a4 0x29e0eb1d6b59 0x29e0eb1d7766 0x29e0eb1ca355 0x29e0eb1cc1da 0xd6470 0x322d2 0xbdb47 0xbd3d4 0xbe21a 0x1bfc41e9 0x1bffb66c 0x1c00cb99 0x1c00daf3 0x1c00e3df 0x1c02850d 0x2035bf20 0x203acc24 0x20514e55 0x20516e9d 0x2007518a 0x2007937d 0x2007a251 0x1b74fbba 0xda6b3 0x9608 0x122292
    #12 0x55567536d50d in seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>::operator()(seastar::future<void>&&) const ../src/seastar/include/seastar/util/noncopyable_function.hh:209
    #13 0x55567536d50d in seastar::future<void>::then_wrapped_nrvo<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> >, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)> >(seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&&)::{lambda(seastar::internal::promise_base_with_type<void>&&, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&, seastar::future_state<seastar::internal::monostate>&&)#1}::operator()(seastar::internal::promise_base_with_type<void>&&, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&, seastar::future_state<seastar::internal::monostate>&&) const::{lambda()#1}::operator()() const ../src/seastar/include/seastar/core/future.hh:1668
    #14 0x55567536d50d in void seastar::futurize<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > >::satisfy_with_result_of<seastar::internal::promise_base_with_type<void>, seastar::future<void>::then_wrapped_nrvo<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> >, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)> >(seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&&)::{lambda(seastar::internal::promise_base_with_type<void>&&, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&, seastar::future_state<seastar::internal::monostate>&&)#1}::operator()(seastar::internal::promise_base_with_type<void>&&, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&, seastar::future_state<seastar::internal::monostate>&&) const::{lambda()#1}>(seastar::internal::promise_base_with_type<void>&&, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&&) ../src/crimson/common/errorator.h:1253
    #15 0x55567536d50d in seastar::future<void>::then_wrapped_nrvo<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> >, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)> >(seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&&)::{lambda(seastar::internal::promise_base_with_type<void>&&, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&, seastar::future_state<seastar::internal::monostate>&&)#1}::operator()(seastar::internal::promise_base_with_type<void>&&, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&, seastar::future_state<seastar::internal::monostate>&&) const ../src/seastar/include/seastar/core/future.hh:1667
    #16 0x55567536d50d in seastar::continuation<seastar::internal::promise_base_with_type<void>, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>, seastar::future<void>::then_wrapped_nrvo<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> >, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)> >(seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&&)::{lambda(seastar::internal::promise_base_with_type<void>&&, seastar::noncopyable_function<crimson::errorator<crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)5> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)22> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)2> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)34> >, crimson::unthrowable_wrapper<std::error_code const&, crimson::ec<(std::errc)61> > >::_future<crimson::errorated_future_marker<void> > (seastar::future<void>&&)>&, seastar::future_state<seastar::internal::monostate>&&)#1}, void>::run_and_dispose() ../src/seastar/include/seastar/core/future.hh:767
    #17 0x5556796a0f20 in seastar::reactor::run_tasks(seastar::reactor::task_queue&) ../src/seastar/src/core/reactor.cc:2230
    #18 0x5556796f1c24 in seastar::reactor::run_some_tasks() ../src/seastar/src/core/reactor.cc:2639
    #19 0x555679859e55 in seastar::reactor::do_run() ../src/seastar/src/core/reactor.cc:2808
    #20 0x55567985be9d in seastar::reactor::run() ../src/seastar/src/core/reactor.cc:2691
    #21 0x5556793ba18a in seastar::app_template::run_deprecated(int, char**, std::function<void ()>&&) ../src/seastar/src/core/app-template.cc:217
    #22 0x5556793be37d in seastar::app_template::run(int, char**, std::function<seastar::future<int> ()>&&) ../src/seastar/src/core/app-template.cc:125
    #23 0x5556793bf251 in seastar::app_template::run(int, char**, std::function<seastar::future<void> ()>&&) ../src/seastar/src/core/app-template.cc:140
    #24 0x555674a94bba in SeastarRunner::reactor(int, char**) ../src/test/crimson/seastar_runner.h:49
    #25 0x555674a94bba in SeastarRunner::init(int, char**)::{lambda()#1}::operator()() const ../src/test/crimson/seastar_runner.h:30
    #26 0x555674a94bba in void std::__invoke_impl<void, SeastarRunner::init(int, char**)::{lambda()#1}>(std::__invoke_other, SeastarRunner::init(int, char**)::{lambda()#1}&&) /usr/include/c++/11/bits/invoke.h:61
    #27 0x555674a94bba in std::__invoke_result<SeastarRunner::init(int, char**)::{lambda()#1}>::type std::__invoke<SeastarRunner::init(int, char**)::{lambda()#1}>(SeastarRunner::init(int, char**)::{lambda()#1}&&) /usr/include/c++/11/bits/invoke.h:96
    #28 0x555674a94bba in void std::thread::_Invoker<std::tuple<SeastarRunner::init(int, char**)::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/11/bits/std_thread.h:253
    #29 0x555674a94bba in std::thread::_Invoker<std::tuple<SeastarRunner::init(int, char**)::{lambda()#1}> >::operator()() /usr/include/c++/11/bits/std_thread.h:260
    #30 0x555674a94bba in std::thread::_State_impl<std::thread::_Invoker<std::tuple<SeastarRunner::init(int, char**)::{lambda()#1}> > >::_M_run() /usr/include/c++/11/bits/std_thread.h:211
    #31 0x7f37439826b3  (/lib/x86_64-linux-gnu/libstdc++.so.6+0xda6b3)
    #32 0x7f374441a608 in start_thread /build/glibc-eX1tMB/glibc-2.31/nptl/pthread_create.c:477
    #33 0x7f3742cfa292 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x122292)

Address 0x7f373b8c7210 is located in stack of thread T1 at offset 672 in frame
    #0 0x555675305d65 in operator() ../src/crimson/os/seastore/scanner.cc:153

  This frame has 24 object(s):
    [48, 49) '<unknown>'
    [64, 65) '_'
    [80, 81) '<unknown>'
    [96, 97) '_'
    [112, 120) '<unknown>'
    [144, 152) '<unknown>'
    [176, 184) '<unknown>'
    [208, 216) '<unknown>'
    [240, 248) '<unknown>'
    [272, 280) '<unknown>'
    [304, 312) '__args#0' (line 153)
    [336, 352) '<unknown>'
    [368, 384) '<unknown>'
    [400, 416) 'writer'
    [432, 448) 'func'
    [464, 488) 'loc' (line 153)
    [528, 552) '<unknown>'
    [592, 624) '<unknown>'
    [656, 696) '<unknown>' <== Memory access at offset 672 is inside this variable
    [736, 776) 'fmt' (line 153)
    [816, 856) 'fmt' (line 153)
    [896, 936) 'ncf'
    [976, 1016) '<unknown>'
    [1056, 1060) '__buf'
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
Thread T1 created by T0 here:
Reactor stalled for 1462 ms on shard 0. Backtrace: 0x45c5d 0x20623cc0 0x20380019 0x2039cb3e 0x2039cfce 0x2039d1a1 0x2039d448 0x29e0eb0e13bf 0x29e0eb1d8a01 0x29e0eb1d8ad2 0x29e0eb1d8ad2 0x29e0eb1d8ad2 0x29e0eb1d8ad2 0x29e0eb1d6a6b 0x29e0eb1d7766 0x29e0eb1ca355 0x29e0eb1cc1da 0xd6470 0x2d6dc 0x2ec20 0x32383 0xbdb47 0xbd3d4 0xbe21a 0x1bfc41e9 0x1bffb66c 0x1c00cb99 0x1c00daf3 0x1c00e3df 0x1c02850d 0x2035bf20 0x203acc24 0x20514e55 0x20516e9d 0x2007518a 0x2007937d 0x2007a251 0x1b74fbba 0xda6b3 0x9608 0x122292
    #0 0x7f374448c6d5 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:216
    #1 0x7f3743982989 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xda989)
    #2 0x555674a793f6 in main ../src/test/crimson/gtest_seastar.cc:17
    #3 0x7f3742bff0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)

SUMMARY: AddressSanitizer: stack-use-after-scope ../src/crimson/os/seastore/scanner.cc:170 in operator()
Shadow bytes around the buggy address:
  0x0fe767710df0: f1 f1 f1 f1 01 f2 01 f2 01 f2 00 00 00 f2 00 00
  0x0fe767710e00: 00 f2 00 00 f8 f2 00 00 00 f2 00 00 00 f2 00 00
  0x0fe767710e10: 00 f2 00 00 00 f2 f2 f2 00 00 f2 f2 00 00 f2 f2
  0x0fe767710e20: f8 f8 f2 f2 00 00 f2 f2 00 00 00 f2 f2 f2 f2 f2
  0x0fe767710e30: 00 00 00 f2 f2 f2 f2 f2 f8 f8 f8 f8 f2 f2 f2 f2
=>0x0fe767710e40: f8 f8[f8]f8 f8 f2 f2 f2 f2 f2 00 00 00 00 00 f2
  0x0fe767710e50: f2 f2 f2 f2 00 00 00 00 00 f2 f2 f2 f2 f2 00 00
  0x0fe767710e60: 00 00 00 f2 f2 f2 f2 f2 00 00 00 00 00 f2 f2 f2
  0x0fe767710e70: f2 f2 f8 f3 f3 f3 00 00 00 00 00 00 00 00 00 00
  0x0fe767710e80: 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00
  0x0fe767710e90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==54018==ABORTING
Actions #1

Updated by Yingxin Cheng over 2 years ago

  • Description updated (diff)
Actions #2

Updated by Yingxin Cheng over 2 years ago

  • Assignee set to Xuehan Xu
Actions #3

Updated by Samuel Just over 2 years ago

  • Assignee changed from Xuehan Xu to Samuel Just
Actions #4

Updated by Samuel Just over 2 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF