rlm_sql_null driver sometimes writes truncated lines

Alan DeKok aland at deployingradius.com
Fri Mar 23 16:29:41 CET 2018

On Mar 8, 2018, at 3:25 PM, Shawn Asmussen <shawn.asmussen at gmail.com> wrote:
> I'm currently using the rlm_sql_null driver to write accounting updates to
> a flat file, which are then sent up to an external database using
> radsqlrelay. On a very small percentage of the records (Maybe once out of
> every million records or so), one of the lines gets truncated in the output
> file, causing it to be merged with the next record. Here is one such
> example. About halfway through the line, you can see where the first sql
> statement is only partially written, and then the next UPDATE starts all on
> the same line (AND AcctStopTime UPDATE radacct). radsqlrelay does not
> handle this gracefully. When it fails to execute the invalid SQL it just
> goes into an infinite loop, trying to execute that same SQL statement over
> and over. Given the infrequency that it happens, I'm not sure that it would
> feasible to get debug output from radiusd when it happens, although I'm
> open to suggestions on how to capture any useful info. Wondering if anybody
> has seen anything like before? I'm currently running the
> freeradius-3.0.13-6.el7.x86_64 rpm from the EPEL repo for CentOS 7.

  Try the v3.0.x branch from github.  We've found and fixed a few issues with locking since 3.0.13.

  Alan DeKok.

More information about the Freeradius-Users mailing list