Repository navigation
osdc: deliver neorados completions to associated executor - #69253
Conversation
|
fix credited to @BBoozmen from #69193 (comment) |
|
@cbodley make check is failing
|
while Objecter delivers librados completions directly by calling Context::complete(), neorados completions are passed in as boost::asio::any_completion_handler and delivered to an asio executor via boost::asio::defer() on completion asio handlers may have an "associated executor" so callers can customize where these completions are delivered. for example, multithreaded applications often use strand executors to synchronize completion handlers and prevent data races between concurrent operations however, applications like radosgw that depend on strands for thread-safety did not get it due to the fact that Objecter's Op::complete() delivered all neorados completions to the default io_context executor use boost::asio::get_associated_executor() to respect the handler's executor affinity, if any. but because the Op's handler is the type-erased any_completion_handler, its associated executor is also type-erased as any_completion_executor. that any_completion_executor doesn't support the blocking::never_t property required by defer/post, so defer() was changed to dispatch() which may call the handler directly if Objecter is already running on the requested executor. i assume this is safe, given that librados' Context-based completions already do this Fixes: https://tracker.ceph.com/issues/76725 Co-Authored-by: Oguzhan Ozmen <[email protected]> Signed-off-by: Casey Bodley <[email protected]>
|
oops, thanks! template argument deduction was failing there on:
i changed defer() to dispatch() with this update to the commit message:
|
|
hi, updating that in ASAN testing an ASAN issues still repro after this fix, but much more sporadically that before it, @BBoozmen @cbodley @smanjara @adamemerson PTAL, the repro env is up and I can run ASAN repro validation on any ideas for code changes or conf change suggestions like playing with rgw_thread_pool_size, rgw_max_concurrent_requests, rgw_multi_obj_del_max_aio, other aio tunables ... |
repurpose ceph_test_neorados_completions to verify that completions are delivered to the handler's associated executor Signed-off-by: Casey Bodley <[email protected]>
|
i was able to write a test case to validate the change. run against an unpatched neorados, the test hangs on |
Just making sure did you cherry-pick aabb5c7 to your test repo? because looking at new asan log: send_partial_response is at line 4978 which makes sense given your mutex branch https://github.com/mkogan1/ceph/blob/2d37be734948cf1b8675a710769023d0c656dde9/src/rgw/rgw_rest_s3.cc#L4948 but looking at this PR the same function is at line 5016 https://github.com/cbodley/ceph/blob/c4d9a406c8e9ed514067a37574dec88a794acd7c/src/rgw/rgw_rest_s3.cc#L5016 - trying to undertsand are we running both fix (mutex + this one) or just this one. |
while
Objecterdelivers librados completions directly by callingContext::complete(), neorados completions are passed in asboost::asio::any_completion_handlerand delivered to an asio executor viaboost::asio::defer()on completionasio handlers may have an "associated executor" so callers can customize where these completions are delivered. for example, multithreaded applications often use strand executors to synchronize completion handlers and prevent data races between concurrent operations
however, applications like radosgw that depend on strands for thread-safety did not get it due to the fact that Objecter's
Op::complete()delivered all neorados completions to the default io_context executoruse
boost::asio::get_associated_executor()to respect the handler's executor affinity, if anyFixes: https://tracker.ceph.com/issues/76725
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.