Bug #3629
closedURL alias update process hangs waiting for lock
100%
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.
Updated by Chris Buechler over 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) {
Updated by Ermal Luçi over 10 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 26d060bc8b885ec839de94cc18cfd7913662918f.
Updated by Ermal Luçi over 10 years ago
Applied in changeset 2392ed60f3d1efa9f5a9efd6c583e4de3bba0afd.
Updated by Chris Buechler almost 10 years ago
- Status changed from Feedback to Resolved