# # All file and line numbers from debug build using commit 60e6f5f67c5bc2a8fb26e8f2ef76c169c5b78813 # # See # See # # direct_bt::LFRingbuffer::* utilizes SC-DRF atomic acquire (read) and release (write) # not detected by helgrind. See unit test test_mm_sc_drf (passed). # # ==1175024== ---Thread-Announcement------------------------------------------ # ==1175024== Thread #2 was created # ==1175024== by 0x49434C1: direct_bt::DBTManager::DBTManager(direct_bt::BTMode) (DBTManager.cpp:333) # ==1175024== Thread #2: Bug in libpthread: write lock granted on mutex/rwlock which is currently wr-held by a different thread # ==1175024== by 0x13283A: _ZN9jau10ringbufferISt10shared_ptrINS_9MgmtEventEELDnEE7putImplERKS3_bbi (LFRingbuffer.hpp:240) # (see below: cpp_unique_lock_cond_wait_002) { jau_ringbuffer_lock_and_wait_001 Helgrind:Misc fun:mutex_lock_WRK ... fun:*jau*ringbuffer*putImpl* ... obj:*libcipherpack_bt.so* } # direct_bt::LFRingbuffer::* utilizes SC-DRF atomic acquire (read) and release (write) # not detected by helgrind. See uni test test_mm_sc_drf (passed). # # ==1175024== Thread #1 is the program's root thread # ==1175024== Thread #2 unlocked lock at 0x13F628 currently held by thread #1 # ==1175024== by 0x132913: _ZN9jau10ringbufferISt10shared_ptrINS_9MgmtEventEELDnEE7putImplERKS3_bbi (LFRingbuffer.hpp:240) # { # 240 std::unique_lock lockRead(syncRead); // SC-DRF w/ getImpl via same lock # size++; # writePos = localWritePos; // SC-DRF release atomic writePos # cvRead.notify_all(); // notify waiting getter # } # ==1175024== Lock at 0x13F628 was first observed # ==1175024== by 0x131EDC: _ZN9jau10ringbufferISt10shared_ptrINS_9MgmtEventEELDnEE7getImplEbbi (LFRingbuffer.hpp:181) # if( blocking ) { # 181 std::unique_lock lockRead(syncRead); // SC-DRF w/ putImpl via same lock # while( localReadPos == writePos ) { # .. # cvRead.wait(lockRead); or cvRead.wait_until(lockRead, ..); # } # } { jau_ringbuffer_lock_and_wait_002 Helgrind:UnlockForeign fun:mutex_unlock_WRK ... fun:*jau*ringbuffer*putImpl* ... obj:*libcipherpack_bt.so* } # # direct_bt::LFRingbuffer::* utilizes SC-DRF atomic acquire (read) and release (write) # not detected by helgrind. See uni test test_mm_sc_drf (passed). # # ==1175024== Possible data race during read of size 8 at 0x4F490E8 by thread #1 # ==1175024== Locks held: 3, at addresses 0x13F480 0x13F650 0x13F7B0 # ==1175024== at 0x131D90: std::__shared_ptr::__shared_ptr(std::__shared_ptr const&) (shared_ptr_base.h:1181) # ==1175024== by 0x131DDA: std::shared_ptr::shared_ptr(std::shared_ptr const&) (shared_ptr.h:149) # ==1175024== by 0x1320B0: _ZN9jau10ringbufferISt10shared_ptrINS_9MgmtEventEELDnEE7getImplEbbi (LFRingbuffer.hpp:198) # # ==1175024== This conflicts with a previous write of size 8 by thread #2 # ==1175024== Locks held: 1, at address 0x13F6A0 # ==1175024== at 0x130E6D: std::__shared_ptr::operator=(std::__shared_ptr const&) (shared_ptr_base.h:1182) # ==1175024== by 0x130EB4: std::shared_ptr::operator=(std::shared_ptr const&) (shared_ptr.h:358) # ==1175024== by 0x13281D: _ZN9jau10ringbufferISt10shared_ptrINS_9MgmtEventEELDnEE7putImplERKS3_bbi (LFRingbuffer.hpp:237) { jau_ringbuffer_sc_drf_atomic_001 Helgrind:Race ... fun:*jau*ringbuffer*getImpl* ... obj:*libcipherpack_bt.so* } # # DRD # { jau_ringbuffer_lock_and_wait_001 drd:CondErr ... fun:*jau*ringbuffer*putImpl* ... } { jau_ringbuffer_lock_and_wait_002 drd:MutexErr ... fun:*jau*ringbuffer*putImpl* ... } { jau_ringbuffer_lock_and_wait_002 drd:CondErr ... fun:_ZN9jau10ringbufferISt10shared_ptrIKNS_9AttPDUMsgEELDnEED1Ev ... } { jau_ringbuffer_lock_and_wait_021 drd:MutexErr ... fun:_ZNSt15_Sp_counted_ptrIPN9direct_bt11GATTHandlerELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv ... } { jau_ringbuffer_lock_and_wait_031 drd:CondErr ... fun:_ZN9jau10ringbufferISt10shared_ptrINS_8HCIEventEELDnEED1Ev ... } { jau_ringbuffer_lock_and_wait_031 drd:CondErr ... fun:_ZN9jau10ringbufferISt10shared_ptrINS_9MgmtEventEELDnEED1Ev ... } { jau_ringbuffer_lock_and_wait_032 drd:MutexErr ... fun:_ZNSt15_Sp_counted_ptrIPN9direct_bt10HCIHandlerELN9__gnu_cxx12_Lock_policyE2EE10_M_disposeEv ... } { jau_ringbuffer_sc_drf_atomic_001 drd:MutexErr ... fun:*jau*ringbuffer*getImpl* ... } { jau_ringbuffer_sc_drf_atomic_001 drd:ConflictingAccess ... fun:*jau*ringbuffer*getImpl* ... } { jau_cow_vector_sc_drf_atomic_041 drd:ConflictingAccess ... fun:*jau*cow_vector* ... } { jau_cow_vector_sc_drf_atomic_043 drd:ConflictingAccess ... fun:*jau*FunctionDef*shared_ptr* ... } { jau_check2_01 Memcheck:Cond ... fun:*Catch*RunContext* ... } # # Memcheck:Leak # { cipherpack_curl01 Memcheck:Leak match-leak-kinds: reachable fun:calloc ... obj:/usr/lib/x86_64-linux-gnu/libgnutls.so.30.29.1 ... fun:_dl_init ... } { cipherpack_curl02 Memcheck:Leak match-leak-kinds: reachable fun:malloc ... obj:/usr/lib/x86_64-linux-gnu/libgnutls.so.30.29.1 ... fun:_dl_init ... } { cipherpack_curl03 Memcheck:Leak match-leak-kinds: reachable fun:malloc ... obj:/usr/lib/x86_64-linux-gnu/libgcrypt.so.20.2.8 ... fun:libssh2_init ... fun:_ZN10cipherpack11environmentC1Ev ... }