Project

General

Profile

Actions

Bug #18071

closed

radosgw valgrind "invalid read size 4" RGWGetObj

Added by Matt Benjamin over 7 years ago. Updated about 7 years ago.

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

0%

Source:
Development
Tags:
Backport:
jewel
Regression:
Yes
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Found reviewing output for PR #11751. This doesn't look conditioned by that 1-liner change, perhaps has been around for a while. Classing as minor as no fault seen to date.

<valgrindoutput>

<protocolversion>4</protocolversion>
<protocoltool>memcheck</protocoltool>

<preamble>
<line>Memcheck, a memory error detector</line>
<line>Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.</line>
<line>Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info</line>
<line>Command: radosgw --rgw-frontends civetweb port=7280 --rgw-zone r0z1 -n client.0 -k /etc/ceph/ceph.client.0.keyring --log-file /var/log/ceph/rgw.client.0.log --rgw_ops_log_socket_path /home/ubuntu/cephtest/rgw.opslog.client.0.sock --foreground</line>
</preamble>

<pid>17320</pid>
<ppid>17317</ppid>
<tool>memcheck</tool>

<args>
<vargv>
<exe>/usr/bin/valgrind</exe>
<arg>--trace-children=no</arg>
<arg>--child-silent-after-fork=yes</arg>
<arg>--num-callers=50</arg>
<arg>--suppressions=/home/ubuntu/cephtest/valgrind.supp</arg>
<arg>--xml=yes</arg>
<arg>--xml-file=/var/log/ceph/valgrind/client.0.log</arg>
<arg>--time-stamp=yes</arg>
<arg>--tool=memcheck</arg>
</vargv>
<argv>
<exe>radosgw</exe>
<arg>--rgw-frontends</arg>
<arg>civetweb port=7280</arg>
<arg>--rgw-zone</arg>
<arg>r0z1</arg>
<arg>-n</arg>
<arg>client.0</arg>
<arg>-k</arg>
<arg>/etc/ceph/ceph.client.0.keyring</arg>
<arg>--log-file</arg>
<arg>/var/log/ceph/rgw.client.0.log</arg>
<arg>--rgw_ops_log_socket_path</arg>
<arg>/home/ubuntu/cephtest/rgw.opslog.client.0.sock</arg>
<arg>--foreground</arg>
</argv>
</args>

<status>
<state>RUNNING</state>
<time>00:00:00:01.412 </time>
</status>

<error>
<unique>0x1</unique>
<tid>90</tid>
<threadname>civetweb-worker</threadname>
<kind>InvalidRead</kind>
<what>Invalid read of size 4</what>
<stack>
<frame>
<ip>0x43F935</ip>
<obj>/usr/bin/radosgw</obj>
<fn>RGWRados::get_obj_iterate_cb(RGWObjectCtx*, RGWObjState*, rgw_obj&, long, long, long, bool, void*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_rados.cc</file>
<line>9890</line>
</frame>
<frame>
<ip>0x43FF2D</ip>
<obj>/usr/bin/radosgw</obj>
<fn>_get_obj_iterate_cb(rgw_obj&, long, long, long, bool, RGWObjState*, void*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_rados.cc</file>
<line>9749</line>
</frame>
<frame>
<ip>0x442E40</ip>
<obj>/usr/bin/radosgw</obj>
<fn>RGWRados::iterate_obj(RGWObjectCtx&, rgw_obj&, long, long, unsigned long, int ()(rgw_obj&, long, long, long, bool, RGWObjState, void*), void*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_rados.cc</file>
<line>9998</line>
</frame>
<frame>
<ip>0x44324C</ip>
<obj>/usr/bin/radosgw</obj>
<fn>RGWRados::Object::Read::iterate(long, long, RGWGetDataCB*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_rados.cc</file>
<line>9929</line>
</frame>
<frame>
<ip>0x3ECA8B</ip>
<obj>/usr/bin/radosgw</obj>
<fn>RGWGetObj::execute()</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_op.cc</file>
<line>1464</line>
</frame>
<frame>
<ip>0x40B031</ip>
<obj>/usr/bin/radosgw</obj>
<fn>rgw_process_authenticated(RGWHandler_REST*, RGWOp*&, RGWRequest*, req_state*, bool)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_process.cc</file>
<line>104</line>
</frame>
<frame>
<ip>0x40C1A7</ip>
<obj>/usr/bin/radosgw</obj>
<fn>process_request(RGWRados*, RGWREST*, RGWRequest*, std::string const&, RGWRestfulIO*, OpsLogSocket*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_process.cc</file>
<line>198</line>
</frame>
<frame>
<ip>0x32A0F5</ip>
<obj>/usr/bin/radosgw</obj>
<fn>RGWCivetWebFrontend::process(mg_connection*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_civetweb_frontend.cc</file>
<line>35</line>
</frame>
<frame>
<ip>0x358F7E</ip>
<obj>/usr/bin/radosgw</obj>
<fn>handle_request</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/civetweb/src</dir>
<file>civetweb.c</file>
<line>9676</line>
</frame>
<frame>
<ip>0x35A9B8</ip>
<obj>/usr/bin/radosgw</obj>
<fn>process_new_connection</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/civetweb/src</dir>
<file>civetweb.c</file>
<line>11917</line>
</frame>
<frame>
<ip>0x35A9B8</ip>
<obj>/usr/bin/radosgw</obj>
<fn>worker_thread_run</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/civetweb/src</dir>
<file>civetweb.c</file>
<line>12084</line>
</frame>
<frame>
<ip>0x35A9B8</ip>
<obj>/usr/bin/radosgw</obj>
<fn>worker_thread</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/civetweb/src</dir>
<file>civetweb.c</file>
<line>12121</line>
</frame>
<frame>
<ip>0x13C9BDC4</ip>
<obj>/usr/lib64/libpthread-2.17.so</obj>
<fn>start_thread</fn>
</frame>
<frame>
<ip>0x15473CEC</ip>
<obj>/usr/lib64/libc-2.17.so</obj>
<fn>clone</fn>
</frame>
</stack>
<auxwhat>Address 0x77171630 is 64 bytes inside a block of size 128 free'd</auxwhat>
<stack>
<frame>
<ip>0x98A3131</ip>
<obj>/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
<fn>operator delete(void*)</fn>
</frame>
<frame>
<ip>0x422A04</ip>
<obj>/usr/bin/radosgw</obj>
<fn>deallocate</fn>
<dir>/usr/include/c++/4.8.2/ext</dir>
<file>new_allocator.h</file>
<line>110</line>
</frame>
<frame>
<ip>0x422A04</ip>
<obj>/usr/bin/radosgw</obj>
<fn>_M_put_node</fn>
<dir>/usr/include/c++/4.8.2/bits</dir>
<file>stl_tree.h</file>
<line>374</line>
</frame>
<frame>
<ip>0x422A04</ip>
<obj>/usr/bin/radosgw</obj>
<fn>_M_destroy_node</fn>
<dir>/usr/include/c++/4.8.2/bits</dir>
<file>stl_tree.h</file>
<line>422</line>
</frame>
<frame>
<ip>0x422A04</ip>
<obj>/usr/bin/radosgw</obj>
<fn>_M_erase_aux</fn>
<dir>/usr/include/c++/4.8.2/bits</dir>
<file>stl_tree.h</file>
<line>1746</line>
</frame>
<frame>
<ip>0x422A04</ip>
<obj>/usr/bin/radosgw</obj>
<fn>erase</fn>
<dir>/usr/include/c++/4.8.2/bits</dir>
<file>stl_tree.h</file>
<line>820</line>
</frame>
<frame>
<ip>0x422A04</ip>
<obj>/usr/bin/radosgw</obj>
<fn>erase</fn>
<dir>/usr/include/c++/4.8.2/bits</dir>
<file>stl_map.h</file>
<line>697</line>
</frame>
<frame>
<ip>0x422A04</ip>
<obj>/usr/bin/radosgw</obj>
<fn>get_complete_ios</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_rados.cc</file>
<line>9738</line>
</frame>
<frame>
<ip>0x422A04</ip>
<obj>/usr/bin/radosgw</obj>
<fn>RGWRados::get_obj_aio_completion_cb(void*, void*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_rados.cc</file>
<line>9788</line>
</frame>
<frame>
<ip>0x9B6CB3C</ip>
<obj>/usr/lib64/librados.so.2.0.0</obj>
<fn>librados::C_AioSafe::finish(int)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/librados</dir>
<file>AioCompletionImpl.h</file>
<line>204</line>
</frame>
<frame>
<ip>0x32DD58</ip>
<obj>/usr/bin/radosgw</obj>
<fn>Context::complete(int)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/include</dir>
<file>Context.h</file>
<line>70</line>
</frame>
<frame>
<ip>0x639D85</ip>
<obj>/usr/bin/radosgw</obj>
<fn>Finisher::finisher_thread_entry()</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/common</dir>
<file>Finisher.cc</file>
<line>69</line>
</frame>
<frame>
<ip>0x13C9BDC4</ip>
<obj>/usr/lib64/libpthread-2.17.so</obj>
<fn>start_thread</fn>
</frame>
<frame>
<ip>0x15473CEC</ip>
<obj>/usr/lib64/libc-2.17.so</obj>
<fn>clone</fn>
</frame>
</stack>
</error>

<status>
<state>FINISHED</state>
<time>00:00:37:44.021 </time>
</status>

<error>
<unique>0x1f</unique>
<tid>1</tid>
<kind>Leak_PossiblyLost</kind>
<xwhat>
<text>28 bytes in 1 blocks are possibly lost in loss record 30 of 78</text>
<leakedbytes>28</leakedbytes>
<leakedblocks>1</leakedblocks>
</xwhat>
<stack>
<frame>
<ip>0x98A2105</ip>
<obj>/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
<fn>operator new(unsigned long)</fn>
</frame>
<frame>
<ip>0x14C1AC68</ip>
<obj>/usr/lib64/libstdc++.so.6.0.19</obj>
<fn>std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&)</fn>
</frame>
<frame>
<ip>0x346930</ip>
<obj>/usr/bin/radosgw</obj>
<fn>char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag)</fn>
<dir>/usr/include/c++/4.8.2/bits</dir>
<file>basic_string.tcc</file>
<line>138</line>
</frame>
<frame>
<ip>0x14C1C957</ip>
<obj>/usr/lib64/libstdc++.so.6.0.19</obj>
<fn>std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)</fn>
</frame>
<frame>
<ip>0x666650</ip>
<obj>/usr/bin/radosgw</obj>
<fn>md_config_t::md_config_t()</fn>
</frame>
<frame>
<ip>0x64B2C8</ip>
<obj>/usr/bin/radosgw</obj>
<fn>CephContext::CephContext(unsigned int, int)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/common</dir>
<file>ceph_context.cc</file>
<line>521</line>
</frame>
<frame>
<ip>0x6460B3</ip>
<obj>/usr/bin/radosgw</obj>
<fn>common_preinit(CephInitParameters const&, code_environment_t, int, char const*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/common</dir>
<file>common_init.cc</file>
<line>46</line>
</frame>
<frame>
<ip>0x608FE1</ip>
<obj>/usr/bin/radosgw</obj>
<fn>global_pre_init(std::vector<char const*, std::allocator<char const*> >*, std::vector<char const*, std::allocator<char const*> >&, unsigned int, code_environment_t, int, char const*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/global</dir>
<file>global_init.cc</file>
<line>93</line>
</frame>
<frame>
<ip>0x3104C6</ip>
<obj>/usr/bin/radosgw</obj>
<fn>main</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_main.cc</file>
<line>221</line>
</frame>
</stack>
</error>

<error>
<unique>0x2a</unique>
<tid>1</tid>
<kind>Leak_PossiblyLost</kind>
<xwhat>
<text>51 bytes in 1 blocks are possibly lost in loss record 41 of 78</text>
<leakedbytes>51</leakedbytes>
<leakedblocks>1</leakedblocks>
</xwhat>
<stack>
<frame>
<ip>0x98A2105</ip>
<obj>/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
<fn>operator new(unsigned long)</fn>
</frame>
<frame>
<ip>0x14C1AC68</ip>
<obj>/usr/lib64/libstdc++.so.6.0.19</obj>
<fn>std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&)</fn>
</frame>
<frame>
<ip>0x346930</ip>
<obj>/usr/bin/radosgw</obj>
<fn>char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag)</fn>
<dir>/usr/include/c++/4.8.2/bits</dir>
<file>basic_string.tcc</file>
<line>138</line>
</frame>
<frame>
<ip>0x14C1C957</ip>
<obj>/usr/lib64/libstdc++.so.6.0.19</obj>
<fn>std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)</fn>
</frame>
<frame>
<ip>0x66660E</ip>
<obj>/usr/bin/radosgw</obj>
<fn>md_config_t::md_config_t()</fn>
</frame>
<frame>
<ip>0x64B2C8</ip>
<obj>/usr/bin/radosgw</obj>
<fn>CephContext::CephContext(unsigned int, int)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/common</dir>
<file>ceph_context.cc</file>
<line>521</line>
</frame>
<frame>
<ip>0x6460B3</ip>
<obj>/usr/bin/radosgw</obj>
<fn>common_preinit(CephInitParameters const&, code_environment_t, int, char const*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/common</dir>
<file>common_init.cc</file>
<line>46</line>
</frame>
<frame>
<ip>0x608FE1</ip>
<obj>/usr/bin/radosgw</obj>
<fn>global_pre_init(std::vector<char const*, std::allocator<char const*> >*, std::vector<char const*, std::allocator<char const*> >&, unsigned int, code_environment_t, int, char const*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/global</dir>
<file>global_init.cc</file>
<line>93</line>
</frame>
<frame>
<ip>0x3104C6</ip>
<obj>/usr/bin/radosgw</obj>
<fn>main</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_main.cc</file>
<line>221</line>
</frame>
</stack>
</error>

<error>
<unique>0x2b</unique>
<tid>1</tid>
<kind>Leak_PossiblyLost</kind>
<xwhat>
<text>61 bytes in 1 blocks are possibly lost in loss record 42 of 78</text>
<leakedbytes>61</leakedbytes>
<leakedblocks>1</leakedblocks>
</xwhat>
<stack>
<frame>
<ip>0x98A2105</ip>
<obj>/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
<fn>operator new(unsigned long)</fn>
</frame>
<frame>
<ip>0x14C1AC68</ip>
<obj>/usr/lib64/libstdc++.so.6.0.19</obj>
<fn>std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&)</fn>
</frame>
<frame>
<ip>0x346930</ip>
<obj>/usr/bin/radosgw</obj>
<fn>char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag)</fn>
<dir>/usr/include/c++/4.8.2/bits</dir>
<file>basic_string.tcc</file>
<line>138</line>
</frame>
<frame>
<ip>0x14C1C957</ip>
<obj>/usr/lib64/libstdc++.so.6.0.19</obj>
<fn>std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)</fn>
</frame>
<frame>
<ip>0x666624</ip>
<obj>/usr/bin/radosgw</obj>
<fn>md_config_t::md_config_t()</fn>
</frame>
<frame>
<ip>0x64B2C8</ip>
<obj>/usr/bin/radosgw</obj>
<fn>CephContext::CephContext(unsigned int, int)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/common</dir>
<file>ceph_context.cc</file>
<line>521</line>
</frame>
<frame>
<ip>0x6460B3</ip>
<obj>/usr/bin/radosgw</obj>
<fn>common_preinit(CephInitParameters const&, code_environment_t, int, char const*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/common</dir>
<file>common_init.cc</file>
<line>46</line>
</frame>
<frame>
<ip>0x608FE1</ip>
<obj>/usr/bin/radosgw</obj>
<fn>global_pre_init(std::vector<char const*, std::allocator<char const*> >*, std::vector<char const*, std::allocator<char const*> >&, unsigned int, code_environment_t, int, char const*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/global</dir>
<file>global_init.cc</file>
<line>93</line>
</frame>
<frame>
<ip>0x3104C6</ip>
<obj>/usr/bin/radosgw</obj>
<fn>main</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_main.cc</file>
<line>221</line>
</frame>
</stack>
</error>

<error>
<unique>0x2c</unique>
<tid>1</tid>
<kind>Leak_PossiblyLost</kind>
<xwhat>
<text>63 bytes in 1 blocks are possibly lost in loss record 43 of 78</text>
<leakedbytes>63</leakedbytes>
<leakedblocks>1</leakedblocks>
</xwhat>
<stack>
<frame>
<ip>0x98A2105</ip>
<obj>/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so</obj>
<fn>operator new(unsigned long)</fn>
</frame>
<frame>
<ip>0x14C1AC68</ip>
<obj>/usr/lib64/libstdc++.so.6.0.19</obj>
<fn>std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&)</fn>
</frame>
<frame>
<ip>0x346930</ip>
<obj>/usr/bin/radosgw</obj>
<fn>char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag)</fn>
<dir>/usr/include/c++/4.8.2/bits</dir>
<file>basic_string.tcc</file>
<line>138</line>
</frame>
<frame>
<ip>0x14C1C957</ip>
<obj>/usr/lib64/libstdc++.so.6.0.19</obj>
<fn>std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)</fn>
</frame>
<frame>
<ip>0x66663A</ip>
<obj>/usr/bin/radosgw</obj>
<fn>md_config_t::md_config_t()</fn>
</frame>
<frame>
<ip>0x64B2C8</ip>
<obj>/usr/bin/radosgw</obj>
<fn>CephContext::CephContext(unsigned int, int)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/common</dir>
<file>ceph_context.cc</file>
<line>521</line>
</frame>
<frame>
<ip>0x6460B3</ip>
<obj>/usr/bin/radosgw</obj>
<fn>common_preinit(CephInitParameters const&, code_environment_t, int, char const*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/common</dir>
<file>common_init.cc</file>
<line>46</line>
</frame>
<frame>
<ip>0x608FE1</ip>
<obj>/usr/bin/radosgw</obj>
<fn>global_pre_init(std::vector<char const*, std::allocator<char const*> >*, std::vector<char const*, std::allocator<char const*> >&, unsigned int, code_environment_t, int, char const*)</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/global</dir>
<file>global_init.cc</file>
<line>93</line>
</frame>
<frame>
<ip>0x3104C6</ip>
<obj>/usr/bin/radosgw</obj>
<fn>main</fn>
<dir>/usr/src/debug/ceph-11.0.2/src/rgw</dir>
<file>rgw_main.cc</file>
<line>221</line>
</frame>
</stack>
</error>

<errorcounts>
<pair>
<count>1</count>
<unique>0x1</unique>
</pair>
</errorcounts>

<suppcounts>
<pair>
<count>63</count>
<name>ignore libnss3 leaks</name>
</pair>
<pair>
<count>1</count>
<name>ignore libfcgi leak; OS_LibShutdown has no callers!</name>
</pair>
<pair>
<count>1</count>
<name>glibc-2.5.x-on-SUSE-10.2-(PPC)-2a</name>
</pair>
</suppcounts>

</valgrindoutput>


Related issues 1 (0 open1 closed)

Copied to rgw - Backport #18569: jewel: radosgw valgrind "invalid read size 4" RGWGetObjResolvedAlexey SheplyakovActions
Actions #1

Updated by Sage Weil over 7 years ago

  • Priority changed from High to Immediate
Actions #2

Updated by Yehuda Sadeh over 7 years ago

  • Status changed from New to Pending Backport
Actions #3

Updated by Nathan Cutler over 7 years ago

  • Backport set to jewel
Actions #4

Updated by Nathan Cutler over 7 years ago

  • Copied to Backport #18569: jewel: radosgw valgrind "invalid read size 4" RGWGetObj added
Actions #6

Updated by Nathan Cutler about 7 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF