| Age | Commit message (Collapse) | Author |
|
triton_conf_reload() kept the notify callback in a single global slot,
and the CLI reload command likewise stored its wakeup context in a
global. A second reload issued while the first was still pending (from
another CLI connection or SIGUSR1) overwrote both, so only the last
requester was notified when the reload completed; the earlier CLI
context slept forever in triton_context_schedule() and that connection
hung while the rest of the daemon kept running.
Make triton_conf_reload() return -1 when a reload is already pending,
checked atomically under threads_lock, and pass a caller-provided arg
through to the notify callback so each requester keeps its own state
instead of sharing globals. The CLI reload's request struct is
heap-allocated rather than kept on reload_exec's stack, since
triton_context_schedule() can migrate a suspended context onto a
different worker thread's stack before the notify callback runs,
which would otherwise leave conf_reload_notify() writing through a
stale stack pointer.
Also mark the reload as running (need_config_reload = 2) before
dropping threads_lock to call __config_reload(). Previously a worker
woken during the reload (e.g. by the notify callback waking the CLI
context, or any stray context wakeup) could loop through the idle
path, decrement the active count back to zero and re-enter
__config_reload() while need_config_reload was still set, running a
second concurrent conf_reload() and invoking the notify callback
twice - corrupting the wakeup list and, with the CLI's heap request,
writing through freed memory.
The SIGUSR1 handler used to call triton_conf_reload() directly from
signal context, taking spinlocks and potentially running the whole
config parse inside the handler. It now only sets a flag; the main
thread waits with sigtimedwait() and performs the reload (and logs a
warning when one is already in progress) from normal thread context.
The CLI now replies "reload is already in progress" instead of losing
the first requester's wakeup.
|
|
Group the Triton core statistics in struct triton_stat_t and keep the storage private to triton.c instead of exporting the writable triton_stat object through triton.h. This keeps ownership inside the Triton core while preserving the existing CLI and ACCEL-PPP-MIB counter semantics.
Route counter updates through triton_stat_*() helpers. Thread, context, md handler, timer, mempool, CPU, and start-time update paths no longer open-code direct triton_stat mutations; the update policy now lives beside the Triton-owned storage and uses relaxed atomic operations for the simple counters.
Make the CLI show-stat path render from a local snapshot and update statCore SNMP readers to use triton_stat_start_time() and triton_stat_cpu(). Out-of-tree modules that accessed the exported triton_stat object directly must switch to the new accessors, because triton_stat is no longer part of the public ABI.
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
|
|
Group the core session starting, active, and finishing statistics behind the private ap_session_stat storage in session.c instead of exposing writable counters through ap_session.h. This keeps ownership inside the session core while preserving the existing CLI and ACCEL-PPP-MIB counter semantics.
Route session counter updates through ap_session_stat_*() helpers. Session start, activation, termination, finish, and shutdown-idle paths no longer open-code individual counter increments/decrements; the update policy now lives beside the session-owned storage and uses relaxed atomic operations for the simple state counters.
Make the CLI show-stat path render from a local snapshot and convert the PPP SNMP starting/active/finishing scalars from watched raw pointers to scalar handlers. PPP controllers now read max-session limits through ap_session_stat_starting() and ap_session_stat_active(), removing external direct access to ap_session_stat.
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
|
|
We are living in 64-bit world long time, so there is very likely mempool
stats might overflow past 4GB and report incorrect values.
Updated mempool stats to use 64-bit counters so they don’t
wrap past 4 GB and print correctly in CLI.
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
|
|
PCRE is not supported anymore and removed from several distros
|
|
|
|
fix 4b52c1a3590b43ca892c460d9b1478e1da742156
|
|
|
|
|
|
Hello,
small patch to avoid gcc -Wformat warnings on Debian x32 where time_t
is "long long" (64-bit signed, to be 2038 safe), not "unsigned long"
(32-bit unsigned) corresponding to "%lu" format strings.
Regards,
Marek
|
|
|
|
|
|
|
|
|
|
default)
|
|
|
|
Fix several errors and compiler warnings in format string
arguments.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
|
|
cli: introduced 'restart' command to restrat daemon
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|