Problem with Lockfile: Double locked



  • Hello,

    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[63511]: : Captiveportal unlocked.
    Jul 18 02:51:46 php[63320]: /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.

    Any ideas?

    Thank you.

    manfred



  • A workaround for now that will automatically remove the lock file after it is older than 3 minutes.
    http://forum.pfsense.org/index.php/topic,8152.msg57899.html#msg57899


Log in to reply