Bug 1126725 - radiusd silently fails when start_servers is higher than max_servers
Summary: radiusd silently fails when start_servers is higher than max_servers
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: freeradius
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Nikolai Kondrashov
QA Contact: Eduard Benes
URL:
Whiteboard:
Depends On: 1120234
Blocks: 1146828
TreeView+ depends on / blocked
 
Reported: 2014-08-05 07:22 UTC by David Spurek
Modified: 2019-03-06 01:30 UTC (History)
3 users (show)

Fixed In Version: freeradius-3.0.4-0.1.rc2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1146828 (view as bug list)
Environment:
Last Closed: 2015-03-05 10:20:25 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0438 normal SHIPPED_LIVE freeradius bug fix and enhancement update 2015-03-05 14:50:53 UTC

Description David Spurek 2014-08-05 07:22:48 UTC
Description of problem:
radiusd silently fails when start_servers is higher than max_servers

systemctl status radiusd.service -l
radiusd.service - FreeRADIUS high performance RADIUS server.
   Loaded: loaded (/usr/lib/systemd/system/radiusd.service; disabled)
   Active: failed (Result: exit-code) since Tue 2014-08-05 09:12:31 CEST; 3min 34s ago
  Process: 29218 ExecStart=/usr/sbin/radiusd -d /etc/raddb (code=exited, status=1/FAILURE)
  Process: 29215 ExecStartPre=/usr/sbin/radiusd -C (code=exited, status=0/SUCCESS)
  Process: 29213 ExecStartPre=/bin/chown -R radiusd.radiusd /var/run/radiusd (code=exited, status=0/SUCCESS)

Aug 05 09:12:31 x86-64-v02.lab.eng.brq.redhat.com systemd[1]: radiusd.service: control process exited, code=exited status=1
Aug 05 09:12:31 x86-64-v02.lab.eng.brq.redhat.com systemd[1]: Failed to start FreeRADIUS high performance RADIUS server..
Aug 05 09:12:31 x86-64-v02.lab.eng.brq.redhat.com systemd[1]: Unit radiusd.service entered failed state.


/var/log/radius/radius.log doesn't contain useful information, it ends with:
....
Tue Aug  5 09:16:49 2014 : Info: Loaded virtual server <default>
Tue Aug  5 09:16:49 2014 : Info: Loaded virtual server default
Tue Aug  5 09:16:49 2014 : Info: Loaded virtual server inner-tunnel


If I increase debug level, it doesn't help (add 'debug_level = 2' at the end of radiusd.conf.

/var/log/radius/radius.log contains only following log
...
} # server inner-tunnel
 thread pool {
        start_servers = 6
        max_servers = 4
        min_spare_servers = 3
        max_spare_servers = 10
        max_requests_per_server = 0
        cleanup_delay = 5
        max_queue_size = 65536
        auto_limit_acct = no
 }
Thread spawned new child 1. Total threads in pool: 1
Thread 1 waiting to be assigned a request
Thread spawned new child 2. Total threads in pool: 2
Thread 2 waiting to be assigned a request
Thread spawned new child 3. Total threads in pool: 3
Thread 3 waiting to be assigned a request
Thread spawned new child 4. Total threads in pool: 4
Thread spawn failed.  Maximum number of threads (4) already running.
Thread 4 waiting to be assigned a request


Version-Release number of selected component (if applicable):
freeradius-3.0.1-6.el7

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
radiusd fails but we don't know the reason

Expected results:
systemctl status radiusd.service or at least /var/log/radius/radius.log contain the reason of the fail

Additional info:

Comment 1 David Spurek 2014-08-05 07:29:05 UTC
If I run 'radiusd -X' then server is started, this is strange. 
Should it fail too?
Are checks processed differently when I run 'radiusd -X' or 'service radiusd start'?

Comment 2 Nikolai Kondrashov 2014-08-06 13:15:25 UTC
"radiusd -X" starts successfully, because it doesn't attempt to start any threads, by design, to make debugging easier.

A check for start_servers < max_servers was added in a commit included into v3.0.2 release: https://github.com/FreeRADIUS/freeradius-server/commit/f12f98d98365bc23a96ef1fe643d19cb28837827

Comment 3 Nikolai Kondrashov 2014-08-06 13:18:08 UTC
It should say "start_servers <= max_servers" in Comment #2, of course.

Comment 10 errata-xmlrpc 2015-03-05 10:20:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0438.html


Note You need to log in before you can comment on or make changes to this bug.