Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
SQLite files remain open if unlang query has no results #1879
Comments
|
Fixed by 35e03ea |
arr2036
closed this
Jan 12, 2017
pauldekkers
commented
Jan 12, 2017
|
Unfortunately, a clean build of v3.0.x now fails for me (on Ubuntu 16.04)
gives:
|
|
fixed |
pauldekkers
commented
Jan 12, 2017
|
Thanks! This fixed the open files problems! I still wonder why I see |
|
Mm, pushed some more changes. There was no unified return code for "no more rows" between the drivers. |
pauldekkers
commented
Jan 13, 2017
|
But does it need to error when there's no rows? (I myself don't consider that an error per se; could be there's no particular user... no query error or database failure.) |
|
I've pushed a fix. It's now just a debug message. |
pauldekkers commentedJan 12, 2017
Issue type
Defect/Feature description
I'm running out of file descriptors by using ${sql queries to a SQLite database (with default schema) if the query has no result set.
If the query result isn't empty, everything is fine.
The error
is logged as soon as the query-set is empty.
... and obviously as soon as I run out of descriptors this gives me
I noticed the issue on FreeRADIUS 3.0.x (git, 3.0.13 at the time of writing) and 3.0.12
It could be I'm not using the query/unlang statement as I should.
How to reproduce issue
The following unlang code in
authorizein my default server.If I replace %{User-Name} for a user that always matches, the issue does not occur.
There's not a lot of traffic actually, but after 10 minutes I can see users.db is open > 100 times via lsof
Output of
[radiusd|freeradius] -Xshowing issue occurring