server doesnt die when 1812 already in use #1709

Open
alanbuxey opened this Issue Aug 30, 2016 · 4 comments

Projects

None yet

2 participants

@alanbuxey
Member
alanbuxey commented Aug 30, 2016 edited

Issue type

  • Questions about the server or its usage should be posted to the users mailing list.
  • Remote security exploits MUST be sent to security@freeradius.org.
  • Defect - Crash or memory corruption.
  • Defect - Non compliance with a standards document, or incorrect API usage.
  • Defect - Unexpected behaviour (obvious or verified by project member).
  • Feature request.

See here for debugging instructions.

Defect/Feature description

radiusd doesnt quit out if something is already on 1812 but not closed properly (eg a half-hung radiusd -fxx -l stdout that hasnt died properly

the new instance just prints

radiusd: #### Opening IP addresses and Ports ####

however, when a'kill -9 xxxx' of the other older not-really dead server is undertaken, the output then continues (even if its been waiting minutes....)

detail (/dev/shm/detail): Polling for detail file
detail (/dev/shm/detail): Detail listener state unopened waiting 10.063912 sec
detail (/dev/shm/detail): Polling for detail file
detail (/dev/shm/detail): Detail listener state unopened waiting 9.760936 sec
detail (/dev/shm/detail): Polling for detail file
detail (/dev/shm/detail): Detail listener state unopened waiting 10.071683 sec
detail (/dev/shm/detail): Polling for detail file
detail (/dev/shm/detail): Detail listener state unopened waiting 10.119596 sec
detail (/dev/shm/detail): Polling for detail file
detail (/dev/shm/detail): Detail listener state unopened waiting 10.241231 sec
detail (/dev/shm/detail): Polling for detail file
detail (/dev/shm/detail): Detail listener state unopened waiting 10.146130 sec
Listening on command file /var/run/radiusd/radiusd.sock
Listening on detail file /dev/shm/detail as server buffered-sql
Listening on status address 127.0.0.1 port 18121 bound to server status
Listening on auth address * port 1812 bound to server lboro
Listening on acct address * port 1813 bound to server lboro
Listening on auth address :: port 1812 bound to server lboro
Listening on acct address :: port 1813 bound to server lboro
Listening on proxy address * port 56194
Listening on proxy address :: port 56898
Ready to process requests

note all the detail listener updates that suddenly get printed out - server stuck in some loop and debug output not flushed until the "Listening on command file /var/run/radiusd/radiusd.sock" gets printed?

How to reproduce issue

have a FR 4.x with lots of LDAP/REDIS/SQL connections so that CTRL-C doesnt work correctly,
use CRTL-C so server partially dies off, then run radiusd -X again

alan

@arr2036
Member
arr2036 commented Aug 30, 2016

Backticks... go back `

@arr2036
Member
arr2036 commented Aug 30, 2016

Or it's doing a blocking bind operation

@arr2036
Member
arr2036 commented Aug 31, 2016

Could you run it under gdb/lldb and cntrl-c out to figure out where it's blocking? I've not seen this behaviour on OSX, so it's probably linux specific.

@arr2036
Member
arr2036 commented Aug 31, 2016

...and regarding the not exiting properly, that will be going away when the connection pool is removed/extensively modified for v4.0.x.

It'll be a hardcoded 1:1 mapping of connection to worker thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment