cameron314 / concurrentqueue

A fast multi-producer, multi-consumer lock-free concurrent queue for C++11
Other
9.53k stars 1.66k forks source link

unexpected core dump #297

Closed skypexu closed 2 years ago

skypexu commented 2 years ago

=2650260==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60c000010ae8 at pc 0x558157f2a204 bp 0x7f7321acbba0 sp 0x7f7321acbb98
READ of size 8 at 0x60c000010ae8 thread T9

0 0x558157f2a203 in moodycamel::details::ThreadExitNotifier::~ThreadExitNotifier() /home/yfxu/github/PolarDB-FileSystem/src/common/concurrentqueue.h:608

#1 0x7f733f63151e in __call_tls_dtors (/lib/x86_64-linux-gnu/libc.so.6+0x3a51e)                                                                                                                        
#2 0x7f733fe1ffb0 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7fb0)                                                                                                                       
#3 0x7f733f6f04ce in clone (/lib/x86_64-linux-gnu/libc.so.6+0xf94ce)                            
cameron314 commented 2 years ago

Steps to reproduce?

skypexu commented 2 years ago

It is an internal project, however, I am using spdk and dpdk, is it possible that there is incompatible issue ?

cameron314 commented 2 years ago

Is this with the latest code? I fixed a use-after-free bug in https://github.com/cameron314/concurrentqueue/commit/3e72a150ac1f560ac5a21df2def1aae3e8e45b66 a couple months ago; the old code lines up with your error line number.

skypexu commented 2 years ago

Is this with the latest code? I fixed a use-after-free bug in 3e72a15 a couple months ago; the old code lines up with your error line number.

I have tried it , it seems the problem went away. I think the PR can be closed. Thanks,