https://bugs.kde.org/show_bug.cgi?id=444488
Bug ID: 444488 Summary: Use glibc.pthread.stack_cache_size tunable Product: valgrind Version: unspecified Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: jsew...@acm.org Reporter: m...@klomp.org Target Milestone: --- Since glibc 2.34 the internal/private stack_cache_maxsize variable isn't available anymore, which causes "sched WARNING: pthread stack cache cannot be disabled!" when the simhint no_nptl_pthread_stackcache is set (e.g. in helgrind/tests/tls_threads.vgtest) See coregrind/pub_core_clientstate.h: /* glibc nptl pthread systems only, when no-nptl-pthread-stackcache was given in --sim-hints. Used for a (kludgy) way to disable the cache of stacks as implemented in nptl glibc. Based on internal knowledge of the pthread glibc nptl/allocatestack.c code: a huge value in stack_cache_actsize (bigger than the constant stack_cache_maxsize) makes glibc believes the cache is full and so stacks are always released when a pthread terminates. Several ugliness in this kludge: * hardcodes private glibc var name "stack_cache_maxsize" * based on knowledge of the code of the functions queue_stack and __free_stacks * static symbol for "stack_cache_maxsize" must be in the debug info. It would be much cleaner to have a documented and supported way to disable the pthread stack cache. */ extern SizeT* VG_(client__stack_cache_actsize__addr); Instead we should use the new (in glibc 2.34) tunable: @deftp Tunable glibc.pthread.stack_cache_size This tunable configures the maximum size of the stack cache. Once the stack cache exceeds this size, unused thread stacks are returned to the kernel, to bring the cache size below this limit. The value is measured in bytes. The default is @samp{41943040} (fourty mibibytes). @end deftp -- You are receiving this mail because: You are watching all bug changes.