Project

General

Profile

Actions

Bug #79732

closed
XX AN

test_ping_monitor fails

Bug #79732: test_ping_monitor fails

Added by Xuehan Xu 3 months ago. Updated 2 months ago.

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

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v21.3.0-3799-gafc052cf71
Released In:
Upkeep Timestamp:
2026-09-30T00:10:37+00:00

Description

This doesn't seem to be a crimson issue

https://pulpito.ceph.com/xuxuehan-2026-08-21_09:08:48-crimson-rados-wip-xuxuehan-70767-70766-70652-testing-distro-debug-trial/501152/

2026-08-21T09:23:19.776 INFO:tasks.workunit.client.0.trial082.stderr:Fatal Python error: Aborted
2026-08-21T09:23:19.776 INFO:tasks.workunit.client.0.trial082.stderr:
2026-08-21T09:23:19.776 INFO:tasks.workunit.client.0.trial082.stderr:Thread 0x00007f6d7564ce80 (most recent call first):
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/home/ubuntu/cephtest/clone.client.0/src/test/pybind/test_rados.py", line 118 in test_ping_monitor
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/python.py", line 194 in pytest_pyfunc_call
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77 in _multicall
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115 in _hookexec
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493 in __call__
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/python.py", line 1792 in runtest
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 169 in pytest_runtest_call
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77 in _multicall
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115 in _hookexec
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493 in __call__
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 262 in <lambda>
2026-08-21T09:23:19.777 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 341 in from_call
2026-08-21T09:23:19.778 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 261 in call_runtest_hook
2026-08-21T09:23:19.778 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 222 in call_and_report
2026-08-21T09:23:19.778 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 133 in runtestprotocol
2026-08-21T09:23:19.778 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/runner.py", line 114 in pytest_runtest_protocol
2026-08-21T09:23:19.778 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77 in _multicall
2026-08-21T09:23:19.778 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115 in _hookexec
2026-08-21T09:23:19.778 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493 in __call__
2026-08-21T09:23:19.778 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 350 in pytest_runtestloop
2026-08-21T09:23:19.778 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77 in _multicall
2026-08-21T09:23:19.778 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115 in _hookexec
2026-08-21T09:23:19.778 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493 in __call__
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 325 in _main
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 271 in wrap_session
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/main.py", line 318 in pytest_cmdline_main
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_callers.py", line 77 in _multicall
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_manager.py", line 115 in _hookexec
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pluggy/_hooks.py", line 493 in __call__
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 169 in main
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/_pytest/config/__init__.py", line 192 in console_main
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:  File "/usr/lib/python3.12/site-packages/pytest/__main__.py", line 5 in <module>
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:  File "<frozen runpy>", line 88 in _run_code
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:  File "<frozen runpy>", line 198 in _run_module_as_main
2026-08-21T09:23:19.779 INFO:tasks.workunit.client.0.trial082.stderr:
2026-08-21T09:23:19.780 INFO:tasks.workunit.client.0.trial082.stderr:Extension modules: rados (total: 1)
2026-08-21T09:23:19.896 INFO:tasks.workunit.client.0.trial082.stderr:/home/ubuntu/cephtest/clone.client.0/qa/workunits/rados/test_python.sh: line 4: 15720 Aborted                 (core dumped) ${PYTHON:-python3} -m pytest -v $(dirname $0)/../../../src/test/pybind/test_rados.py "$@" 
2026-08-21T09:23:19.896 DEBUG:teuthology.orchestra.run:got remote process result: 134
2026-08-21T09:23:19.897 INFO:tasks.workunit.client.0.trial082.stdout:../../../clone.client.0/src/test/pybind/test_rados.py::TestRados::test_ping_monitor

Related issues 1 (1 open — 0 closed)

Related to RADOS - Bug #80239: test_rados.py: terminated with signal SIGABRT core dump python3New

Actions

XX Updated by Xuehan Xu 3 months ago Actions #1

  • Subject changed from test_ping_monitor failse to test_ping_monitor fails

AN Updated by Akshay Nazare 3 months ago · Edited Actions #2

Hii @Xuehan Xu,

I have audited and this is what is happening :

ping_monitor() is aborting inside librados, so the msgr worker calls ceph_abort() and kills the whole pytest process — that's why the traceback just ends at test_rados.py:118 (self.rados.ping_monitor(mon['name'])) with "Fatal Python error: Aborted" instead of a normal failure.

MonClient::ping_monitor() (src/mon/MonClient.cc:250) is deliberately designed to run outside monc_lock — its own comment explains it spins up a private messenger and a private MonClientPinger guarded by MonClientPinger::lock precisely so it can ping mon.FOO while hunting mon.BAR.

Commit 3e885abc2ae ("mon/MonClient: add assertions for monc lock in MonConnection") added ceph_assert(ceph_mutex_is_locked_by_me(monc_lock)) to the MonConnection auth methods and handed MonClient's monc_lock to the pinger's MonConnection at src/mon/MonClient.cc:288. On the msgr2 handshake, MonClientPinger::get_auth_request (src/mon/MonClient.h:216) forwards into MonConnection::get_auth_request with nobody holding monc_lock → assert fires. The ping path can never satisfy that assertion as written.

Why now, why debug-only

- 3e885abc2ae is dated 2025-08-19 but only landed in main on 2026-08-19 via merge 96335615c1b ("Merge branch 'CVE-2025-30156-cephx-main' into main"). The failing run is 2026-08-21.
- ceph_mutex_is_locked_by_me is a real check only under CEPH_DEBUG_MUTEX; otherwise it's #define ... true (src/common/ceph_mutex.h:138 vs :193). The job is ...-distro-debug-trial.
- WITH_CRIMSON=1 also stubs the macro out, but it's a crimson-target-only compile definition (src/crimson/CMakeLists.txt:2), so classic librados in a crimson build still gets the real check. Hence a crimson job exposing a purely classic-client bug.

So expect the same abort in any debug job running qa/workunits/rados/test_python.sh (e.g. rados/basic/tasks/rados_python.yaml).

What can i do :

Keep the assertion — it guards the client authorizer. Fix which lock the pinger's MonConnection asserts on:

1. src/mon/MonClient.cc:288 — pass pinger->lock instead of monc_lock.
2. src/mon/MonClient.h — take MonClientPinger::lock in the four AuthClient overrides that forward into mc, so the assertion is genuinely satisfied rather than side-stepped. No deadlock: wait_for_reply() releases the lock on the condvar wait, and nothing under the auth methods re-enters the pinger.
3. Optionally rename the member from monc_lock to auth_lock.

Taking monc_lock around the ping instead does not work — the callbacks run on a msgr thread, so is_locked_by_me() still fails, and it reintroduces the blocking the design avoids. Worth stating on the tracker to pre-empt that suggestion.

I also noticed a separate latent bug: wait_for_reply() sets done = false after the MPing is sent, so a fast reply gets clobbered into a spurious ETIMEDOUT — the test only survives it via its if output is None: continue loop. Flagged as a separate patch in the writeup.

I would love to work on this one :)

XX Updated by Xuehan Xu 3 months ago Actions #3

  • Assignee set to Akshay Nazare

JP Updated by Jose J Palacios Perez 3 months ago Actions #4

  • Related to Bug #80239: test_rados.py: terminated with signal SIGABRT core dump python3 added

AN Updated by Akshay Nazare 3 months ago Actions #5

https://github.com/ceph/ceph/pull/71797 - check on this PR for the above issue
let me know your concerns on it

KC Updated by Kefu Chai 3 months ago Actions #6

  • Status changed from New to Fix Under Review
  • Pull request ID set to 71797

UB Updated by Upkeep Bot 2 months ago Actions #7

  • Status changed from Fix Under Review to Resolved
  • Merge Commit set to afc052cf716d101c63fbb4eb7cf6fba8bf1429a4
  • Fixed In set to v21.3.0-3799-gafc052cf71
  • Upkeep Timestamp set to 2026-09-30T00:10:37+00:00
Actions

Also available in: PDF Atom