Problem with Lockfile: Double locked
soisses last edited by
since two weeks my pfsense box works fine. It is a network with about 300 clients, 20-100 are online at the same time. The captive portal is connected to a freeradius server, the usermanagement is done with a Mysql-Server. So far so good.
I noticed that there are same "ghost sessions". In the table "radacct" are sessions that start but never end. "ipfw list" on the pfsense shows me that the clients are able to transfer data, but they are not listed in the status_captiveportal page.
I added two lines in /etc/inc/captiveportal.inc in the functions "captiveportal_lock" and "captiveportal_unlock" , and now everytime when the captive portal is locked und unlocked I see a message in system log. Here is the problem:
Jul 18 02:51:46 php: : Captiveportal unlocked.
Jul 18 02:51:46 php: /index.php: Captiveportal unlocked.
Jul 18 02:51:46 php: /index.php: Captiveportal locked after 0 seconds.
Jul 18 02:51:46 php: : Captiveportal locked after 0 seconds.
Jul 18 02:47:45 php: : Captiveportal unlocked.
Jul 18 02:47:45 php: : Captiveportal locked after 0 seconds.
The lock file is double locked, on 02:51:46 from captiveportal_prune_old() and from the loginpage. The lock mechanism does not work in this case and the session data gets lost, because the captiveportal_prune_old writes after the login page.
cybrsrfr last edited by
A workaround for now that will automatically remove the lock file after it is older than 3 minutes.