rlm_sql_null holding locks and hanging radsqlrelay.

Alan DeKok aland at deployingradius.com
Wed Aug 1 22:28:09 CEST 2018


On Aug 1, 2018, at 4:22 PM, Matthew Schumacher <matt.s at aptalaska.net> wrote:
> 
> I'm not sure what the deal with this is, but suddenly I'm struggling to make radsqlrelay work.  Strace shows that it's waiting on a lock:
> 
> rename("/var/log/radius/radacct/sql-relay", "/var/log/radius/radacct/sql-relay.work") = 0
> open("/var/log/radius/radacct/sql-relay.work", O_RDWR) = 4
> ioctl(4, TCGETS, 0x7ffdda2134c0)        = -1 ENOTTY (Inappropriate ioctl for device)
> lseek(4, 0, SEEK_CUR)                   = 0
> fstat(4, {st_mode=S_IFREG|0640, st_size=343, ...}) = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> fcntl(4, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}
> 
> lslocks shows that radiusd has the file locked and radsqlrelay is waiting for it:

  Yup.

> radsqlrelay     13623 POSIX 343B WRITE* 0     0          0 /var/log/radius/radacct/sql-relay.work
> radiusd         13639 POSIX 343B WRITE  0     0          0 /var/log/radius/radacct/sql-relay.work
> 
> Any ideas on how to resolve this?  Shouldn't rlm_sql_null release the lock when it's done writing?

  Grab the code from git, v3.0.x branch.  Matthew Newton found a tiny but rather shocking little bug.  :(

  Alan DeKok.




More information about the Freeradius-Users mailing list