Repository navigation
mon/MonClient: check stopping for auth request handling - #68245
Conversation
|
This PR is under test in https://tracker.ceph.com/issues/75899. |
| } | ||
| monc_lock.lock(); | ||
| timer.shutdown(); | ||
| stopping = false; |
There was a problem hiding this comment.
this might break get_monmap_and_config()'s retry loop, where it retries by calling shutdown() and then init() in a loop, when the config fetch times out. after the change above, init() does not reset stopping. so, on the second iteration, every auth callback returns early, and tick() also bails out early, so no monitor hunting begins and auth never completes.
in a3e82e9, Sage guarded the loop by stopping = true and stopping = false, so that the ops in the window between shutdown() and init() is marked unsafe (flagged by stopping). this applies to each iteration in the loop.
probably a simple fix would be to reset stopping at the top of init(), to unblock the retry path?
There was a problem hiding this comment.
probably a simple fix would be to reset stopping at the top of init(), to unblock the retry path?
This sounds reasonable.
eae79c2 to
5bb1a21
Compare
|
This PR is under test in https://tracker.ceph.com/issues/76018. |
badone
left a comment
There was a problem hiding this comment.
This looks good to me, thanks Patrick!
|
I wonder if this happens to be addressing the root cause of |
When the MonClient is shutting down, it is no longer safe to access MonClient::auth and other members. The AuthClient methods should be checking the stopping flag in this case. The key bit from the segfault backtrace (thanks Brad Hubbard!) is here: #13 0x00007f921ee23c40 in ProtocolV2::handle_auth_done (this=0x7f91cc0945f0, payload=...) at /usr/include/c++/12/bits/shared_ptr_base.h:1665 #14 0x00007f921ee16a29 in ProtocolV2::run_continuation (this=0x7f91cc0945f0, continuation=...) at msg/./src/msg/async/ProtocolV2.cc:54 #15 0x00007f921edee56e in std::function<void (char*, long)>::operator()(char*, long) const (__args#1=0, __args#0=<optimized out>, this=0x7f91cc0744d8) at /usr/include/c++/12/bits/std_function.h:591 #16 AsyncConnection::process (this=0x7f91cc074140) at msg/./src/msg/async/AsyncConnection.cc:485 #17 0x00007f921ee3300c in EventCenter::process_events (this=0x55efc9d0a058, timeout_microseconds=<optimized out>, working_dur=0x7f921a891d88) at msg/./src/msg/async/Event.cc:465 #18 0x00007f921ee38bf9 in operator() (__closure=<optimized out>) at msg/./src/msg/async/Stack.cc:50 #19 std::__invoke_impl<void, NetworkStack::add_thread(Worker*)::<lambda()>&> (__f=...) at /usr/include/c++/12/bits/invoke.h:61 #20 std::__invoke_r<void, NetworkStack::add_thread(Worker*)::<lambda()>&> (__fn=...) at /usr/include/c++/12/bits/invoke.h:111 #21 std::_Function_handler<void(), NetworkStack::add_thread(Worker*)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/12/bits/std_function.h:290 #22 0x00007f921e81f253 in std::execute_native_thread_routine (__p=0x55efc9e9c5f0) at ../../../../../src/libstdc++-v3/src/c++11/thread.cc:82 #23 0x00007f921f5e8ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442 #24 0x00007f921f67a8d0 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 I originally thought this may be the issue causing [1] however that turned out to be an issue caused by OpenSSL's use of atexit handlers. I still think there is a bug here so I am continuing with this change. [1] https://tracker.ceph.com/issues/59335 Fixes: https://tracker.ceph.com/issues/76017 Signed-off-by: Patrick Donnelly <[email protected]>
Yes, there's a window where the monc is shutdown but the messenger hasn't been stopped. Since you're doing a diff on stdout/stderr this should probably fix that. |
|
jenkins test windows |
|
jenkins test docs |
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.