]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agoAdd a deferred signal handling system to the connection API
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.

6 years agoreuse more memory
Alan T. DeKok [Wed, 11 Dec 2019 21:12:01 +0000 (16:12 -0500)] 
reuse more memory

6 years agoMake JIT stack size configurable, and keep the stack sizes consistent between library...
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

6 years agoAdd missing errors, increase JIT stack size
Arran Cudbard-Bell [Wed, 11 Dec 2019 13:47:18 +0000 (20:47 +0700)] 
Add missing errors, increase JIT stack size

6 years agoincrease size of output buffer
Alan T. DeKok [Wed, 11 Dec 2019 13:51:58 +0000 (08:51 -0500)] 
increase size of output buffer

6 years agoRevert "use PCRE function to get error string"
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.

6 years agouse PCRE function to get error string
Alan T. DeKok [Wed, 11 Dec 2019 12:35:38 +0000 (07:35 -0500)] 
use PCRE function to get error string

6 years agoBetter tracking for stacked handlers in connection.c
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.

6 years agoMove to macros for all request list changes
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:38:44 +0000 (09:38 +0700)] 
Move to macros for all request list changes

6 years agoTypo
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:32:56 +0000 (09:32 +0700)] 
Typo

6 years agoEverywhere else uses entry as the dlist fields
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:27:47 +0000 (09:27 +0700)] 
Everywhere else uses entry as the dlist fields

6 years agoAdd shutdown callback to the redis handle
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:16:57 +0000 (09:16 +0700)] 
Add shutdown callback to the redis handle

6 years agoDeal with return codes from the shutdown callback
Arran Cudbard-Bell [Wed, 11 Dec 2019 02:14:45 +0000 (09:14 +0700)] 
Deal with return codes from the shutdown callback

6 years agoUsed
Arran Cudbard-Bell [Wed, 11 Dec 2019 01:54:39 +0000 (08:54 +0700)] 
Used

6 years agoFix LDAP connection callback
Arran Cudbard-Bell [Wed, 11 Dec 2019 01:17:20 +0000 (08:17 +0700)] 
Fix LDAP connection callback

6 years agoAdd support for shutting down connections gracefully
Arran Cudbard-Bell [Wed, 11 Dec 2019 00:54:56 +0000 (07:54 +0700)] 
Add support for shutting down connections gracefully

6 years agoUpdate Pica8 dictionary
Jorge Pereira [Tue, 10 Dec 2019 14:48:48 +0000 (11:48 -0300)] 
Update Pica8 dictionary

6 years agoStart of Redis Async I/O tests
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:45 +0000 (20:38 +0700)] 
Start of Redis Async I/O tests

6 years agoGet basic Redis async I/O functional
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:29 +0000 (20:38 +0700)] 
Get basic Redis async I/O functional

6 years agoOnly two packets
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:38:06 +0000 (20:38 +0700)] 
Only two packets

6 years agoRemove duplicate message
Arran Cudbard-Bell [Tue, 10 Dec 2019 13:37:54 +0000 (20:37 +0700)] 
Remove duplicate message

6 years agoTypo
Arran Cudbard-Bell [Tue, 10 Dec 2019 09:54:51 +0000 (16:54 +0700)] 
Typo

6 years agoAlways need to add the linking context
Arran Cudbard-Bell [Tue, 10 Dec 2019 09:38:10 +0000 (16:38 +0700)] 
Always need to add the linking context

6 years agoAdd function to check if a list is initialised
Arran Cudbard-Bell [Tue, 10 Dec 2019 08:16:44 +0000 (15:16 +0700)] 
Add function to check if a list is initialised

6 years agoAdd notes on heap allocations
Arran Cudbard-Bell [Tue, 10 Dec 2019 08:16:26 +0000 (15:16 +0700)] 
Add notes on heap allocations

6 years agoFix linker args
Arran Cudbard-Bell [Tue, 10 Dec 2019 07:44:01 +0000 (14:44 +0700)] 
Fix linker args

6 years agoFix test command output for the EAP tests
Arran Cudbard-Bell [Tue, 10 Dec 2019 06:45:51 +0000 (13:45 +0700)] 
Fix test command output for the EAP tests

6 years agoImplement self-contained way of managing the request slab allocator
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.

6 years agoRevert "alloc / free requests into worker-specific list"
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.

6 years agos/rad_request/fr_request_s/
Arran Cudbard-Bell [Tue, 10 Dec 2019 03:32:08 +0000 (10:32 +0700)] 
s/rad_request/fr_request_s/

6 years agopoint to "track" and not "entry"
Alan T. DeKok [Tue, 10 Dec 2019 02:29:25 +0000 (21:29 -0500)] 
point to "track" and not "entry"

6 years agoalloc / free requests into worker-specific list
Alan T. DeKok [Mon, 9 Dec 2019 23:24:34 +0000 (18:24 -0500)] 
alloc / free requests into worker-specific list

6 years agouse new API for fr_dict_enum_by_value()
Alan T. DeKok [Mon, 9 Dec 2019 23:16:21 +0000 (18:16 -0500)] 
use new API for fr_dict_enum_by_value()

6 years agouse 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()

6 years agoadd duplicate of fr_dict_enum_by_value(), which takes dict
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.

6 years agoadd APIs to mark a request as unused, or to re-use a request
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

6 years agoadd API to clear request_data
Alan T. DeKok [Mon, 9 Dec 2019 22:00:09 +0000 (17:00 -0500)] 
add API to clear request_data

6 years agoadd API to clear a pre-existing stack
Alan T. DeKok [Mon, 9 Dec 2019 21:59:20 +0000 (16:59 -0500)] 
add API to clear a pre-existing stack

6 years agotest result of write()
Alan T. DeKok [Mon, 9 Dec 2019 18:41:04 +0000 (13:41 -0500)] 
test result of write()

6 years agoneed this, too
Alan T. DeKok [Mon, 9 Dec 2019 18:14:32 +0000 (13:14 -0500)] 
need this, too

6 years agoremove test which no longer works
Alan T. DeKok [Mon, 9 Dec 2019 16:53:15 +0000 (11:53 -0500)] 
remove test which no longer works

6 years agocall event timer delete instead of const_free
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

6 years agoslab allocator && re-use for tracking structures
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.

6 years agoinitialize variable to quiet stupid scanner
Alan T. DeKok [Mon, 9 Dec 2019 14:19:57 +0000 (09:19 -0500)] 
initialize variable to quiet stupid scanner

6 years agoAll todos done...
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:52:54 +0000 (20:52 +0700)] 
All todos done...

6 years agoUnused arg
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:36:15 +0000 (20:36 +0700)] 
Unused arg

6 years agomove control API to pipes instead of poking kevent.
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

6 years agocheck for debug BEFORE calling debug function
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

6 years agocall fr_worker_verify only when WITH_VERIFY_PTR is set
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

6 years agoTypo
Arran Cudbard-Bell [Mon, 9 Dec 2019 13:22:19 +0000 (20:22 +0700)] 
Typo

6 years agoAdd dumb script to run the google profiler against a binary
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

6 years agoSupport connection lifetime
Arran Cudbard-Bell [Mon, 9 Dec 2019 12:47:39 +0000 (19:47 +0700)] 
Support connection lifetime

6 years agoTest high/low edges for connection spawning
Arran Cudbard-Bell [Mon, 9 Dec 2019 11:55:33 +0000 (18:55 +0700)] 
Test high/low edges for connection spawning

6 years agoCheck the callbacks were actually called in the I/O tests
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

6 years agoTypo
Arran Cudbard-Bell [Mon, 9 Dec 2019 06:20:56 +0000 (13:20 +0700)] 
Typo

6 years agoNotes on what we're doing in trunk_requests_per_connection
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

6 years agoIncrease debug priority of trunk connection state changes
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

6 years agoAdd draining_to_free state to simplify max_uses and lifetime
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

6 years agoFix issues with freeing requests
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

6 years agoadd simple profiling make file
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

6 years agomake sure that each packet has it's own unique time
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

6 years agoFix redefinition
Arran Cudbard-Bell [Sun, 8 Dec 2019 11:49:51 +0000 (18:49 +0700)] 
Fix redefinition

6 years agoFormatting
Arran Cudbard-Bell [Sun, 8 Dec 2019 10:01:58 +0000 (17:01 +0700)] 
Formatting

6 years agoAlways include autoconf.h in talloc.h
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

6 years agoInsert freed requests into an unassigned list, ready to be used again
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)

6 years agoSpace to tabs
Arran Cudbard-Bell [Sat, 7 Dec 2019 14:16:24 +0000 (21:16 +0700)] 
Space to tabs

6 years agostupid integer overflow
Alan T. DeKok [Sat, 7 Dec 2019 15:04:07 +0000 (10:04 -0500)] 
stupid integer overflow

6 years agoadd todo note
Alan T. DeKok [Sat, 7 Dec 2019 15:03:57 +0000 (10:03 -0500)] 
add todo note

6 years agolimit to max backlog
Alan T. DeKok [Fri, 6 Dec 2019 19:49:42 +0000 (14:49 -0500)] 
limit to max backlog

6 years agoUnused
Arran Cudbard-Bell [Sat, 7 Dec 2019 13:52:59 +0000 (20:52 +0700)] 
Unused

6 years agoRemove and rename fields
Arran Cudbard-Bell [Sat, 7 Dec 2019 13:47:37 +0000 (20:47 +0700)] 
Remove and rename fields

6 years agoFix opening connection in the connection manager
Arran Cudbard-Bell [Sat, 7 Dec 2019 12:58:41 +0000 (19:58 +0700)] 
Fix opening connection in the connection manager

6 years agoRebalance the backlogs of connections when a new connection becomes active
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

6 years agoWe only need to update trunk I/O events on connection state changes if the connection...
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

6 years agoCall cancel_mux if there's partial cancellations too
Arran Cudbard-Bell [Sat, 7 Dec 2019 05:35:13 +0000 (12:35 +0700)] 
Call cancel_mux if there's partial cancellations too

6 years agoOnly enforce max_connections if its above zero
Arran Cudbard-Bell [Fri, 6 Dec 2019 23:30:21 +0000 (06:30 +0700)] 
Only enforce max_connections if its above zero

6 years agoStart off assuming we're probably above our target number of connections
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

6 years agos/waited/elapsed
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:49:25 +0000 (18:49 +0700)] 
s/waited/elapsed

6 years agoDoxygen
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:47:36 +0000 (18:47 +0700)] 
Doxygen

6 years agoCancel sent can be entered from cancel_partial
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:47:17 +0000 (18:47 +0700)] 
Cancel sent can be entered from cancel_partial

6 years agoExpose interface to requeue requests
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:46:40 +0000 (18:46 +0700)] 
Expose interface to requeue requests

6 years agoCall the cancel callback after the request has changed state
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:45:31 +0000 (18:45 +0700)] 
Call the cancel callback after the request has changed state

6 years agoRecalculate requests per connection when a request enters the backlog
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:45:05 +0000 (18:45 +0700)] 
Recalculate requests per connection when a request enters the backlog

6 years agoFormatting
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:44:45 +0000 (18:44 +0700)] 
Formatting

6 years agoAssert if the connection is not in the correct state when CONN_REORDER is called
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

6 years agoPrint connection numbers in debug output
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:41:09 +0000 (18:41 +0700)] 
Print connection numbers in debug output

6 years agoRename request/connection counting functions to have consistent names
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

6 years agoUnused fields
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:36:12 +0000 (18:36 +0700)] 
Unused fields

6 years agoMove tests into a separate file
Arran Cudbard-Bell [Fri, 6 Dec 2019 11:35:56 +0000 (18:35 +0700)] 
Move tests into a separate file

6 years agosend packets on reply only if we missed packets
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

6 years agoskip timer if we are not getting a response
Alan T. DeKok [Fri, 6 Dec 2019 17:37:27 +0000 (12:37 -0500)] 
skip timer if we are not getting a response

6 years agocorrect output stats
Alan T. DeKok [Fri, 6 Dec 2019 17:36:23 +0000 (12:36 -0500)] 
correct output stats

6 years agoalways run the timer at expected intervals
Alan T. DeKok [Fri, 6 Dec 2019 17:24:05 +0000 (12:24 -0500)] 
always run the timer at expected intervals

6 years agomanual merge from v3.0.x
Alan T. DeKok [Fri, 6 Dec 2019 14:17:24 +0000 (09:17 -0500)] 
manual merge from v3.0.x

6 years agofix error messages
Alan T. DeKok [Fri, 6 Dec 2019 13:51:11 +0000 (08:51 -0500)] 
fix error messages

6 years agoFix rlm_python build with Python 3.6.x
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'

6 years agoAdd more debug info when tracing connectoin.c function calls
Arran Cudbard-Bell [Fri, 6 Dec 2019 03:39:29 +0000 (10:39 +0700)] 
Add more debug info when tracing connectoin.c function calls

6 years agoRename FULL to INACTIVE
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.

6 years agonotes for TLVs
Alan T. DeKok [Thu, 5 Dec 2019 22:13:57 +0000 (17:13 -0500)] 
notes for TLVs

6 years agotypo
Matthew Newton [Thu, 5 Dec 2019 19:43:27 +0000 (19:43 +0000)] 
typo

vim being "helpful"...