Project

General

Profile

Actions

Bug #3629

closed

URL alias update process hangs waiting for lock

Added by Chris Buechler almost 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
Rules / NAT
Target version:
Start date:
04/29/2014
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.1.x
Affected Architecture:

Description

URL alias updates can hang indefinitely waiting for a lock because they call write_config() with a config lock held. It then gets stuck in write_config() because it can't lock the config to write it.

I'm not 100% sure if this is the complete proper fix, but it works - line 1885 in pfsense-utils.inc RELENG_2_1, unlock($lockkey), move that up to line 1883 just above the "if ($updated)", and it works fine.

The same code exists (with diff line numbers) in master as well so I presume the issue is the same there, though I haven't tried on anything but 2.1.x.

Actions #1

Updated by Chris Buechler almost 10 years ago

patch for anyone that needs to fix 2.1.x versions (only tested on 2.1.2)

diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 065b1e3..c317a43 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1880,9 +1880,9 @@ function update_alias_url_data() {
                        }
                }
        }
+       unlock($lockkey);
        if ($updated)
                write_config();
-       unlock($lockkey);
 }

 function process_alias_unzip($temp_filename) {
Actions #2

Updated by Ermal Luçi almost 10 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Ermal Luçi almost 10 years ago

Actions #4

Updated by Chris Buechler over 9 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF