Skip to content

squid: mon/MonClient: check stopping for auth request handling - #68509

Merged
batrick merged 1 commit into
ceph:squidfrom
batrick:wip-76075-squid
Jul 27, 2026
Merged

batrick merged 1 commit into
ceph:squidfrom
batrick:wip-76075-squid

Conversation

@batrick

@batrick batrick commented Apr 21, 2026

Copy link
Copy Markdown
Member

@batrick
batrick requested a review from a team as a code owner April 21, 2026 13:55
@batrick batrick added this to the squid milestone Apr 21, 2026
@batrick batrick added the core label Apr 21, 2026
@github-actions github-actions Bot added the mon label Apr 21, 2026

@idryomov idryomov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@batrick batrick added the releng-audit-fail Release engineering: failed backport verification audit. label May 14, 2026
@github-actions github-actions Bot added releng-audit-pass Release engineering: passed backport verification audit. and removed releng-audit-fail Release engineering: failed backport verification audit. labels May 14, 2026
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]>
(cherry picked from commit 93469d4)
@batrick
batrick force-pushed the wip-76075-squid branch from c2eb248 to 702e494 Compare June 8, 2026 12:36
@batrick

batrick commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

(trivial rebase)

@github-actions github-actions Bot added releng-audit-pass Release engineering: passed backport verification audit. and removed releng-audit-pass Release engineering: passed backport verification audit. labels Jun 8, 2026
@batrick

batrick commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

jenkins test windows

@batrick batrick modified the milestones: squid, v19.2.5 Jun 12, 2026
@yuriw

yuriw commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri3-testing-20260622.144259-squid.

@amathuria

Copy link
Copy Markdown
Contributor

@batrick batrick modified the milestones: v19.2.5, v19.2.6 Jul 21, 2026
@batrick batrick added the releng-audit-queue Release engineering: queued for backport verification audit. label Jul 21, 2026
@github-actions github-actions Bot added releng-audit-pass Release engineering: passed backport verification audit. and removed releng-audit-queue Release engineering: queued for backport verification audit. releng-audit-pass Release engineering: passed backport verification audit. labels Jul 21, 2026
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

This PR has been added to wip-bharath1-testing-20260724.101528-squid.

@yuriw yuriw added the TESTED label Jul 24, 2026
@batrick
batrick merged commit 43276b6 into ceph:squid Jul 27, 2026
12 checks passed
@batrick
batrick deleted the wip-76075-squid branch July 27, 2026 13:46
@Naveenaidu

Copy link
Copy Markdown
Contributor

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.

6 participants