Skip to contentSkip to conversation

Change in openvpn[master]: t_server_null: run server processes with 'ulimit -t 300'

Openvpn-devel cron2 (Code Review) 1 participant 2 messages Oct 4, 2024 – Nov 3, 2024 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1728025749000.I7e5ac9b4a8594251c3b5c4655f9d74b021950098@...2715...

#1 lore raw

Attention is currently required from: flichtenheld, plaisthos.

Hello plaisthos, flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/777?usp=email

to review the following change.

Change subject: t_server_null: run server processes with 'ulimit -t 300'
......................................................................

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

"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
---
M tests/t_server_null_server.sh

1 file changed, 4 insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/77/777/1

tests/t_server_null_server.sh +4 -0
index 10bb44b..bcbd002 100755
@@ -8,6 +8,10 @@
     status="${server_name}.status"
     pid="${server_name}.pid"
 
+    # 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
         rm -f "${status}" "${log}" "${pid}"
         "${server_exec}" \

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/777?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7e5ac9b4a8594251c3b5c4655f9d74b021950098
Gerrit-Change-Number: 777
Gerrit-PatchSet: 1
Gerrit-Owner: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange

#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, plaisthos.

Hello flichtenheld, plaisthos,

I'd like you to reexamine a change. Please visit

    http://gerrit.openvpn.net/c/openvpn/+/777?usp=email

to look at the new patch set (#2).

Change subject: t_server_null: run server processes with 'ulimit -t 300'
......................................................................

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

"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
---
M tests/t_server_null_server.sh

1 file changed, 4 insertions(+), 0 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/77/777/2

tests/t_server_null_server.sh +4 -0
index acf8479..40ce94b 100755
@@ -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 \

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/777?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I7e5ac9b4a8594251c3b5c4655f9d74b021950098
Gerrit-Change-Number: 777
Gerrit-PatchSet: 2
Gerrit-Owner: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newpatchset