Project

General

Profile

Actions

Bug #48034

closed

Should rgw::auth::Strategy::apply be noexcept?

Added by Ponnuvel P over 3 years ago. Updated about 3 years ago.

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

0%

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

Description

While looking at a radosgw crash, the following backtraces are produced from gdb:

#0  raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x000055ab967466b0 in reraise_fatal (signum=6) at ./src/global/signal_handler.cc:81
#2 handle_fatal_signal (signum=6) at ./src/global/signal_handler.cc:326
#3 <signal handler called>
#4 _GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#5 0x00007f97e09c18b1 in __GI_abort () at abort.c:79
#6 0x00007f97e13b4957 in __gnu_cxx::
_verbose_terminate_handler () at ../../../../src/libstdc++-v3/libsupc++/vterminate.cc:95
#7 0x00007f97e13baae6 in _cxxabiv1::_terminate (handler=<optimized out>) at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:47
#8 0x00007f97e13bab21 in std::terminate () at ../../../../src/libstdc++-v3/libsupc++/eh_terminate.cc:57
#9 0x000055ab96801eb0 in rgw::auth::Strategy::apply (dpp=0x55ab9a627000, auth_strategy=..., s=<optimized out>) at ./src/rgw/rgw_auth.cc:273
#10 0x000055ab96766a0b in process_request (store=0x55ab99917800, rest=0x7fff342285a0, req=0x55ab9b020930, frontend_prefix=..., auth_registry=..., client_io=client_io@entry=0x55ab9b0209c0, olog=0x0, yield=..., scheduler=0x55ab9ac1f928, http_ret=0x0) at ./src/rgw/rgw_process.cc:251
#11 0x000055ab966bd660 in (anonymous namespace)::handle_connection<boost::asio::basic_stream_socket<boost::asio::ip::tcp> > (context=..., env=..., stream=..., buffer=..., pause_mutex=..., scheduler=<optimized out>, ec=..., yield=..., is_ssl=false) at ./src/rgw/rgw_asio_frontend.cc:167
#12 0x000055ab966be86d in (anonymous namespace)::AsioFrontend::<lambda(boost::asio::yield_context)>::operator() (yield=..., __closure=0x55ab9a8aa1e8) at ./src/rgw/rgw_asio_frontend.cc:638
#13 boost::asio::detail::coro_entry_point<boost::asio::executor_binder<void ()(), boost::asio::strand<boost::asio::io_context::executor_type> >, (anonymous namespace)::AsioFrontend::accept((anonymous namespace)::AsioFrontend::Listener&, boost::system::error_code)::<lambda(boost::asio::yield_context)> >::operator() (ca=..., this=<optimized out>) at ./obj-x86_64-linux-gnu/boost/include/boost/asio/impl/spawn.hpp:337
#14 boost::coroutines::detail::push_coroutine_object<boost::coroutines::pull_coroutine<void>, void, boost::asio::detail::coro_entry_point<boost::asio::executor_binder<void (
)(), boost::asio::strand<boost::asio::io_context::executor_type> >, (anonymous namespace)::AsioFrontend::accept((anonymous namespace)::AsioFrontend::Listener&, boost::system::error_code)::<lambda(boost::asio::yield_context)> >&, boost::coroutines::basic_standard_stack_allocator<boost::coroutines::stack_traits> >::run (this=0x55ab9b021f60) at ./obj-x86_64-linux-gnu/boost/include/boost/coroutine/detail/push_coroutine_object.hpp:302
#15 boost::coroutines::detail::trampoline_push_void<boost::coroutines::detail::push_coroutine_object<boost::coroutines::pull_coroutine<void>, void, boost::asio::detail::coro_entry_point<boost::asio::executor_binder<void ()(), boost::asio::strand<boost::asio::io_context::executor_type> >, (anonymous namespace)::AsioFrontend::accept((anonymous namespace)::AsioFrontend::Listener&, boost::system::error_code)::<lambda(boost::asio::yield_context)> >&, boost::coroutines::basic_standard_stack_allocator<boost::coroutines::stack_traits> > >(boost::context::detail::transfer_t) (t=...) at ./obj-x86_64-linux-gnu/boost/include/boost/coroutine/detail/trampoline_push.hpp:70
#16 0x000055ab96bfad5f in make_fcontext ()
#17 0x000055ab9703fcd0 in vtable for boost::coroutines::detail::push_coroutine_object<boost::coroutines::pull_coroutine<void>, void, boost::asio::detail::coro_entry_point<boost::asio::executor_binder<void (
)(), boost::asio::strand<boost::asio::io_context::executor_type> >, (anonymous namespace)::AsioFrontend::accept((anonymous namespace)::AsioFrontend::Listener&, boost::system::error_code)::{lambda(boost::asio::basic_yield_context<boost::asio::executor_binder<void (*)(), boost::asio::executor> >)#4}>&, boost::coroutines::basic_standard_stack_allocator<boost::coroutines::stack_traits> > ()

Looks like rgw::auth::Strategy::apply throws an exception that's not 'int'. So std::terminate is called right away. Since the function is marked noexcept, the caller can't handle it, either (even if the caller wishes so).

I am still debugging the actual problem but I think that if rgw::auth::Strategy::apply can throw other exceptions, it shouldn't be 'noexcept' - which terminates immediately without providing a chance to inspect the exception thrown.


Related issues 2 (0 open2 closed)

Copied to rgw - Backport #49537: nautilus: Should rgw::auth::Strategy::apply be noexcept?ResolvedPonnuvel PActions
Copied to rgw - Backport #49538: octopus: Should rgw::auth::Strategy::apply be noexcept?ResolvedPonnuvel PActions
Actions #2

Updated by Casey Bodley over 3 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Casey Bodley over 3 years ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 37926
Actions #4

Updated by Casey Bodley over 3 years ago

  • Backport set to nautilus octopus
Actions #5

Updated by Ponnuvel P about 3 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #6

Updated by Backport Bot about 3 years ago

  • Copied to Backport #49537: nautilus: Should rgw::auth::Strategy::apply be noexcept? added
Actions #7

Updated by Backport Bot about 3 years ago

  • Copied to Backport #49538: octopus: Should rgw::auth::Strategy::apply be noexcept? added
Actions #8

Updated by Loïc Dachary about 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF