Fix tests that relies on checking stack size under TSan#30579
Merged
alexey-milovidov merged 1 commit intoClickHouse:masterfrom Oct 24, 2021
Merged
Fix tests that relies on checking stack size under TSan#30579alexey-milovidov merged 1 commit intoClickHouse:masterfrom
alexey-milovidov merged 1 commit intoClickHouse:masterfrom
Conversation
Under TSan using too much stack requires too much RSS for shadow memory, and neither of this TSAN_OPTIONS helps: - history_size=2 - flush_memory_ms=2000 - memory_limit_mb=50000 So instead, decrease allowed limit of the stack size in checkStackSize() under TSan, to address exessive memory usage for the server compiled with TSan. Note, that before this patch 01763_max_distributed_depth test can increase RSS of the server to 70GiB.
Member
Author
Almost OK, but still uses more memory then other builds, although now memory usage is enough to pass tests on CI: |
Member
Author
All checks was almost green, but found one flaky test - DetailsWITH arrayStringConcat(arrayMap(x -> demangle(addressToSymbol(x)), trace), '\n') AS sym
SELECT
sym LIKE '%unwind%' AS key,
count()
FROM system.trace_log
WHERE query_id = '1affe981-7455-4959-babb-350ab7b19a42'
GROUP BY key
ORDER BY count() ASC
SETTINGS allow_introspection_functions = 1
Query id: 8b2a21a6-a28a-4365-9975-55b1f7c957ca
Row 1:
──────
key: 1
count(): 45
Row 2:
──────
key: 0
count(): 72Example: sym: libunwind::CFI_Parser<libunwind::LocalAddressSpace>::parseCIE(libunwind::LocalAddressSpace&, unsigned long, libunwind::CFI_Parser<libunwind::LocalAddressSpace>::CIE_Info*)
libunwind::CFI_Parser<libunwind::LocalAddressSpace>::findFDE(libunwind::LocalAddressSpace&, unsigned long, unsigned long, unsigned int, unsigned long, libunwind::CFI_Parser<libunwind
::LocalAddressSpace>::FDE_Info*, libunwind::CFI_Parser<libunwind::LocalAddressSpace>::CIE_Info*)
libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::getInfoFromDwarfSection(unsigned long, libunwind::UnwindInfoSections const&, unsigned int)
libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::setInfoBasedOnIPRegister(bool)
libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step()
__unw_step
unw_backtrace
StackTrace::tryCapture()
StackTrace::StackTrace()
MemoryTracker::allocImpl(long, bool)Let's see at the rate of failures... (for the past month it fails only 3 times) |
alexey-milovidov
approved these changes
Oct 23, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Under TSan using too much stack requires too much RSS for shadow memory,
and neither of this TSAN_OPTIONS helps:
history_size=2flush_memory_ms=2000memory_limit_mb=50000So instead, change allowed limit of the stack size in checkStackSize(),
to address exessive memory usage for the server compiled with TSan.
Note, that before this patch 01763_max_distributed_depth test can
increase RSS of the server to 70GiB.
Supersedes #30009
NOTE: marked as draft for now, since I want to check logs of TSan server, but it should be OK with this patch