]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
6 years agoUse active flag on each end of the channel
Arran Cudbard-Bell [Mon, 16 Dec 2019 10:43:08 +0000 (17:43 +0700)] 
Use active flag on each end of the channel

6 years agoChange the way workers are signalled to exit
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.

6 years agoGeneral cleanups in the worker code
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.

6 years agoSwitch to atomics for shared fields
Arran Cudbard-Bell [Mon, 16 Dec 2019 08:40:27 +0000 (15:40 +0700)] 
Switch to atomics for shared fields

6 years agoMinor cleanups in channel code
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...

6 years agoOnly emmit info messages about systemd if we're running under systemd
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

6 years agoWorker starting messages are INFO level, exiting messages should be too
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

6 years agoFree the snmp dictionaries
Arran Cudbard-Bell [Sun, 15 Dec 2019 12:32:27 +0000 (19:32 +0700)] 
Free the snmp dictionaries

6 years agoMissed debug build check
Arran Cudbard-Bell [Sun, 15 Dec 2019 11:44:30 +0000 (18:44 +0700)] 
Missed debug build check

6 years agoStill need to memset...
Arran Cudbard-Bell [Sun, 15 Dec 2019 11:20:51 +0000 (18:20 +0700)] 
Still need to memset...

6 years agoAddress potential memory leak in track structures
Arran Cudbard-Bell [Sun, 15 Dec 2019 11:17:27 +0000 (18:17 +0700)] 
Address potential memory leak in track structures

6 years agoInvalid assert when module is exiting
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:55:51 +0000 (16:55 +0700)] 
Invalid  assert when module is exiting

6 years ago...and a log message
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:45:51 +0000 (16:45 +0700)] 
...and a log message

6 years agoAdd a note...
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:43:52 +0000 (16:43 +0700)] 
Add a note...

6 years agoIgnore sigterm earlier and send kill later
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:42:46 +0000 (16:42 +0700)] 
Ignore sigterm earlier and send kill later

6 years agoStop the scheduler before sending the TERM signal
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:36:18 +0000 (16:36 +0700)] 
Stop the scheduler before sending the TERM signal

6 years agoFix segv
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:30:45 +0000 (16:30 +0700)] 
Fix segv

6 years agoNeeds somewhere to put the event
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:29:14 +0000 (16:29 +0700)] 
Needs somewhere to put the event

6 years agoBetter way of signalling termination
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:25:59 +0000 (16:25 +0700)] 
Better way of signalling termination

6 years agoAdd -e for triggering an exit after N seconds
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:24:54 +0000 (16:24 +0700)] 
Add -e for triggering an exit after N seconds

6 years agoAllow date and time_delta to be flipped
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:10:54 +0000 (16:10 +0700)] 
Allow date and time_delta to be flipped

6 years agoOnly call fr_value_box_hton on numeric types
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:06:30 +0000 (16:06 +0700)] 
Only call fr_value_box_hton on numeric types

6 years agoAdd more context to assert
Arran Cudbard-Bell [Sun, 15 Dec 2019 09:03:11 +0000 (16:03 +0700)] 
Add more context to assert

6 years agoFix struct names
Arran Cudbard-Bell [Sun, 15 Dec 2019 08:25:53 +0000 (15:25 +0700)] 
Fix struct names

6 years agoJust use the list for counting workers
Arran Cudbard-Bell [Sun, 15 Dec 2019 08:02:48 +0000 (15:02 +0700)] 
Just use the list for counting workers

6 years agoRename schedule struct
Arran Cudbard-Bell [Sun, 15 Dec 2019 08:01:42 +0000 (15:01 +0700)] 
Rename schedule struct

6 years agoUse destructor to enforce absolute free order
Arran Cudbard-Bell [Sun, 15 Dec 2019 06:34:44 +0000 (13:34 +0700)] 
Use destructor to enforce absolute free order

6 years agoRename local alloc function
Arran Cudbard-Bell [Sun, 15 Dec 2019 06:34:17 +0000 (13:34 +0700)] 
Rename local alloc function

6 years agorun max_request timer no more than once every max_request time
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

6 years agomove timer logic to function that implements the timer.
Alan T. DeKok [Sun, 15 Dec 2019 01:49:26 +0000 (20:49 -0500)] 
move timer logic to function that implements the timer.

6 years agoHandle OpenSSL init/free ourselves
Arran Cudbard-Bell [Sun, 15 Dec 2019 00:45:52 +0000 (07:45 +0700)] 
Handle OpenSSL init/free ourselves

6 years agoFree the right thing
Arran Cudbard-Bell [Sat, 14 Dec 2019 14:18:58 +0000 (21:18 +0700)] 
Free the right thing

6 years agoAvoid calling curl global init more than once
Arran Cudbard-Bell [Sat, 14 Dec 2019 14:18:51 +0000 (21:18 +0700)] 
Avoid calling curl global init more than once

6 years agoFix minor leak on exit
Arran Cudbard-Bell [Sat, 14 Dec 2019 13:35:44 +0000 (20:35 +0700)] 
Fix minor leak on exit

6 years agoGotta catch em all...
Arran Cudbard-Bell [Sat, 14 Dec 2019 13:02:40 +0000 (20:02 +0700)] 
Gotta catch em all...

6 years agoIgnore until we have a proper fix
Arran Cudbard-Bell [Sat, 14 Dec 2019 12:43:53 +0000 (19:43 +0700)] 
Ignore until we have a proper fix

6 years agostack is void
Arran Cudbard-Bell [Sat, 14 Dec 2019 12:34:03 +0000 (19:34 +0700)] 
stack is void

6 years agoFix assert when trying to cancel new requests
Arran Cudbard-Bell [Sat, 14 Dec 2019 12:21:02 +0000 (19:21 +0700)] 
Fix assert when trying to cancel new requests

6 years agoGracefully deal with trunk timer failures
Arran Cudbard-Bell [Sat, 14 Dec 2019 12:16:12 +0000 (19:16 +0700)] 
Gracefully deal with trunk timer failures

6 years agoDeal with failed timer events gracefully in connection.c
Arran Cudbard-Bell [Sat, 14 Dec 2019 12:08:29 +0000 (19:08 +0700)] 
Deal with failed timer events gracefully in connection.c

6 years agoDon't crash on exit in threaded mode when using rlm_radius
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

6 years agoTypo
Arran Cudbard-Bell [Sat, 14 Dec 2019 11:04:29 +0000 (18:04 +0700)] 
Typo

6 years agoTypo
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:49:40 +0000 (17:49 +0700)] 
Typo

6 years agoDid not allocate this, so shouldn't be freeing it
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

6 years agoFix TOCTOU like issue in conn_closed caused by the a filedescriptor not being removed...
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

6 years agoQuiet clang?
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:31:49 +0000 (17:31 +0700)] 
Quiet clang?

6 years agoFix assert in rlm_cache on unknown attributes
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:23:25 +0000 (17:23 +0700)] 
Fix assert in rlm_cache on unknown attributes

6 years agoDon't set tmpl_da and immediately overwrite it
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:04:43 +0000 (17:04 +0700)] 
Don't set tmpl_da and immediately overwrite it

6 years agoDon't emmit warnings if was can't find gigawords
Arran Cudbard-Bell [Sat, 14 Dec 2019 10:04:11 +0000 (17:04 +0700)] 
Don't emmit warnings if was can't find gigawords

6 years agoSet conn to NULL after it's meant to have been freed
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

6 years agoHalt if a connection attempt failed and no reconnect_delay was set
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

6 years agoRework time tracking so that it no longer uses an explicit tracking list
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

6 years agoMove time tracking code into its own source file
Arran Cudbard-Bell [Fri, 13 Dec 2019 11:51:49 +0000 (18:51 +0700)] 
Move time tracking code into its own source file

6 years agoRevert "add and use sanity check functions for dlists"
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

6 years agoadd and use sanity check functions for dlists
Alan T. DeKok [Fri, 13 Dec 2019 16:26:44 +0000 (11:26 -0500)] 
add and use sanity check functions for dlists

6 years agoinitialize to be the same as the worker tracking list
Alan T. DeKok [Fri, 13 Dec 2019 16:16:19 +0000 (11:16 -0500)] 
initialize to be the same as the worker tracking list

6 years agoDon't allow the pool to start if we're in check config mode
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

6 years agoEnable gperftools for eveloper builds
Arran Cudbard-Bell [Fri, 13 Dec 2019 10:08:59 +0000 (17:08 +0700)] 
Enable gperftools for eveloper builds

6 years agoBarely noteworthy let alone error worthy
Arran Cudbard-Bell [Fri, 13 Dec 2019 07:39:46 +0000 (14:39 +0700)] 
Barely noteworthy let alone error worthy

6 years agoNot sure how it could ever be a garbage value, but oh well..
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..

6 years agoAdd failed state to the trunk code
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.

6 years agoremove Response-Packet-Type
Alan T. DeKok [Thu, 12 Dec 2019 22:47:34 +0000 (17:47 -0500)] 
remove Response-Packet-Type

now that it's unused everywhere

6 years agoremove Response-Packet-Type
Alan T. DeKok [Thu, 12 Dec 2019 22:46:25 +0000 (17:46 -0500)] 
remove Response-Packet-Type

6 years agoThe 'Response-Packet-Type' was replaced by '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

6 years agodocument Response-Packet-Type removal
Alan T. DeKok [Thu, 12 Dec 2019 20:36:47 +0000 (15:36 -0500)] 
document Response-Packet-Type removal

6 years agoremove old things
Alan T. DeKok [Thu, 12 Dec 2019 20:36:35 +0000 (15:36 -0500)] 
remove old things

6 years agoprovisions for running many tests, one after the other.
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

6 years agoswitch to use Packet-Type for the reply
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

6 years agoFix LD_PRELOAD
Arran Cudbard-Bell [Thu, 12 Dec 2019 18:16:47 +0000 (01:16 +0700)] 
Fix LD_PRELOAD

6 years agostrdup filename in more places
Arran Cudbard-Bell [Thu, 12 Dec 2019 18:04:50 +0000 (01:04 +0700)] 
strdup filename in more places

6 years agoremove unused variable
Alan T. DeKok [Thu, 12 Dec 2019 17:43:27 +0000 (12:43 -0500)] 
remove unused variable

6 years agoRevert "add API to clear request_data"
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

6 years agoRevert "add API to clear a pre-existing stack"
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

6 years agoAdd the pointer to the handle, not the handle
Arran Cudbard-Bell [Thu, 12 Dec 2019 17:37:52 +0000 (00:37 +0700)] 
Add the pointer to the handle, not the handle

6 years agotypo. Use the correct variable
Alan T. DeKok [Thu, 12 Dec 2019 17:12:34 +0000 (12:12 -0500)] 
typo.  Use the correct variable

6 years agosnprintf() is expensive.
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.

6 years agoremove bad code
Alan T. DeKok [Thu, 12 Dec 2019 16:32:49 +0000 (11:32 -0500)] 
remove bad code

6 years agoPCRE_ERROR_UNSET not available everywhere
Arran Cudbard-Bell [Thu, 12 Dec 2019 16:28:56 +0000 (23:28 +0700)] 
PCRE_ERROR_UNSET not available everywhere

6 years agomove code to where it's used
Alan T. DeKok [Thu, 12 Dec 2019 16:21:53 +0000 (11:21 -0500)] 
move code to where it's used

6 years agoadd local free list for MD5 contexts
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.

6 years agodon't call snprintf() in the hot path.
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.

6 years agoInitialise is_closed to the correct value
Arran Cudbard-Bell [Thu, 12 Dec 2019 13:14:41 +0000 (20:14 +0700)] 
Initialise is_closed to the correct value

6 years agoAdd basic I/O throughput test
Arran Cudbard-Bell [Thu, 12 Dec 2019 12:19:05 +0000 (19:19 +0700)] 
Add basic I/O throughput test

6 years agoMake trunk more permissive regarding what callbacks need to be provided
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

6 years agoTypos
Arran Cudbard-Bell [Thu, 12 Dec 2019 10:27:46 +0000 (17:27 +0700)] 
Typos

6 years agoAdd redis pipeline code
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.

6 years agoPass around connection callbacks and configurations in structs
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

6 years agoAdd a 'ignore a response' mini-API to the Redis I/O code
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.

6 years agoChange how we deal with freeing connections
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.

6 years agoAllow request states to be signalled from outside of the demuxer
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.

6 years agomemcpy the trunk config
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.

6 years agoEnqueue return codes should be public...
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:57:21 +0000 (14:57 +0700)] 
Enqueue return codes should be public...

6 years agoAllow watchers to be removed by handlers without causing catastrophic failure
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.

6 years agoDocs
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:55:05 +0000 (14:55 +0700)] 
Docs

6 years agoEverything else uses entry...
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:54:50 +0000 (14:54 +0700)] 
Everything else uses entry...

6 years agoShift come code around
Arran Cudbard-Bell [Thu, 12 Dec 2019 07:54:29 +0000 (14:54 +0700)] 
Shift come code around

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