Memory leaks detector report:
...
==117947== 11,725 (200 direct, 11,525 indirect) bytes in 25 blocks are definitely lost in loss
record 82 of 82
==117947== at 0x4A075BC: operator new(unsigned long) (vg_replace_malloc.c:298)
==117947== by 0x687CC1: RGWGC::process(int, int) (in /usr/bin/radosgw)
==117947== by 0x6884D1: RGWGC::process() (in /usr/bin/radosgw)
==117947== by 0x68875C: RGWGC::GCWorker::entry() (in /usr/bin/radosgw)
==117947== by 0x55F890A: Thread::_entry_func(void*) (in /usr/lib64/librados.so.2.0.0)
==117947== by 0x34D46079D0: start_thread (in /lib64/libpthread-2.12.so)
==117947== by 0x34D42E8B6C: clone (in /lib64/libc-2.12.so)
...
Signed-off-by: Andrey Kuznetsov <Andrey_Kuznetsov@epam.com>
Memory leaks detector report:
$ valgrind --leak-check=full /usr/bin/radosgw -c /etc/ceph/ceph.conf -n
client.radosgw.gateway -f
...
=16986== 1,262 (48 direct, 1,214 indirect) bytes in 1 blocks are definitely lost in loss record 81
of 83
==16986== at 0x4A075BC: operator new(unsigned long) (vg_replace_malloc.c:298)
==16986== by 0x618F0D: RGWRados::init_complete() (in /usr/bin/radosgw)
==16986== by 0x618FE6: RGWRados::initialize() (in /usr/bin/radosgw)
==16986== by 0x63BB23: RGWRados::initialize(CephContext*, bool) (in /usr/bin/radosgw)
==16986== by 0x634D20: RGWStoreManager::init_storage_provider(CephContext*, bool) (in
/usr/bin/radosgw)
==16986== by 0x5B8970: RGWStoreManager::get_storage(CephContext*, bool) (in /usr/bin/radosgw)
==16986== by 0x5B6D5D: main (in /usr/bin/radosgw)
...
Signed-off-by: Andrey Kuznetsov <Andrey_Kuznetsov@epam.com>
Fail if 'rbd rm' fails - most probably it'd fail with "image still has
watchers" and in that case it's a bug in the kernel client which we do
want to notice. Also nuke the trap-based error handling - cleanup() is
half-baked and not really necessary here.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Take advantage of the fact that 'rbd map' will now talk to udev and
output the device that got assigned by the kernel to the newly created
mapping. Drop the get_id() cruft, udevadm settle and chown calls.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
It is at the core of fsx to be able to reproduce the exact op sequence
that lead to a failure. Use reentrant glibc RNG functions to make sure
that nothing else has to chance to mess up the sequence.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
This is an update to take account of 9312c5e wherein
the FS_* enum was replaced by direct use of SUPER_MAGIC
macros.
Signed-off-by: John Spray <john.spray@redhat.com>
Although this is part of POSIX, it's missing on
OS X. #define it to zero in this case so that checks
for the flag will always be false.
Signed-off-by: John Spray <john.spray@redhat.com>
On linux this worked by side effect from
pthread.h, but POSIX header for pid_t is
sys/types.h -- this is needed on OS X.
Signed-off-by: John Spray <john.spray@redhat.com>
On OS X, the environment variable to override
to .libs is DYLD_LIBRARY_PATH instead of
LD_LIBRARY_PATH.
Signed-off-by: John Spray <john.spray@redhat.com>
We simply trim the roll back info up to min_last_complete_ondisk
since we cannot correctly rollback past that point anyway!
ReplicatedPG
-> PGBackend::submit_transaction
-> Backend messages
-> PGBackend::Listener::log_operation
-> append_log
Signed-off-by: Samuel Just <sam.just@inktank.com>
Fixes: #8608
Backport: dumpling, firefly
Bucket instance id is a concatenation of zone name, rados instance id,
and a running counter. We need to allocate enough space to account zone
name length.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
passing OpRequestRef, OSDMapRef by ref to avoid refcounting overhead
and in some cases passing structures by const ref.
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Use the sequence number to index log segments. Later commit will defer
encoding/submitting log events to separate thread, log events' offsets
are unknown before they are encoded.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
constructor initialization list is modified to initialize ops,oid,pgid with
copy constructor instead of assignment operator in the constructor body.
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
get_oid,get_pg,get_replay_version,get_user_version are returning by reference and
corresponding setter is accepting param by reference.
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
get_snapid(),get_snap_seq,get_pg,get_object_locator,get_version are returning
by reference and the corresponding setter is accepting the param by reference.
MOSDOp constructor is is accepting pg_t by reference now.
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
Read max 'sizeof(target) - 1' to not write out of bound
later on the 'target[r] = 0;' call in case we read the
full PATH_MAX.
CID 1128416 (#1 of 1): Out-of-bounds write (OVERRUN)
overrun-local: Overrunning array target of 4096 bytes
at byte offset 4096 using index r (which evaluates to 4096).
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1219611 (#1 - 5): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable saw_name going out of scope
leaks the storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>