| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
It is not well-defined to call a pthread function with a thread that
is no longer valid. Remove test and add a precondition comment to
the function that IDs must be valid.
|
| |
|
|\
| |
| |
| |
| | |
vespa-engine/vekterli/dump-stack-of-deadlocked-thread
Let deadlock detector dump stack of potentially deadlocked threads
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Enable cross-thread stack tracing as part of signal handler init
code in both storage and proton daemons.
Make deadlock detector parameters live configurable. Remove existing
`restart` config definition annotations to reflect this.
Remove dumping of bucket DB locks which hasn't really worked for a
long time now.
|
|/ |
|
|\
| |
| |
| |
| | |
vespa-engine/vekterli/add-cross-thread-stack-trace-dumping
Add support for cross-thread stack dumping to vespalib
|
| | |
|
| |
| |
| |
| | |
Name resolving does not necessarily work for static functions.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Matches the use of seq_cst for the rest of the stack dumping logic.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There's no existing API for conveniently getting the stack trace of any other thread
than your own, so we have to turn things around a bit and make the target thread
dump its own stack in a way that we can then safely access and return it.
We allow for hooking SIGUSR2 at process startup time and use this as our dedicated
stack dump signal internally. The process of stack dumping is then basically:
1. Caller sends SIGUSR2 to the target thread. This happens within a global mutex
that ensures no other callers can attempt to dump stack at the same time. This
is because we use a single, globally shared state between caller and target
(the same signal handler function is used by all threads).
2. Caller acquire-polls (with 1ms sleep) for target thread signal handler completion.
Fancy technologies such as mutexes and condition variables are not safe to use
from within a signal handler and therefore cannot be used.
3. Target thread suddenly finds itself in Narnia (signal handler). Since the
signal is the magical SIGUSR2, it proceeds to dump its stack frame addresses in
a shared buffer. It then toggles completion, with release semantics, before
returning to its regularly scheduled programming.
4. Caller exits poll-loop and assembles a complete stack trace from the frame
addresses in the shared buffer, demangled and shiny.
Signal-safe stack frame dumping currently uses Boost.Stacktrace, which is a
header-only dependency and appears to use libunwind under the hood.
|
|\ \
| | |
| | | |
- Optimize get_tensor_ref optimizing for no branches on happy path.
|
| | |
| | |
| | |
| | |
| | | |
- Also drop check for reference as that is done in the next called method.
- Inline DirectTensorStore::get_tensor.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
vespa-engine/toregge/convert-vespalib-rmdir-to-deprecated-shim
Convert vespalib::rmdir to a deprecated shim.
|
| | | | |
|
| | | | |
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
than the else branch.
This is based on experience since gcc 2.8 and til today, and is not a definitive truth. Just more likely.
if (criteria) {
most_likely_executed code
} else {
less_likely_executed code
}
While a single branched if is assumed less likely.
|
|/ / |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
more testing means uncovering more undefined behavior
|
|
|
|
|
|
| |
implementation.
Add setters to vespalib::GrowStrategy.
|
|\
| |
| |
| |
| | |
vespa-engine/balder/introduce-concept-of-minimum-capacity
- Introduce the concept of minimal capacity for rcu vectors.
|
| |
| |
| |
| |
| | |
- This is to prevent shrinking down past what has been configured in proton.documentdb[].allocation.initialnumdocs
- shrinking down past the configured value is not supported as that would counter the preallocation done to prevent resizing.
|
| | |
|
|/
|
|
|
| |
also avoids hanging/leaving processes after running all unit tests
with UBSAN without recovery.
|
| |
|
| |
|
|
|
|
| |
- Store the full config in the rcu vector.
|
|
|
|
| |
Also move some code only used by juniper up into juniper test module.
|
| |
|
|
|
|
| |
constructions.
|
|
|
|
| |
vespalib.
|
|\
| |
| |
| |
| | |
vespa-engine/toregge/add-cgroup-resource-limits-class
Add CGroupResourceLimits class.
|
| | |
|
| | |
|
|/
|
|
| |
fail as it might depending on how huge pages are set up.
|
| |
|
|
|
|
|
|
| |
huge pages.
This will make a difference if /sys/kernel/mm/transparent_hugepage/enabled has been set to [madvise], and not [always].
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
operator
Avoids triggering technically undefined behavior when creating an array
ref for a nullptr range, since the subscript operators will take a reference
to the underlying nullptr.
|
|\
| |
| |
| |
| | |
vespa-engine/vekterli/avoid-nullptr-ref-from-empty-file-read
Early return from asciistream file read if file is empty
|
| |
| |
| |
| |
| |
| | |
Avoids a transitive vespalib::string append with nullptr buffer and
zero length, which in turn ends up passing nullptr to memmove, which
is undefined.
|
|/
|
|
|
|
| |
Add `Array::data()` utility function to get raw buffer pointer instead of
going via `operator[]` which always takes a ref; the latter is not well
defined if the underlying buffer is nullptr.
|