Skip to content

test/rgw/notifications: do not delay http responses to notifications - #55663

Merged
yuvalif merged 5 commits into
ceph:mainfrom
yuvalif:wip-yuval-63909
Apr 10, 2024
Merged

yuvalif merged 5 commits into
ceph:mainfrom
yuvalif:wip-yuval-63909

Conversation

@yuvalif

@yuvalif yuvalif commented Feb 20, 2024

Copy link
Copy Markdown
Contributor

Fixes: https://tracker.ceph.com/issues/63909

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@AliMasarweh AliMasarweh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good

@yuvalif

yuvalif commented Mar 12, 2024

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@yuvalif

yuvalif commented Mar 14, 2024

Copy link
Copy Markdown
Contributor Author

@kchheda3

Copy link
Copy Markdown
Contributor

test is still failing with the fix. see: https://pulpito.ceph.com/yuvalif-2024-03-14_08:49:41-rgw:notifications-wip-yuval-63909-distro-default-smithi/ fix is correct, but there is probably another root cause

@yuvalif i am trying to remember, i had done some analysis on this and i am trying to remember where i put those analysis.
from what i can re collect is, the header object that stores the notification count still has still the value, however actual queue does not have any entries in it so we do not see any logs about processing entries. Secondly we also do not see any logs indicating the entries were expired or entires were cleaned up as they were delivered, but the queue is empty as cls_list_entries returns zero. This definitely was race condition inside ceph and not test issue.
Also i remember i could repro this always on a multisite cluster even when running individually. (running individually on single site always worked fine)

@yuvalif

yuvalif commented Mar 20, 2024

Copy link
Copy Markdown
Contributor Author

test is still failing with the fix. see: https://pulpito.ceph.com/yuvalif-2024-03-14_08:49:41-rgw:notifications-wip-yuval-63909-distro-default-smithi/ fix is correct, but there is probably another root cause

@yuvalif i am trying to remember, i had done some analysis on this and i am trying to remember where i put those analysis. from what i can re collect is, the header object that stores the notification count still has still the value, however actual queue does not have any entries in it so we do not see any logs about processing entries. Secondly we also do not see any logs indicating the entries were expired or entires were cleaned up as they were delivered, but the queue is empty as cls_list_entries returns zero. This definitely was race condition inside ceph and not test issue. Also i remember i could repro this always on a multisite cluster even when running individually. (running individually on single site always worked fine)

CC @AliMasarweh

thanks for the input. i looked into the cls call that removes from the queue and update the count:
https://github.com/ceph/ceph/blob/main/src/cls/2pc_queue/cls_2pc_queue.cc#L594

could not see any race condition there. only issue is thet deletion from the queue may succeed while updating the count in the head may fail. but in such a case, we should see this failure reflected in the rgw log (which i don't see).

maybe ther issue is in the notification manager code: https://github.com/ceph/ceph/blob/main/src/rgw/driver/rados/rgw_notify.cc#L469
however, this is single threaded code, so, unlikely to have a race condition.

btw, could not reproduce that locally, even with multisite and multiple RGWs runing.

@yuvalif
yuvalif requested a review from AliMasarweh April 2, 2024 14:05
@yuvalif

yuvalif commented Apr 3, 2024

Copy link
Copy Markdown
Contributor Author

@AliMasarweh AliMasarweh left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You have forgot to change some test are still running StreamingHTTPServer, is that intentional?

if record['s3']['bucket']['name'] == key.bucket.name and \
record['s3']['object']['key'] == key.name:
# Assertion Error needs to be fixed
#assert_equal(key.etag[1:-1], record['s3']['object']['eTag'])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why are we doing [1:-1], are we cutting the brackets at the start and the end?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not sure about that. this function needs some cleanup anyway.
will take that to a separate PR

@yuvalif

yuvalif commented Apr 3, 2024

Copy link
Copy Markdown
Contributor Author

You have forgot to change some test are still running StreamingHTTPServer, is that intentional?

this is for tests that are skipped

@kchheda3

kchheda3 commented Apr 3, 2024 •

Copy link
Copy Markdown
Contributor

@yuvalif did you try running your fix against a multisite cluster ?
and also ensure your run all the basic_test (the ttl and stats are both part of basic_tests)
coz i still often see failures for ttl when i run all the basic tests against a multisite endpoint

@yuvalif

yuvalif commented Apr 3, 2024 •

Copy link
Copy Markdown
Contributor Author

@yuvalif did you try running your fix against a multisite cluster ? and also ensure your run all the basic_test (the ttl and stats are both part of basic_tests) coz i still often see failures for ttl when i run all the basic tests against a multisite endpoint

i ran that locally against mulltisite, did not observe issues.
anyway, this PR is about fixing the flawed http server implementation in the test suite (causing many failures in teuthology).
once we have a reliable test, it would be much easier to find product issues

@yuvalif
yuvalif force-pushed the wip-yuval-63909 branch 2 times, most recently from 81f2cb2 to be1b1e6 Compare April 8, 2024 17:01
we also increase the wating time after rerunning the http server
to allow fo the persistent notifications retries to finish

Fixes: https://tracker.ceph.com/issues/63909

Signed-off-by: Yuval Lifshitz <[email protected]>
yuvalif added 3 commits April 9, 2024 08:48
this may happen when a test fails, and does not cleanup topics
it created. other tests that verify the number of topics may fail
because of that.
all tests that verify number of topics, should delete all topics at the
start of the test.

Signed-off-by: Yuval Lifshitz <[email protected]>
when checking persistent stats queue length

Signed-off-by: Yuval Lifshitz <[email protected]>
@yuvalif

yuvalif commented Apr 9, 2024

Copy link
Copy Markdown
Contributor Author

@yuvalif

yuvalif commented Apr 9, 2024

Copy link
Copy Markdown
Contributor Author

another teuthology job: https://pulpito.ceph.com/yuvalif-2024-04-09_11:31:02-rgw:notifications-wip-yuval-63909-distro-default-smithi/
http (and kafka) test all passing, had a crash in amqp tests:

in thread 7fb8bd455640 thread_name:io_context_pool

 ceph version 19.0.0-2635-gdded6fa8 (dded6fa8fb3155a1d6c5dc77b4d3ab21f6c18cce) squid (dev)
 1: /lib64/libc.so.6(+0x54db0) [0x7fb994c54db0]
 2: radosgw(+0x651033) [0x55d003004033]
 3: radosgw(+0x651042) [0x55d003004042]
 4: radosgw(+0x60ac54) [0x55d002fbdc54]
 5: radosgw(+0x8323b3) [0x55d0031e53b3]
 6: (rgw::sal::RadosObject::~RadosObject()+0x39) [0x55d00321dc99]
 7: (rgw::sal::RadosObject::~RadosObject()+0xd) [0x55d00321dd3d]
 8: (req_state::~req_state()+0x504) [0x55d002f777e4]
 9: (process_request(RGWProcessEnv const&, RGWRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RGWRestfulIO*, optional_yield, rgw::dmclock::Scheduler*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::chrono::duration<unsigned long, std::ratio<1l, 1000000000l> >*, int*)+0x1cc2) [0x55d002e846b2]
 10: radosgw(+0xd9c2d0) [0x55d00374f2d0]
 11: radosgw(+0x431ec4) [0x55d002de4ec4]
 12: make_fcontext()
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.

@cbodley

cbodley commented Apr 9, 2024

Copy link
Copy Markdown
Contributor

i had seen the same crash on the account topic branch: cbodley#7 (comment)

@cbodley

cbodley commented Apr 9, 2024

Copy link
Copy Markdown
Contributor

after this merges, it might be worth doing some rgw/notifications runs with valgrind enabled

test_ps_s3_persistent_topic_stats may delete boto client threads
before they are done.
also, no need to run the http server twice

Fixes: https://tracker.ceph.com/issues/63909

Signed-off-by: Yuval Lifshitz <[email protected]>
@yuvalif

yuvalif commented Apr 10, 2024

Copy link
Copy Markdown
Contributor Author

teuthology is mostly passing: https://pulpito.ceph.com/yuvalif-2024-04-10_09:16:59-rgw:notifications-wip-yuval-63909-distro-default-smithi/

constantly crashing when doing realm reload while failing to send notifications to an http server.

2024-04-10T09:52:31.430 INFO:tasks.rgw.client.1.smithi163.stdout:*** Caught signal (Segmentation fault) **
2024-04-10T09:52:31.430 INFO:tasks.rgw.client.1.smithi163.stdout: in thread 7fb9bb342640 thread_name:safe_timer
2024-04-10T09:52:31.431 INFO:tasks.rgw.client.1.smithi163.stdout: ceph version 19.0.0-2635-gdded6fa8 (dded6fa8fb3155a1d6c5dc77b4d3ab21f6c18cce) squid (dev)
2024-04-10T09:52:31.431 INFO:tasks.rgw.client.1.smithi163.stdout: 1: /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fbaef789520]
2024-04-10T09:52:31.431 INFO:tasks.rgw.client.1.smithi163.stdout: 2: radosgw(+0x898b9c) [0x55fcb33eab9c]
2024-04-10T09:52:31.431 INFO:tasks.rgw.client.1.smithi163.stdout: 3: radosgw(+0x397f99) [0x55fcb2ee9f99]
2024-04-10T09:52:31.431 INFO:tasks.rgw.client.1.smithi163.stdout: 4: (void boost::context::detail::context_entry<boost::context::detail::record<boost::context::continuation, boost::context::basic_protected_fixedsize_stack<boost::context::stack_traits>, spawn::detail::spawn_helper<boost::asio::executor_binder<void (*)(), boost::asio::any_io_executor>, rgw::notify::Manager::process_queue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, spawn::basic_yield_context<boost::asio::executor_binder<void (*)(), boost::asio::any_io_executor> >)::{lambda(spawn::basic_yield_context<boost::asio::executor_binder<void (*)(), boost::asio::any_io_executor> >)#7}, boost::context::basic_protected_fixedsize_stack<boost::context::stack_traits> >::operator()()::{lambda(boost::context::continuation&&)#1}> >(boost::context::detail::transfer_t)+0x55) [0x55fcb33f00b5]
2024-04-10T09:52:31.431 INFO:tasks.rgw.client.1.smithi163.stdout: 5: make_fcontext()

this is tracked here: https://tracker.ceph.com/issues/65337
and happening regardless of the test changes in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants