-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cfg] can not cleanup after unsuccessful start #918
Comments
Somehow the issue is hard to reproduce, even on the old code as of #76 fixes. To emulate the issue I used following patch against current master (25fb836): diff --git a/tempesta_fw/sock_srv.c b/tempesta_fw/sock_srv.c
index cc4ea72..81223a3 100644
--- a/tempesta_fw/sock_srv.c
+++ b/tempesta_fw/sock_srv.c
@@ -2158,6 +2158,7 @@ tfw_sock_srv_start(void)
list_for_each_entry(sg_cfg, &sg_cfg_list, list) {
if ((r = tfw_cfgop_start_sg_cfg(sg_cfg)))
return r;
+ return -ENOMEM;
tfw_srv_loop_sched_rcu();
} Config file is
and there is no listening server on port 9090. Tempesta starts with following log:
This is the first problem: we don't cleanup the system state after unsuccessful start. Since the state is dirty, I run
Maybe it's invalid action, but we should not crash anyway. This is the second problem. Next I reboot, try to start the same patched Tempesta FW, but this time us Anyway, the original problem is exactly:
-- we should not see the message and the configuration just must be cleared properly. |
Fix #918: release connection if its' reference count is zero.
Conditions
Load too many server groups using the script from #76 to exhaust system memory on Tempesta FW start (it's good to use VM with small memory to reproduce the problem quickly). Need fixed #908 to avoid deadlock on stopping modules.
Description
In the conditions described above
sock_srv
start terminates with-ENOMEM
error code and the system starts to stop all modules, but hangs intfw_sg_wait_release()
. It seems groups unregistering doesn't work properly.The text was updated successfully, but these errors were encountered: