What does CHUNK_QUARANTINED mean?

316 views
Skip to first unread message

Will Lucas

unread,
Jul 22, 2020, 5:35:01 PM7/22/20
to address-sanitizer
I'm new to using address sanitizer, and I've been trying to deal with what I think is a heap corruption issue. I keep getting ASan reports like below:

==43795==AddressSanitizer CHECK failed: ../../../../src/libsanitizer/asan/asan_allocator.cc:135 "((m->chunk_state)) == ((CHUNK_QUARANTINE))" (0x13, 0x3)

   #0 0x7f2961ca8bf2  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe9bf2)

   #1 0x7f2961cc7575 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x108575)

   #2 0x7f2961be9ab1  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2aab1)

   #3 0x7f2961bea443  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2b443)

   #4 0x7f2961c9d772 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde772)

   #5 0x7f295d76a718 in cv::Mat::deallocate() (/usr/local/lib/libopencv_core.so.3.4+0x18a718)

   #6 0x558a2adc8db7 in cv::Mat::release() /usr/local/include/opencv2/core/mat.inl.hpp:901

   #7 0x558a2adc8db7 in cv::Mat::~Mat() /usr/local/include/opencv2/core/mat.inl.hpp:787


I'm trying to understand what CHUNK_QUARANTINED means in order to determine next steps for debugging. Is there documentation on this type of failure, or has anyone dealt with these types of errors?

Thanks for your time!
Will

Konstantin Serebryany

unread,
Jul 22, 2020, 7:22:23 PM7/22/20
to address-sanitizer
Hi Will, 

CHUNK_QUARANTINED is an implementation detail. 
Normally, users are not expected to see any such reports. 
A CHECK failure like this are likely to happen when there is a memory corruption 
that ASAN doesn't detect and which corrupts ASAN's own internal state. 

Your report has /usr/local/lib/libopencv_core.so in it. 
Does it mean that you run uninstrumented libopencv? (or, you've installed an asan-instrumented lib into /usr/local?)
That may well explain the situation. 
You either hit a memory corruption bug in libopencv or you misuse libopencv causing it to corrupt memory on your behalf. 
The solution would be to use asan-instrumented variants for all important libraries in your process. 

hth, 
--kcc  

 



--
You received this message because you are subscribed to the Google Groups "address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to address-saniti...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/address-sanitizer/780fe7cd-6e95-40c3-9cce-63bd91c87109o%40googlegroups.com.

Will Lucas

unread,
Jul 23, 2020, 10:02:02 PM7/23/20
to address-sanitizer
Thanks for the quick reply Konstantin! That's very helpful, I'll working rebuilding my dependencies with -fsanitizer=address to try to get better coverage!

Thanks again!
To unsubscribe from this group and stop receiving emails from it, send an email to address-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages