]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Arran Cudbard-Bell [Mon, 16 Dec 2019 10:43:08 +0000 (17:43 +0700)]
Use active flag on each end of the channel
Arran Cudbard-Bell [Mon, 16 Dec 2019 10:26:17 +0000 (17:26 +0700)]
Change the way workers are signalled to exit
They now wait for all their channels to close, then signal themselves to exit via their event loop.
Arran Cudbard-Bell [Mon, 16 Dec 2019 09:50:57 +0000 (16:50 +0700)]
General cleanups in the worker code
Update comments, normalise debug messages.
Arran Cudbard-Bell [Mon, 16 Dec 2019 08:40:27 +0000 (15:40 +0700)]
Switch to atomics for shared fields
Arran Cudbard-Bell [Mon, 16 Dec 2019 07:53:35 +0000 (14:53 +0700)]
Minor cleanups in channel code
Use REQUESTOR in place of "master" and "network", and RESPONDER in place of "worker". The channel code will likely be reused very soon to create module specific thread pools to deal with blocking requests, and it's confusing to use usecase specific terms in generic code.
Move all size_t to uint64_t. Guessing the original author was just being lazy and didn't want to type %"PRIu64 in a bunch of places.
Rename "ctx" to "uctx" because that's what it is...
Arran Cudbard-Bell [Sun, 15 Dec 2019 14:23:51 +0000 (21:23 +0700)]
Only emmit info messages about systemd if we're running under systemd
Arran Cudbard-Bell [Sun, 15 Dec 2019 12:35:05 +0000 (19:35 +0700)]
Worker starting messages are INFO level, exiting messages should be too
Arran Cudbard-Bell [Sun, 15 Dec 2019 12:32:27 +0000 (19:32 +0700)]
Free the snmp dictionaries
Arran Cudbard-Bell [Sun, 15 Dec 2019 11:44:30 +0000 (18:44 +0700)]
Missed debug build check
Arran Cudbard-Bell [Sun, 15 Dec 2019 11:20:51 +0000 (18:20 +0700)]
Still need to memset...
Arran Cudbard-Bell [Sun, 15 Dec 2019 11:17:27 +0000 (18:17 +0700)]
Address potential memory leak in track structures
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:55:51 +0000 (16:55 +0700)]
Invalid assert when module is exiting
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:45:51 +0000 (16:45 +0700)]
...and a log message
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:43:52 +0000 (16:43 +0700)]
Add a note...
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:42:46 +0000 (16:42 +0700)]
Ignore sigterm earlier and send kill later
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:36:18 +0000 (16:36 +0700)]
Stop the scheduler before sending the TERM signal
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:30:45 +0000 (16:30 +0700)]
Fix segv
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:29:14 +0000 (16:29 +0700)]
Needs somewhere to put the event
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:25:59 +0000 (16:25 +0700)]
Better way of signalling termination
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:24:54 +0000 (16:24 +0700)]
Add -e for triggering an exit after N seconds
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:10:54 +0000 (16:10 +0700)]
Allow date and time_delta to be flipped
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:06:30 +0000 (16:06 +0700)]
Only call fr_value_box_hton on numeric types
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:03:11 +0000 (16:03 +0700)]
Add more context to assert
Arran Cudbard-Bell [Sun, 15 Dec 2019 08:25:53 +0000 (15:25 +0700)]
Fix struct names
Arran Cudbard-Bell [Sun, 15 Dec 2019 08:02:48 +0000 (15:02 +0700)]
Just use the list for counting workers
Arran Cudbard-Bell [Sun, 15 Dec 2019 08:01:42 +0000 (15:01 +0700)]
Rename schedule struct
Arran Cudbard-Bell [Sun, 15 Dec 2019 06:34:44 +0000 (13:34 +0700)]
Use destructor to enforce absolute free order
Arran Cudbard-Bell [Sun, 15 Dec 2019 06:34:17 +0000 (13:34 +0700)]
Rename local alloc function
Alan T. DeKok [Sun, 15 Dec 2019 04:20:44 +0000 (23:20 -0500)]
run max_request timer no more than once every max_request time
this saves 1/3 to 1/2 in the test runs
Alan T. DeKok [Sun, 15 Dec 2019 01:49:26 +0000 (20:49 -0500)]
move timer logic to function that implements the timer.
Arran Cudbard-Bell [Sun, 15 Dec 2019 00:45:52 +0000 (07:45 +0700)]
Handle OpenSSL init/free ourselves
Arran Cudbard-Bell [Sat, 14 Dec 2019 14:18:58 +0000 (21:18 +0700)]
Free the right thing
Arran Cudbard-Bell [Sat, 14 Dec 2019 14:18:51 +0000 (21:18 +0700)]
Avoid calling curl global init more than once
Arran Cudbard-Bell [Sat, 14 Dec 2019 13:35:44 +0000 (20:35 +0700)]
Fix minor leak on exit
Arran Cudbard-Bell [Sat, 14 Dec 2019 13:02:40 +0000 (20:02 +0700)]
Gotta catch em all...
Arran Cudbard-Bell [Sat, 14 Dec 2019 12:43:53 +0000 (19:43 +0700)]
Ignore until we have a proper fix
Arran Cudbard-Bell [Sat, 14 Dec 2019 12:34:03 +0000 (19:34 +0700)]
stack is void
Arran Cudbard-Bell [Sat, 14 Dec 2019 12:21:02 +0000 (19:21 +0700)]
Fix assert when trying to cancel new requests
Arran Cudbard-Bell [Sat, 14 Dec 2019 12:16:12 +0000 (19:16 +0700)]
Gracefully deal with trunk timer failures
Arran Cudbard-Bell [Sat, 14 Dec 2019 12:08:29 +0000 (19:08 +0700)]
Deal with failed timer events gracefully in connection.c
Arran Cudbard-Bell [Sat, 14 Dec 2019 11:38:21 +0000 (18:38 +0700)]
Don't crash on exit in threaded mode when using rlm_radius
Arran Cudbard-Bell [Sat, 14 Dec 2019 11:04:29 +0000 (18:04 +0700)]
Typo
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:49:40 +0000 (17:49 +0700)]
Typo
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:42:24 +0000 (17:42 +0700)]
Did not allocate this, so shouldn't be freeing it
causes crash on exit
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:40:47 +0000 (17:40 +0700)]
Fix TOCTOU like issue in conn_closed caused by the a filedescriptor not being removed from the event loop before it's been freed
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:31:49 +0000 (17:31 +0700)]
Quiet clang?
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:23:25 +0000 (17:23 +0700)]
Fix assert in rlm_cache on unknown attributes
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:04:43 +0000 (17:04 +0700)]
Don't set tmpl_da and immediately overwrite it
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:04:11 +0000 (17:04 +0700)]
Don't emmit warnings if was can't find gigawords
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:02:23 +0000 (17:02 +0700)]
Set conn to NULL after it's meant to have been freed
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:01:57 +0000 (17:01 +0700)]
Halt if a connection attempt failed and no reconnect_delay was set
Arran Cudbard-Bell [Sat, 14 Dec 2019 06:49:39 +0000 (13:49 +0700)]
Rework time tracking so that it no longer uses an explicit tracking list
Arran Cudbard-Bell [Fri, 13 Dec 2019 11:51:49 +0000 (18:51 +0700)]
Move time tracking code into its own source file
Alan T. DeKok [Fri, 13 Dec 2019 18:25:14 +0000 (13:25 -0500)]
Revert "add and use sanity check functions for dlists"
This reverts commit
147307e922828e5c183ece1c8c05cd699917a432 .
nope
Alan T. DeKok [Fri, 13 Dec 2019 16:26:44 +0000 (11:26 -0500)]
add and use sanity check functions for dlists
Alan T. DeKok [Fri, 13 Dec 2019 16:16:19 +0000 (11:16 -0500)]
initialize to be the same as the worker tracking list
Arran Cudbard-Bell [Fri, 13 Dec 2019 10:15:43 +0000 (17:15 +0700)]
Don't allow the pool to start if we're in check config mode
Arran Cudbard-Bell [Fri, 13 Dec 2019 10:08:59 +0000 (17:08 +0700)]
Enable gperftools for eveloper builds
Arran Cudbard-Bell [Fri, 13 Dec 2019 07:39:46 +0000 (14:39 +0700)]
Barely noteworthy let alone error worthy
Arran Cudbard-Bell [Fri, 13 Dec 2019 07:22:03 +0000 (14:22 +0700)]
Not sure how it could ever be a garbage value, but oh well..
Arran Cudbard-Bell [Fri, 13 Dec 2019 06:56:15 +0000 (13:56 +0700)]
Add failed state to the trunk code
Partially mirrors connection's failed state, but only triggers if the connection immediately fails after opening.
Alan T. DeKok [Thu, 12 Dec 2019 22:47:34 +0000 (17:47 -0500)]
remove Response-Packet-Type
now that it's unused everywhere
Alan T. DeKok [Thu, 12 Dec 2019 22:46:25 +0000 (17:46 -0500)]
remove Response-Packet-Type
Jorge Pereira [Thu, 12 Dec 2019 21:02:42 +0000 (18:02 -0300)]
The 'Response-Packet-Type' was replaced by 'Packet-Type'
Part of
a9e875e74af4b0407fd57cf350fe8203249e74ed
Alan T. DeKok [Thu, 12 Dec 2019 20:36:47 +0000 (15:36 -0500)]
document Response-Packet-Type removal
Alan T. DeKok [Thu, 12 Dec 2019 20:36:35 +0000 (15:36 -0500)]
remove old things
Alan T. DeKok [Thu, 12 Dec 2019 20:09:14 +0000 (15:09 -0500)]
provisions for running many tests, one after the other.
in order to stress test the interpreter
Alan T. DeKok [Thu, 12 Dec 2019 19:31:15 +0000 (14:31 -0500)]
switch to use Packet-Type for the reply
instead of Response-Packet-Type
Arran Cudbard-Bell [Thu, 12 Dec 2019 18:16:47 +0000 (01:16 +0700)]
Fix LD_PRELOAD
Arran Cudbard-Bell [Thu, 12 Dec 2019 18:04:50 +0000 (01:04 +0700)]
strdup filename in more places
Alan T. DeKok [Thu, 12 Dec 2019 17:43:27 +0000 (12:43 -0500)]
remove unused variable
Alan T. DeKok [Thu, 12 Dec 2019 17:39:49 +0000 (12:39 -0500)]
Revert "add API to clear request_data"
This reverts commit
33c8af9031618f293195802facfd5ab3cb3433dc .
no longer needed
Alan T. DeKok [Thu, 12 Dec 2019 17:39:29 +0000 (12:39 -0500)]
Revert "add API to clear a pre-existing stack"
This reverts commit
1d764ca8062b0b73704df7acbd4ec8e7e70cab91 .
not needed
Arran Cudbard-Bell [Thu, 12 Dec 2019 17:37:52 +0000 (00:37 +0700)]
Add the pointer to the handle, not the handle
Alan T. DeKok [Thu, 12 Dec 2019 17:12:34 +0000 (12:12 -0500)]
typo. Use the correct variable
Alan T. DeKok [Thu, 12 Dec 2019 16:51:39 +0000 (11:51 -0500)]
snprintf() is expensive.
Using our own itoa() routine saves 200ms on a 15s run.
Alan T. DeKok [Thu, 12 Dec 2019 16:32:49 +0000 (11:32 -0500)]
remove bad code
Arran Cudbard-Bell [Thu, 12 Dec 2019 16:28:56 +0000 (23:28 +0700)]
PCRE_ERROR_UNSET not available everywhere
Alan T. DeKok [Thu, 12 Dec 2019 16:21:53 +0000 (11:21 -0500)]
move code to where it's used
Alan T. DeKok [Thu, 12 Dec 2019 15:50:51 +0000 (10:50 -0500)]
add local free list for MD5 contexts
which saves 1/2s to 1s on the performance tests.
Because we don't control the content of OpenSSL's structures,
we can't use a dlist. Instead, we just have a fixed-size local
array. With provisions for all array entries being used.
In general, the code should allocate an MD5 context, use it,
and immediately free it. i.e. *without* doing any IO while
holding the MD5 context.
Since the code does this already, it's OK.
Alan T. DeKok [Thu, 12 Dec 2019 15:49:25 +0000 (10:49 -0500)]
don't call snprintf() in the hot path.
If we don't have debugging symbols enabled, then performance
is likely more important than debugging. If debugging symbols
are enabled, then small performance hits aren't much of an issue.
Arran Cudbard-Bell [Thu, 12 Dec 2019 13:14:41 +0000 (20:14 +0700)]
Initialise is_closed to the correct value
Arran Cudbard-Bell [Thu, 12 Dec 2019 12:19:05 +0000 (19:19 +0700)]
Add basic I/O throughput test
Arran Cudbard-Bell [Thu, 12 Dec 2019 12:18:41 +0000 (19:18 +0700)]
Make trunk more permissive regarding what callbacks need to be provided
Arran Cudbard-Bell [Thu, 12 Dec 2019 10:27:46 +0000 (17:27 +0700)]
Typos
Arran Cudbard-Bell [Thu, 12 Dec 2019 10:20:03 +0000 (17:20 +0700)]
Add redis pipeline code
Untested... So probably doesn't work yet.
Arran Cudbard-Bell [Thu, 12 Dec 2019 10:19:07 +0000 (17:19 +0700)]
Pass around connection callbacks and configurations in structs
Makes it much easier to add new parameters later
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:05:51 +0000 (15:05 +0700)]
Add a 'ignore a response' mini-API to the Redis I/O code
When a request is signalled to be freed we can now tell the redis pipeline code to ignore the response.
Unfortunately there's no way to explicitly cancel a command, but they're not usually very long running anyway.
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:04:05 +0000 (15:04 +0700)]
Change how we deal with freeing connections
We now use the on_halt watcher as an indication the conn is ready to be freed, and that the tconn should also be freed.
This allows us to signal that the connection should be shutdown, and allows that process to complete before we attempt to free the conn or tconn.
The previous code just failed spectacularly... this is almost sane.
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:02:04 +0000 (15:02 +0700)]
Allow request states to be signalled from outside of the demuxer
The demuxer isn't always needed or useful.
Arran Cudbard-Bell [Thu, 12 Dec 2019 08:01:27 +0000 (15:01 +0700)]
memcpy the trunk config
It's just easier, and there are fewer pointer derefs.
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:57:21 +0000 (14:57 +0700)]
Enqueue return codes should be public...
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:56:38 +0000 (14:56 +0700)]
Allow watchers to be removed by handlers without causing catastrophic failure
When a watcher is freed, the watcher call loop is now fully aware that this has happened, and will not attempt to call freed watchers.
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:55:05 +0000 (14:55 +0700)]
Docs
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:54:50 +0000 (14:54 +0700)]
Everything else uses entry...
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:54:29 +0000 (14:54 +0700)]
Shift come code around
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:53:37 +0000 (14:53 +0700)]
Add a deferred signal handling system to the connection API
It was a nightmare trying to reason about how signals would be delivered to the connections from within the handlers, so prevent that from happening, EVER.
Now the connection state machine completes whatever work it needs to, then at the end, checks to see if the handlers signalled it, and THEN, AND ONLY THEN does it process the signals.
The signals run through the public signalling interface, which should mean the connection is never allowed to make an invalid transition. Signals that are invalid for the connections current state are just ignored.
Alan T. DeKok [Wed, 11 Dec 2019 21:12:01 +0000 (16:12 -0500)]
reuse more memory
Arran Cudbard-Bell [Wed, 11 Dec 2019 13:53:14 +0000 (20:53 +0700)]
Make JIT stack size configurable, and keep the stack sizes consistent between library versions
Arran Cudbard-Bell [Wed, 11 Dec 2019 13:47:18 +0000 (20:47 +0700)]
Add missing errors, increase JIT stack size