]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
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
Alan T. DeKok [Wed, 11 Dec 2019 13:51:58 +0000 (08:51 -0500)]
increase size of output buffer
Alan T. DeKok [Wed, 11 Dec 2019 12:53:25 +0000 (07:53 -0500)]
Revert "use PCRE function to get error string"
This reverts commit
278ba5cdf353739bfdef5a9b20836430c5affd3e .
Nope.
Alan T. DeKok [Wed, 11 Dec 2019 12:35:38 +0000 (07:35 -0500)]
use PCRE function to get error string
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:49:28 +0000 (09:49 +0700)]
Better tracking for stacked handlers in connection.c
They don't really do much here, but it allows us to prevent certain signalling functions being used in handlers in future.
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:38:44 +0000 (09:38 +0700)]
Move to macros for all request list changes
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:32:56 +0000 (09:32 +0700)]
Typo
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:27:47 +0000 (09:27 +0700)]
Everywhere else uses entry as the dlist fields
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:16:57 +0000 (09:16 +0700)]
Add shutdown callback to the redis handle
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:14:45 +0000 (09:14 +0700)]
Deal with return codes from the shutdown callback
Arran Cudbard-Bell [Wed, 11 Dec 2019 01:54:39 +0000 (08:54 +0700)]
Used
Arran Cudbard-Bell [Wed, 11 Dec 2019 01:17:20 +0000 (08:17 +0700)]
Fix LDAP connection callback
Arran Cudbard-Bell [Wed, 11 Dec 2019 00:54:56 +0000 (07:54 +0700)]
Add support for shutting down connections gracefully
Jorge Pereira [Tue, 10 Dec 2019 14:48:48 +0000 (11:48 -0300)]
Update Pica8 dictionary
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:45 +0000 (20:38 +0700)]
Start of Redis Async I/O tests
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:29 +0000 (20:38 +0700)]
Get basic Redis async I/O functional
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:06 +0000 (20:38 +0700)]
Only two packets
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:37:54 +0000 (20:37 +0700)]
Remove duplicate message
Arran Cudbard-Bell [Tue, 10 Dec 2019 09:54:51 +0000 (16:54 +0700)]
Typo
Arran Cudbard-Bell [Tue, 10 Dec 2019 09:38:10 +0000 (16:38 +0700)]
Always need to add the linking context
Arran Cudbard-Bell [Tue, 10 Dec 2019 08:16:44 +0000 (15:16 +0700)]
Add function to check if a list is initialised
Arran Cudbard-Bell [Tue, 10 Dec 2019 08:16:26 +0000 (15:16 +0700)]
Add notes on heap allocations
Arran Cudbard-Bell [Tue, 10 Dec 2019 07:44:01 +0000 (14:44 +0700)]
Fix linker args
Arran Cudbard-Bell [Tue, 10 Dec 2019 06:45:51 +0000 (13:45 +0700)]
Fix test command output for the EAP tests
Arran Cudbard-Bell [Tue, 10 Dec 2019 06:45:40 +0000 (13:45 +0700)]
Implement self-contained way of managing the request slab allocator
There's no real reason to use specific free lists. We want all requests in a particular thread to be allocated in the same list, and passing around free list heads just makes things more complicated.
This seems to deal ok with child requests too.
Arran Cudbard-Bell [Tue, 10 Dec 2019 05:36:21 +0000 (12:36 +0700)]
Revert "alloc / free requests into worker-specific list"
This reverts commit
dd4dcaeccfe4334e0d45f08549b070ae98dad314 .
Revert "add APIs to mark a request as unused, or to re-use a request"
This reverts commit
de712c55940c3b2aa8bec49ae93b1c4aa62ffb14 .
Arran Cudbard-Bell [Tue, 10 Dec 2019 03:32:08 +0000 (10:32 +0700)]
s/rad_request/fr_request_s/
Alan T. DeKok [Tue, 10 Dec 2019 02:29:25 +0000 (21:29 -0500)]
point to "track" and not "entry"
Alan T. DeKok [Mon, 9 Dec 2019 23:24:34 +0000 (18:24 -0500)]
alloc / free requests into worker-specific list
Alan T. DeKok [Mon, 9 Dec 2019 23:16:21 +0000 (18:16 -0500)]
use new API for fr_dict_enum_by_value()
Alan T. DeKok [Mon, 9 Dec 2019 23:15:21 +0000 (18:15 -0500)]
use new API for fr_dict_enum_by_value()
Alan T. DeKok [Mon, 9 Dec 2019 23:14:38 +0000 (18:14 -0500)]
add duplicate of fr_dict_enum_by_value(), which takes dict
that saves rather surprising amounts of time.
Alan T. DeKok [Mon, 9 Dec 2019 22:07:27 +0000 (17:07 -0500)]
add APIs to mark a request as unused, or to re-use a request
this avoids the malloc / free loop when dealing with large
volumes of requests
Alan T. DeKok [Mon, 9 Dec 2019 22:00:09 +0000 (17:00 -0500)]
add API to clear request_data
Alan T. DeKok [Mon, 9 Dec 2019 21:59:20 +0000 (16:59 -0500)]
add API to clear a pre-existing stack
Alan T. DeKok [Mon, 9 Dec 2019 18:41:04 +0000 (13:41 -0500)]
test result of write()
Alan T. DeKok [Mon, 9 Dec 2019 18:14:32 +0000 (13:14 -0500)]
need this, too
Alan T. DeKok [Mon, 9 Dec 2019 16:53:15 +0000 (11:53 -0500)]
remove test which no longer works
Alan T. DeKok [Mon, 9 Dec 2019 16:21:58 +0000 (11:21 -0500)]
call event timer delete instead of const_free
which lets us re-use the timer event
Alan T. DeKok [Mon, 9 Dec 2019 15:48:13 +0000 (10:48 -0500)]
slab allocator && re-use for tracking structures
which saves ~1/2s on a ~20s run.
Alan T. DeKok [Mon, 9 Dec 2019 14:19:57 +0000 (09:19 -0500)]
initialize variable to quiet stupid scanner
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:52:54 +0000 (20:52 +0700)]
All todos done...
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:36:15 +0000 (20:36 +0700)]
Unused arg
Alan T. DeKok [Mon, 9 Dec 2019 13:29:29 +0000 (08:29 -0500)]
move control API to pipes instead of poking kevent.
it's a LOT faster to signal via pipes & kevent than to add / delete
individual kevents
Alan T. DeKok [Mon, 9 Dec 2019 02:06:29 +0000 (21:06 -0500)]
check for debug BEFORE calling debug function
map_list_mod_debug() does a lot of unconditional allocations.
So don't call it unless we know it's debugging
Alan T. DeKok [Mon, 9 Dec 2019 01:49:32 +0000 (20:49 -0500)]
call fr_worker_verify only when WITH_VERIFY_PTR is set
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:22:19 +0000 (20:22 +0700)]
Typo
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:21:26 +0000 (20:21 +0700)]
Add dumb script to run the google profiler against a binary
Arran Cudbard-Bell [Mon, 9 Dec 2019 12:47:39 +0000 (19:47 +0700)]
Support connection lifetime
Arran Cudbard-Bell [Mon, 9 Dec 2019 11:55:33 +0000 (18:55 +0700)]
Test high/low edges for connection spawning
Arran Cudbard-Bell [Mon, 9 Dec 2019 09:28:28 +0000 (16:28 +0700)]
Check the callbacks were actually called in the I/O tests
Set start time to 1, so we don't trigger asserts
Arran Cudbard-Bell [Mon, 9 Dec 2019 06:20:56 +0000 (13:20 +0700)]
Typo
Arran Cudbard-Bell [Mon, 9 Dec 2019 04:00:45 +0000 (11:00 +0700)]
Notes on what we're doing in trunk_requests_per_connection
Arran Cudbard-Bell [Mon, 9 Dec 2019 03:52:20 +0000 (10:52 +0700)]
Increase debug priority of trunk connection state changes
We should only see these printed once a steady state has been reached if something genuinely interesting happens, like a load spike or network disruption
Arran Cudbard-Bell [Mon, 9 Dec 2019 03:48:50 +0000 (10:48 +0700)]
Add draining_to_free state to simplify max_uses and lifetime
Connections in the draining-to-free state cannot be reactivated, and will be freed once there are no more requests associated with them.
Connections in the draining state can be reactivated if we get a load spike
Arran Cudbard-Bell [Mon, 9 Dec 2019 03:16:13 +0000 (10:16 +0700)]
Fix issues with freeing requests
Implement max_uses
Add configuration parser
Alan T. DeKok [Sun, 8 Dec 2019 21:34:20 +0000 (16:34 -0500)]
add simple profiling make file
so that mere mortals can run the profiling tools
Alan T. DeKok [Sat, 7 Dec 2019 20:14:16 +0000 (15:14 -0500)]
make sure that each packet has it's own unique time
Arran Cudbard-Bell [Sun, 8 Dec 2019 11:49:51 +0000 (18:49 +0700)]
Fix redefinition
Arran Cudbard-Bell [Sun, 8 Dec 2019 10:01:58 +0000 (17:01 +0700)]
Formatting
Arran Cudbard-Bell [Sun, 8 Dec 2019 09:09:19 +0000 (16:09 +0700)]
Always include autoconf.h in talloc.h
When doing standalone builds it's easy to miss the include for autoconf.h and it leads to stupid things
Arran Cudbard-Bell [Sun, 8 Dec 2019 07:54:01 +0000 (14:54 +0700)]
Insert freed requests into an unassigned list, ready to be used again
This gives us significant performance improvements (as you'd expect)
Arran Cudbard-Bell [Sat, 7 Dec 2019 14:16:24 +0000 (21:16 +0700)]
Space to tabs
Alan T. DeKok [Sat, 7 Dec 2019 15:04:07 +0000 (10:04 -0500)]
stupid integer overflow
Alan T. DeKok [Sat, 7 Dec 2019 15:03:57 +0000 (10:03 -0500)]
add todo note
Alan T. DeKok [Fri, 6 Dec 2019 19:49:42 +0000 (14:49 -0500)]
limit to max backlog
Arran Cudbard-Bell [Sat, 7 Dec 2019 13:52:59 +0000 (20:52 +0700)]
Unused
Arran Cudbard-Bell [Sat, 7 Dec 2019 13:47:37 +0000 (20:47 +0700)]
Remove and rename fields
Arran Cudbard-Bell [Sat, 7 Dec 2019 12:58:41 +0000 (19:58 +0700)]
Fix opening connection in the connection manager
Arran Cudbard-Bell [Sat, 7 Dec 2019 11:31:25 +0000 (18:31 +0700)]
Rebalance the backlogs of connections when a new connection becomes active
Arran Cudbard-Bell [Sat, 7 Dec 2019 06:10:25 +0000 (13:10 +0700)]
We only need to update trunk I/O events on connection state changes if the connection was just closed
We'll add I/O events back if new requests are enqueued
Arran Cudbard-Bell [Sat, 7 Dec 2019 05:35:13 +0000 (12:35 +0700)]
Call cancel_mux if there's partial cancellations too
Arran Cudbard-Bell [Fri, 6 Dec 2019 23:30:21 +0000 (06:30 +0700)]
Only enforce max_connections if its above zero
Arran Cudbard-Bell [Fri, 6 Dec 2019 23:29:59 +0000 (06:29 +0700)]
Start off assuming we're probably above our target number of connections
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:49:25 +0000 (18:49 +0700)]
s/waited/elapsed
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:47:36 +0000 (18:47 +0700)]
Doxygen
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:47:17 +0000 (18:47 +0700)]
Cancel sent can be entered from cancel_partial
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:46:40 +0000 (18:46 +0700)]
Expose interface to requeue requests
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:45:31 +0000 (18:45 +0700)]
Call the cancel callback after the request has changed state
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:45:05 +0000 (18:45 +0700)]
Recalculate requests per connection when a request enters the backlog
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:44:45 +0000 (18:44 +0700)]
Formatting
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:41:27 +0000 (18:41 +0700)]
Assert if the connection is not in the correct state when CONN_REORDER is called
Skip reordering if we only have one connection
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:41:09 +0000 (18:41 +0700)]
Print connection numbers in debug output
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:40:27 +0000 (18:40 +0700)]
Rename request/connection counting functions to have consistent names
Allow immediate spawning of connections
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:36:12 +0000 (18:36 +0700)]
Unused fields
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:35:56 +0000 (18:35 +0700)]
Move tests into a separate file
Alan T. DeKok [Fri, 6 Dec 2019 19:10:02 +0000 (14:10 -0500)]
send packets on reply only if we missed packets
and don't send any packets if we're gated.
This keeps the backlog correct. But it still sends at a rate
higher than the requested PPS. It's not yet clear why that's happening
Alan T. DeKok [Fri, 6 Dec 2019 17:37:27 +0000 (12:37 -0500)]
skip timer if we are not getting a response
Alan T. DeKok [Fri, 6 Dec 2019 17:36:23 +0000 (12:36 -0500)]
correct output stats
Alan T. DeKok [Fri, 6 Dec 2019 17:24:05 +0000 (12:24 -0500)]
always run the timer at expected intervals
Alan T. DeKok [Fri, 6 Dec 2019 14:17:24 +0000 (09:17 -0500)]
manual merge from v3.0.x
Alan T. DeKok [Fri, 6 Dec 2019 13:51:11 +0000 (08:51 -0500)]
fix error messages
Jorge Pereira [Fri, 6 Dec 2019 00:19:25 +0000 (21:19 -0300)]
Fix rlm_python build with Python 3.6.x
We don't need '-Wl,-stack_size,
1000000 '
Arran Cudbard-Bell [Fri, 6 Dec 2019 03:39:29 +0000 (10:39 +0700)]
Add more debug info when tracing connectoin.c function calls
Arran Cudbard-Bell [Fri, 6 Dec 2019 03:37:47 +0000 (10:37 +0700)]
Rename FULL to INACTIVE
It's essentially the same state. The connection should not have any new requests queued up, but is free to continue processing existing ones.
We should probably add a public API function to shift requests off a particular connection too.
Alan T. DeKok [Thu, 5 Dec 2019 22:13:57 +0000 (17:13 -0500)]
notes for TLVs
Matthew Newton [Thu, 5 Dec 2019 19:43:27 +0000 (19:43 +0000)]
typo
vim being "helpful"...