| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
To avoid resource exhaustion on 32-bit platforms.
|
| | | |
|
| | |
| |
| |
| | |
Avoid quoted enabled and disabled because it's a bool type instead of char *.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
Allow setting the safety check abort hook through mallctl, which avoids abort()
and core dumps.
|
| | |
| |
| |
| | |
Signed-off-by: cuishuang <imcusg@gmail.com>
|
| | |
| |
| |
| |
| | |
With realloc(ptr, 0) being UB per C23, the option name "strict" makes less sense
now. Rename to "alloc" which describes the behavior.
|
| | | |
|
| | |
| |
| |
| |
| | |
In test/integration/rallocx, full usable size is checked which may confuse
overflow detection.
|
| | |
| |
| |
| |
| | |
Sorting jobs by descending expected runtime helps to utilize concurrency
better.
|
| | | |
|
| | |
| |
| |
| |
| | |
Implement the generation of Travis jobs for FreeBSD. The generated jobs
replicate the existing CirrusCI config.
|
| | |
| |
| |
| |
| |
| | |
Default SEC max_alloc option value was 32k, disabling SEC for platforms with
lg-page=16. This change enables SEC for all platforms, making minimum max_alloc
value equal to PAGE.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Due to a bug in sec initialization, the number of cached size classes
was equal to 198. The bug caused the creation of more than a hundred of
unused bins, although it didn't affect the caching logic.
|
| | |
| |
| |
| |
| | |
When cross-compile for M1 and no page size specified, use the default 16K and
skip detecting the page size (which is likely incorrect).
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this commit, in case FreeBSD libc jemalloc was overridden by another
jemalloc, proper thread shutdown callback was involved only for the overriding
jemalloc. A call to _malloc_thread_cleanup from libthr would be redirected to
user jemalloc, leaving data about dead threads hanging in system jemalloc. This
change tackles the issue in two ways. First, for current and old system
jemallocs, which we can not modify, the overriding jemalloc would locate and
invoke system cleanup routine. For upcoming jemalloc integrations, the cleanup
registering function will also be redirected to user jemalloc, which means that
system jemalloc's cleanup routine will be registered in user's jemalloc and a
single call to _malloc_thread_cleanup will be sufficient to invoke both
callbacks.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is possible that ndalloc will be updated before nmalloc, in
arena_large_ralloc_stats_update(), fix this by reorder those calls.
It was found by ClickHouse CI, that periodically hits this assertion [1].
[1]: https://github.com/ClickHouse/ClickHouse/issues/31531
That issue contains lots of examples, with core dump and some gdb output [2].
[2]: https://s3.amazonaws.com/clickhouse-test-reports/34951/96390a9263cb5af3d6e42a84988239c9ae87ce32/stress_test__debug__actions_.html
Here you can find binaries for that particular report [3] you need
clickhouse debug build [4].
[3]: https://s3.amazonaws.com/clickhouse-builds/34951/96390a9263cb5af3d6e42a84988239c9ae87ce32/clickhouse_build_check_(actions)/report.html
[4]: https://s3.amazonaws.com/clickhouse-builds/34951/96390a9263cb5af3d6e42a84988239c9ae87ce32/package_debug/clickhouse
Brief info from that report:
2 0x000000002ad6dbfe in arena_stats_merge (tsdn=0x7f2399abdd20, arena=0x7f241ce01080, nthreads=0x7f24e4360958, dss=0x7f24e4360960, dirty_decay_ms=0x7f24e4360968, muzzy_decay_ms=0x7f24e4360970, nactive=0x7f24e4360978, ndirty=0x7f24e43
e4360988, astats=0x7f24e4360998, bstats=0x7f24e4363310, lstats=0x7f24e4364990, estats=0x7f24e4366e50, hpastats=0x7f24e43693a0, secstats=0x7f24e436a020) at ../contrib/jemalloc/src/arena.c:138
ndalloc = 226
nflush = 0
curlextents = 0
nmalloc = 225
nrequests = 0
Here you can see that they differs only by 1.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While calculating the number of stashed pointers, multiple variables
potentially modified by a concurrent thread were used for the
calculation. This led to some inconsistencies, correctly detected by
the assertions. The change eliminates some possible inconsistencies by
using unmodified variables and only once a concurrently modified one.
The assertions are omitted for the cases where we acknowledge potential
inconsistencies too.
|
| | |
| |
| |
| |
| | |
When cross-compile, the host type / abi should be checked to determine
background thread compatibility.
|
| | |
| |
| |
| | |
Update INSTALL.md, reflecting the addition of 'uninstall' target.
|
| | | |
|
| | |
| |
| |
| | |
Currently only prof_leak_error and prof_final are checked.
|
| | |
| |
| |
| |
| | |
Otherwise, prof_leak may get set after prof_leak_error, and disagree with each
other.
|
| | |
| |
| |
| |
| |
| | |
These jobs take about 20 minutes to complete. We don't want to enable
them until we switch to unlimited concurrency plan, otherwise the builds
will take way too long.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement the generation of Travis jobs for Windows. Currently, the
generated jobs replicate Appveyor setup and complete successfully. There
is support for MinGW GCC and MSVC compilers as well as 64 and 32 bit
compilation. Linux and MacOS jobs behave identically, but some
environment variables change - CROSS_COMPILE_32BIT=yes is added for
builds with cross compilation, empty COMPILER_FLAGS are not set anymore.
|
| | |
| |
| |
| |
| |
| | |
The option makes the process to exit with error code 1 if a memory leak
is detected. This is useful for implementing automated tools that rely
on leak detection.
|
| | |
| |
| |
| |
| | |
Spaces in these are also not handled correctly by Make, so there's sense
in not allowing that.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
To avoid potential issues with removing unintended files after 'make
uninstall', spaces are no longer allowed in install suffix. It's worth
mentioning, that with GNU Make on Linux spaces in install suffix didn't
work anyway, leading to errors in the Makefile. But being verbose
about this restriction makes it more transparent for the developers.
|
| | | |
|
| | |
| |
| |
| |
| | |
It's not necessary to manually echo all install commands, similar effect
is achieved via 'install -v'
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
This makes debugging slightly easier and avoids the confusion of "should we
create new arenas" here.
|
| | |
| |
| |
| |
| | |
This takes a fair amount of resources. Under high concurrency it was causing
resource exhaustion such as pthread_create and mmap failures.
|
| | |
| |
| |
| |
| |
| | |
With DSS as primary, the default merge impl will (correctly) decline to merge
when one of the extent is non-dss. The error path should tolerate the
not-merged extent being in a merging state.
|
| | |
| |
| |
| | |
nothrow" fix since it also has jemalloc in the base system
|
| | |
| |
| |
| | |
isb introduces a small delay which is closer to the x86 pause instruction.
|
| | |
| |
| |
| |
| |
| | |
Under high concurrency / heavy test load (e.g. using run_tests.sh), the
background thread may not get scheduled for a longer period of time. Retry 100
times max before bailing out.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
`__libc` prefixed functions are used by musl libc as non-replaceable malloc stubs.
Fix this conflict by checking if we are linking against glibc.
|
| | | |
|
| | | |
|