[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>
  

Comments

Gert Doering July 31, 2026, 10:05 a.m. UTC | #1
There has been some debate on "is this really necessary" (after we found
the reason why this test sometimes produced stuck-and-looping openvpn
processes) - I claim it is, test code needs to be robust against 
misbehaving OpenVPN binaries-under-test, and this adds just a bit
(according to BB, without side effects).

Your patch has been applied to the master branch.

commit d9ae1f0fa43f8ac2551f048f90f37a110a9ecaa4
Author: Gert Doering
Date:   Thu Jul 30 22:46:37 2026 +0200

     t_server_null: run server processes with 'ulimit -t 300'

     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
     Message-Id: <20260730204642.27250-1-gert@greenie.muc.de>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg38088.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering
  

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 \