[Openvpn-devel,v2] t_server_null: run server processes with 'ulimit -t 300'

Message ID 20260730204642.27250-1-gert@greenie.muc.de
State New
Headers
Series [Openvpn-devel,v2] t_server_null: run server processes with 'ulimit -t 300' |

Commit Message

Gert Doering July 30, 2026, 8:46 p.m. UTC
  "ulimit -t" will hard limit the usable CPU time for any process started
to the specified number of seconds.  So if we have a stuck-and-looping
server process (which was observed frequently) this will make sure
the situation will fix itself eventually.

Change-Id: I7e5ac9b4a8594251c3b5c4655f9d74b021950098
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne-openvpn@rfc2549.org>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/777
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/777
This mail reflects revision 2 of this Change.

Signed-off-by line for the author was added as per our policy.

Acked-by according to Gerrit (reflected above):
Arne Schwabe <arne-openvpn@rfc2549.org>
  

Patch

diff --git a/tests/t_server_null_server.sh b/tests/t_server_null_server.sh
index acf8479..40ce94b 100755
--- a/tests/t_server_null_server.sh
+++ b/tests/t_server_null_server.sh
@@ -11,6 +11,10 @@ 
     # Allow reading this file even umask values are strict
     touch "$log"
 
+    # limit CPU time of processes to "5 minutes"
+    # (so a stuck-and-looping process will auto-terminate)
+    ulimit -t 300
+
     if [ -z "${RUN_SUDO}" ]; then
         "${server_exec}" \
          $server_conf \