Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThreadSanitizer: huge memory consumption and unnecessary sleep #1802

Open
ArtemNosenko opened this issue Oct 2, 2024 · 0 comments
Open

ThreadSanitizer: huge memory consumption and unnecessary sleep #1802

ArtemNosenko opened this issue Oct 2, 2024 · 0 comments

Comments

@ArtemNosenko
Copy link

I tries to sanitize my program's UT with Asan, UBsan, Tsan. Asan and UBsan work fine, but at some point (on two specific UTs) memory consumption starts to grow, 10-20 second pauses appears between test function calls and after 2-3 minutes my PC runs out of memory. I tried atexit_sleep_ms, flush_memory_ms, memory_limit_mb - nothing worked.
Some additional info:

Ubuntu 22.04
Ubuntu clang version 18.1.8

stack - in addition to the usual threads, new ones appeared - number 5 on the screenshot and 15 threads with identical stacks (numbers 7 - 22):
stack

memprof - after line 2377 nmap starts to grow very fast:
tsan.memprof.txt

Also tried to run my UT compiled with clang-14 - and it was much slower than clang-18, but without huge memory consumption(with vm.mmap_rnd_bits=28 and randomize_va_space=0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant