-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[defect]: Freeradius service crashes when use dhcp module #5316
Comments
This isn't a DHCP issue. The back-end is slow, and isn't responding to FreeRADIUS. But the client keeps sending DHCP packets, and eventually the server gets into a bad state, and crashes. The simple fix is to ensure that the back-end is actually replying to the server. A longer fix is to read the guidelines in the github issue template, and send over a full gdb back trace. We can then try to see what's going on. But no amount of bug fixing in FreeRADIUS will make your SQL server faster. The first thing you should do is to find out why the SQL server is slow, and fix that. |
Thanks for your reply. To reduce the load on SQL , I use cache memcached. But the result is the same. |
If memcache doesn't help, then the issue is elsewhere. The default configuration has no issue replying to 10K packets/s. If your local configuration can't handle that, then something in your local configuration is breaking the server. You will have to go through the configuration to see what has been changed from the defaults, and then find out which piece is taking a long time. We can take a look at fixing the crash, but it won't have any meaningful change for your system. FreeRADIUS will still be blocked, and will be unable to respond to packets. i.e. in practice, the difference between "down due to crash" and "down due to something blocking the server" is essentially zero. Fix the underlying problem. Which is not the crash. |
Hello, this problem arose because I used |
Hello, I was able to solve the problem by changing Troubleshooting: radiusd.conf
/mods-enabled/dhcp_sql
I connect one test host and block the database using iptables radius.log Tue Jun 4 12:04:19 2024 : Debug: (21) Received code 1027 Id 788269544 from 10.10.70.6:67 to 192.168.29.9:67 length 367 |
What type of defect/bug is this?
Crash or memory corruption (segv, abort, etc...)
How can the issue be reproduced?
I used the freeradius module DHCP for my clients. My service crashes several times a day.
OS=Debian10
freeradius=3.0.26
database=oracle
clients=80k
At first, I received no error logs, so I thought it was either the database or the driver. Changing Oracle to Postgresql didn't the solve the problem.
Then decided to upgrade Debian10 to Debian12, also didn't the solve the problem.
When I use radiusd -X > /tmp/test.log there are no failures. As I understand it, this is because the service operates in a single-threaded mode
Finally, I rebuilt with the option: --with-experimental-modules --enable-developer, and received a log Error: ASSERT FAILED src/main/threads.c[679]: request->magic == REQUEST_MAGIC
My Config
cat radiusd.conf
thread pool {
start_servers = 50
max_servers = 200
min_spare_servers = 5
max_spare_servers = 15
}
cat mods-enabled/sql
sql {
}
cat sites-enabled/dhcp
dhcp DHCP-Discover {
}
}
dhcp DHCP-Request {
}
Log output from the FreeRADIUS daemon
Relevant log output from client utilities
No response
Backtrace from LLDB or GDB
No response
The text was updated successfully, but these errors were encountered: