Re: What does CHUNK_QUARANTINED mean?

2020-07-22 Thread Konstantin Serebryany
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





On Wed, Jul 22, 2020 at 2:35 PM Will Lucas  wrote:

> 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
>
> --
> 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-sanitizer+unsubscr...@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
> 
> .
>

-- 
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-sanitizer+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/address-sanitizer/CAGQ9bdy8nj7RSyOD7%2BA1TdDNscsx0EAB25ftZkFaa4RPE3QFqQ%40mail.gmail.com.


What does CHUNK_QUARANTINED mean?

2020-07-22 Thread Will Lucas
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

-- 
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-sanitizer+unsubscr...@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.