Hi List, WiIly, Thierry, Emeric, Tried a little patch for my 100% cpu usage issue. https://www.mail-archive.com/haproxy@formilux.org/msg29762.html
It stops the cpu usage reported in above thread.. Just wondering if there are any culprits that might now 'hang' a lua applet instead.?.
I think this issue was introduced here (haven't tried to bisect it..): http://git.haproxy.org/?p=haproxy.git;a=commitdiff;h=253e53e661c49fb9723535319cf511152bf09bc7
Possibly due to some TICK_ETERNITY that shouldn't actually wait a eternity.?.
Thoughts are welcome :) Or perhaps the 'all okay' so it can be merged.? If commit message needs tweaking please feel free to do so :). Regards, PiBa-NL (Pieter)
From a0b01cdc8ccc4ae95c5c03bc98bf859b6115d2f9 Mon Sep 17 00:00:00 2001 From: PiBa-NL <piba.nl....@gmail.com> Date: Wed, 2 May 2018 22:27:14 +0200 Subject: [PATCH] BUG/MINOR, lua/sockets, make lua tasks that are waiting for io suspend until woken up by the a corresponding event. If a lua socket is waiting for data it currently spins at 100% cpu usage. This because the TICK_ETERNITY returned by the socket is ignored when setting the 'expire' time of the task. Fixed by removing the check for yields that return TICK_ETERNITY. This should be backported to at least 1.8. --- src/hlua.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hlua.c b/src/hlua.c index 32199c9..4c56409 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -5552,8 +5552,7 @@ static struct task *hlua_process_task(struct task *task) case HLUA_E_AGAIN: /* co process or timeout wake me later. */ notification_gc(&hlua->com); - if (hlua->wake_time != TICK_ETERNITY) - task->expire = hlua->wake_time; + task->expire = hlua->wake_time; break; /* finished with error. */ -- 2.10.1.windows.1