Project

General

Profile

Actions

Bug #50103

closed

multisite: crash in RGWRESTStreamRWRequest::do_send_prepare() with empty url

Added by Casey Bodley about 3 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
multisite backport_processed
Backport:
pacific octopus nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):

33117cad3ca92b33597050a6d13cef4c6e3110898b509a82211a859ed6333821
39a3d8cc71898dd0f486ea1cace46babf5c4cdbf18d64adaf1505e7d447ee44d


Description

ceph version 17.0.0-2661-g9561b4dde37 (9561b4dde37fe1ecdd471151bdca5997536feb53) quincy (dev)
 1: /root/projects/another-ceph/build/lib/libradosgw.so.2(+0x2799040) [0x7f76c00ff040]                                                                                                                                                        
 2: /lib64/libpthread.so.0(+0x141e0) [0x7f76ba9781e0]
 3: gsignal()
 4: abort()
 5: (std::exception::exception()+0) [0x5615b35e1ecc]
 6: (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long)+0x46) [0x5615b35ee600]
 7: (RGWRESTStreamRWRequest::do_send_prepare(RGWAccessKey*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ceph::buffer::v15_2_0::list*)+0x83) [0x7f76bfc99d09]
 8: (RGWRESTStreamRWRequest::send_prepare(RGWAccessKey*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ceph::buffer::v15_2_0::list*)+0x6f) [0x7f76bfc99c3f]
 9: (RGWRESTStreamRWRequest::send_request(RGWAccessKey*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, RGWHTTPManager*, ceph::buffer::v15_2_0::list*)+0x3f) [0x7f76bfc9a339]
 10: (RGWRESTReadResource::aio_read()+0x84) [0x7f76bfca162c]
 11: (RGWReadRawRESTResourceCR::send_request()+0xc7) [0x7f76bf99b4b5]
 12: (RGWSimpleCoroutine::state_send_request()+0x23) [0x7f76bfb3f1e5]
 13: (RGWSimpleCoroutine::operate()+0x21e) [0x7f76bfb3ee9a]
 14: (RGWCoroutine::operate_wrapper()+0x23) [0x7f76bf62969d]
 15: (RGWCoroutinesStack::operate(RGWCoroutinesEnv*)+0x148) [0x7f76bfb399f6]
 16: (RGWCoroutinesManager::run(std::__cxx11::list<RGWCoroutinesStack*, std::allocator<RGWCoroutinesStack*> >&)+0x2ff) [0x7f76bfb3bcbf]
 17: (RGWSyncLogTrimThread::process()+0x292) [0x7f76bfc4e472]
 18: (RGWRadosThread::Worker::entry()+0x91) [0x7f76bfbf9061]
 19: (Thread::entry_wrapper()+0x83) [0x7f76bc2b3dd9]
 20: (Thread::_entry_func(void*)+0x18) [0x7f76bc2b3d4c]
 21: /lib64/libpthread.so.0(+0x93f9) [0x7f76ba96d3f9]
 22: clone()

when the given url is empty, this code tries to access new_url[-1]:

int RGWRESTStreamRWRequest::do_send_prepare(RGWAccessKey *key, map<string, string>& extra_headers, const string& resource,
                                         bufferlist *send_data)
{
  string new_url = url;
  if (new_url[new_url.size() - 1] != '/')
    new_url.append("/");


Related issues 4 (0 open4 closed)

Has duplicate rgw - Bug #51910: crash: RGWRESTStreamRWRequest::do_send_prepareDuplicate

Actions
Copied to rgw - Backport #50727: octopus: multisite: crash in RGWRESTStreamRWRequest::do_send_prepare() with empty urlResolvedCory SnyderActions
Copied to rgw - Backport #50728: pacific: multisite: crash in RGWRESTStreamRWRequest::do_send_prepare() with empty urlResolvedCory SnyderActions
Copied to rgw - Backport #50729: nautilus: multisite: crash in RGWRESTStreamRWRequest::do_send_prepare() with empty urlRejectedActions
Actions

Also available in: Atom PDF