Re: [EXT] [EXT] Re: Regarding the new dark mode dashboard in 2.5

2022-03-08 Thread Thierry Fournier
late, I took the one you posted on the issue and that Ciprian > confirmed. No big deal anyway. Hi guys, Thanks for the patch. Feel free to suggest colors, I have no artistic taste :-) I just open the dark-mode way. Thierry

Re: [PATCH] BUG/???: lua: Add missing call to RESET_SAFE_LJMP in hlua_filter_new()

2021-09-14 Thread Thierry Fournier
n when we play with longjmp, MEDIUM is the right level for a patch. Thierry

Undesirable space in a metric "Unstoppable Jobs"

2021-03-02 Thread Thierry Fournier
gest a rename with "_" in place of space. Thierry

Lua error message patch

2020-08-16 Thread Thierry Fournier
Hi list, A little patch to improve verbosity of some Lua errors. A+ Thierry 0001-MINOR-hlua-Add-error-message-relative-to-the-Channel.patch Description: Binary data

Re: [PATCH] MAJOR: contrib: porting spoa_server to support python3

2020-05-11 Thread Thierry Fournier
-server is newer and I guess it is not so used, so I should be a good idea to move to python3. So, its ok for me. Thierry > On 11 May 2020, at 10:19, Willy Tarreau wrote: > > CCing Thierry as I suspect he didn't notice it :-) > > Thierry, I'm just seeking a simple instruction such

Re: [PATCH v2 0/3] MINOR: lua: Add lua-prepend-path configuration option

2020-01-14 Thread Thierry Fournier
> On 14 Jan 2020, at 13:53, Willy Tarreau wrote: > > On Tue, Jan 14, 2020 at 01:46:55PM +0100, Thierry Fournier wrote: >> Hi, It have two default path in the library path: >> >> - path for lua libraries >> - cpath for loading lua C libraries. >>

Re: [PATCH v2 0/3] MINOR: lua: Add lua-prepend-path configuration option

2020-01-14 Thread Thierry Fournier
> On 14 Jan 2020, at 07:08, Willy Tarreau wrote: > > On Sun, Jan 12, 2020 at 01:55:38PM +0100, Tim Duesterhus wrote: >> Willy, >> Thierry, >> Vincent, >> >> I've just prepared a new version of my proposal with the following >> differences: >&g

Re: Lua: forcing garbage collector after socket i/o

2020-01-11 Thread Thierry Fournier
propose if you agree is that I'll merge the patch into 2.2 next > week. This will give us quite some time to observe if it requires more > adjustments. And then you can pick it and apply it to your local tree > in order to save some resources. This is a good performance improvement. Easy and efficient ! Thierry

Re: [PATCH] MINOR: lua: Add lua-prepend-path configuration option

2020-01-10 Thread Thierry Fournier
y opinion about this. But I extend the problem: There are not only package.path, but also package.cpath which provides default location for .so libraries. https://www.lua.org/manual/5.3/manual.html#pdf-package.cpath Thierry

Re: Lua: forcing garbage collector after socket i/o

2020-01-10 Thread Thierry Fournier
gt;> requests/sec 8635.0402 >> real 0m10.969s >> user 0m0.744s >> sys 0m1.116s > > OK this is promising, thanks for the tests! > >> Most of the time the CPU is the bottleneck and it may be ok to consume >> little bit more memory on dedicated servers running

Re: Lua: forcing garbage collector after socket i/o

2020-01-09 Thread Thierry Fournier
> On 9 Jan 2020, at 10:47, Willy Tarreau wrote: > > Hi Thierry, > > On Thu, Jan 09, 2020 at 10:34:35AM +0100, Thierry Fournier wrote: >> I'm remember: the execution of the GC were the only way to close TCP >> connexions >> because in some cases the object pro

Re: Lua: forcing garbage collector after socket i/o

2020-01-09 Thread Thierry Fournier
the maximum of available connexion, and the process were blocked. The flag forcing the GCC is set only is we use a socket. Maybe we try to include new option "tune.lua.forced-gc”. br, Thierry — Thierry Fournier Web Performance & Security Expert m: +33 6 68 69 21 85 | e: thierry.fourn...@

Re: Lua + shared memory segment

2019-11-08 Thread Thierry Fournier
() ... -- get response response = network:read() -- store in context ctx = {} ctx[‘message’] = response txn:set_ctx(ctx) end) core.register_fetches("get_redis_result", function(txn) a = txn:get_ctx() return a[‘message'] end) Thierry >

Re: [PATCH 2/2] BUG/MINOR: lua: Make the arrays in the list of headers 1-indexed

2019-09-30 Thread Thierry Fournier
ot just a matter of setting +1 on >a pointer, but I guess that we have hooks behind the curtains which >intercept this "headers" thing. > > There may also be other solutions, but definitely an API change needs > to pass through something visible so that affected code at some point > has to be fixed if we want to get rid of a past mistake. Hi, hard question because everyone has right :-) I vote for a new function which return an array of header starting at the index 1. Thierry

Re: Creating a health check in Lua?

2019-05-18 Thread Thierry Fournier
Hi, I not have change between 1.7 and 2.0dev for the functions you use. Thierry > On 2 May 2019, at 09:48, Gil Bahat wrote: > > Hi, > > last I checked up on this, it was almost 2 years ago and it was haproxy 1.7.7 > . has this changed perhaps for recent haproxy ver

Re: [PATCH] new contrib proposal / exec Python & Lua scripts

2019-05-12 Thread Thierry Fournier
Hi Willy, Great ! I thinked this patch for the trash. You can merge this work. The main goal is providing an environment to process spoe with lua or python. Thierry Le 11 mai 2019 11:43:14 Willy Tarreau a écrit : Hi Thierry, I just stumbled upon the patch series below you sent a while

Re: error in haproxy 1.9 using txn.req:send in lua

2019-02-21 Thread Thierry Fournier
--> [read response in lua.xxx] --> [modify reponse in lua.xxx] --> [forward response ] --> frontend a --> send reponse to client It is a little bit ugly, and it eat manny memory and performances, but it works ! BR, Thierry > On 13 Feb 2019, at 11:18, Laurent Penot

Re: Seamless reloads: file descriptors utilization in LUA

2019-01-19 Thread Thierry Fournier
is performance and resources saving first ! BR, Thierry > On 16 Jan 2019, at 08:59, Wert wrote: > >> CC'ing Thierry: as this has come on this discourse, can we have your >> opinion about the FD's in LUA and howto best handle ulimit? > > >> Apologies for the d

[THANKS] Re: Deadlock lua when calling register_task inside action function

2019-01-07 Thread Thierry Fournier
great ! Willy, could you apply the attached patch ? thanks Thierry 0001-BUG-MEDIUM-dead-lock-when-Lua-tasks-are-trigerred.patch Description: Binary data > On 6 Jan 2019, at 19:11, Thierry Fournier > wrote: > > Hi, > > Thanks for the bug report. > Your "u

[PATCH] Re: Question re lua and tcp content

2019-01-06 Thread Thierry Fournier
Hi, Thanks fir the bug report. It is fixed by attached patch. Willy, could you merge this patch ? Thanks, Thierry 0001-BUG-MINOR-bad-args-are-returned-for-Lua-actions.patch Description: Binary data > On 31 Dec 2018, at 18:53, FRANKS, Andy (SHREWSBURY AND TELFORD HOSPITAL NHS >

Re: Deadlock lua when calling register_task inside action function

2019-01-06 Thread Thierry Fournier
Hi, Thanks for the bug report. Your "uneducated guess" was right. Could you test the patch in attachment ? Thanks Thierry 0001-BUG-MEDIUM-dead-lock-when-Lua-tasks-are-trigerred.patch Description: Binary data > On 2 Jan 2019, at 01:40, Flakebi wrote: > > Hi, > &

Re: [PATCH] MEDIUM: lua: Add stick table support for Lua

2018-09-27 Thread Thierry Fournier
I Adis, Sorry for the delay, I processed a quick review, and all seems to be ok for me! BR, Thierry > On 27 Sep 2018, at 14:02, Adis Nezirovic wrote: > > On Mon, Sep 03, 2018 at 12:09:47PM +0200, Adis Nezirovic wrote: >> Hi Thierry, >> >> Have you had th

Re: OpenSSL and per-context option problem

2018-09-17 Thread Thierry Fournier
— Thierry Fournier Web Performance & Security Expert m: +33 6 68 69 21 85 | e: thierry.fourn...@ozon.io w: http://www.ozon.io/| b: http://blog.ozon.io/ > On 17 Sep 2018, at 12:45, Emmanuel Hocdet wrote: > > > Hi Thierry, > >> Le 15 sept. 2018

OpenSSL and per-context option problem

2018-09-15 Thread Thierry Fournier
parser execution would be a good idea ? BR, Thierry

Re: [PATCH] BUG/MAJOR: thread: lua: Wrong SSL context initialization.

2018-08-30 Thread Thierry Fournier
Hi Pieter, Your patch makes sense ! Good catch. Willy, could you apply ? Thierry > On 29 Aug 2018, at 21:29, PiBa-NL wrote: > > Op 29-8-2018 om 14:29 schreef Olivier Houchard: >> On Wed, Aug 29, 2018 at 02:11:45PM +0200, Frederic Lecaille wrote: >>> This patch is

Re: [PATCH] MEDIUM: reset lua transaction between http requests

2018-08-24 Thread Thierry Fournier
> On 24 Aug 2018, at 04:19, Willy Tarreau wrote: > > Hi Thierry, > > On Thu, Aug 23, 2018 at 09:37:43AM +0200, Thierry Fournier wrote: >> Hi, >> >> Your patch make sense, that's the right appoach, but I have a doubt about >> the place to use for do

Re: [PATCH] MEDIUM: lua: Add stick table support for Lua

2018-08-23 Thread Thierry Fournier
sappear and the ebmb_next() can return wrong memory. > I was under impression that we only have to acquire lock and increment > ref_cnt (so we can be sure our current node n is not deleted) > ebmb_next() is called only when we're holding lock, first and every > other iteration, i.e. > > HA_SPIN_LOCK(STK_TABLE_LOCK, >lock); > eb = ebmb_first(>keys); > for (n = eb; n; n = ebmb_next(n)) { > ... > ts->ref_cnt++; > HA_SPIN_UNLOCK(STK_TABLE_LOCK, >lock); > ... > > HA_SPIN_LOCK(STK_TABLE_LOCK, >lock); > } > > Or I didn't get your point? ok, you probably right. Thierry

Re: BUG: Tw is negative with lua sleep

2018-08-23 Thread Thierry Fournier
>> This is built from the commit before current master: d8fd2af >>>> >>>> -Patrick >>> >> >> The patch attached to this mail fixes this issue at least for %TR field. >> >> But I am not sure at all it is correct or if there is no remaining issues. >> For instance the LUA tcp callback also updates the tv_request log field. >> >> So, let's wait for Thierry's validation. Hi, Applets should be considered as server independent from HAProxy, so applet should not change HAProxy information like log times. I guess that your patch works, and the function hlua_applet_tcp_fct() should follow the same way. unfortunately I do not have free time to test all of this changes. Thierry >> Regards. >> > > Any update on this? > > -Patrick >

Re: [PATCH] MEDIUM: reset lua transaction between http requests

2018-08-23 Thread Thierry Fournier
between each http request in a keepalive session. With http2 I guess that this behavior change. So, Willy, do you have an opinion on the place to use to perform the Lua reinit ? Thierry > On 22 Aug 2018, at 16:09, Patrick Hemmer wrote: > > Not sure if this is the right approach, but this

Re: BUG: LUA txn:get_priv() scoped to connection, not transaction

2018-08-22 Thread Thierry Fournier
data = 0 > end > data = data + 1 > print(string.format("set to %d", data)) > txn:set_priv(data) > end) BR, Thierry > On 22 Aug 2018, at 05:57, Patrick Hemmer wrote: > > There is a bug in the current stable haproxy (

Re: [PATCH] MEDIUM: lua: Add stick table support for Lua

2018-08-21 Thread Thierry Fournier
at smp.flags is used uninitialized. Maybe you should apply this change: -smp.flags |= SMP_F_CONST; +smp.flags = SMP_F_CONST; l.365, 369: The user doesn't have context about the error. there are the first entry of the table, the second ? Which operator doesn't exists ? L.380, 384: Whic

Re: [PATCH] MEDIUM: lua: Add stick table support for Lua

2018-08-21 Thread Thierry Fournier
teger", 0, 4 }, The lua_pushinteger function takes a lua_Integer which is defined as known C type (int, long or long long). So, when the function lua_pushinteger() is called, the compilator perform a conversion between the type passed as argument and the expected type. So I’m confident with the good behavior. br, Thierry > Best regards, > Adis > <0001-MEDIUM-lua-Add-stick-table-support-for-Lua-read-only.patch>

Re: Performance of using lua calls for map manipulation on every request

2018-08-01 Thread Thierry Fournier
an txn.f[‘req.fhdr’](‘host’) or txn.sf[‘req.fhdr’](‘host’) Other point: I’m not sure that the split() function exists. Thierry > On 27 Jul 2018, at 14:38, Sachin Shetty wrote: > > Hi, > > We are doing about 10K requests/minute on a single haproxy server, we have > enough

Re: SSL: double free on reload

2018-07-17 Thread Thierry Fournier
We can't duplicate > the allocation either because it's used for the updates. I think the cleanest > solution will be to add a refcount to the tls_keys_ref entry. > > Then I'm proposing the attached patch which works for me and is obvious > enough to make valgrind happy as well. > &

Re: Using LUA to redirect a connection based-upon initial content and to redirect upon target disconnection

2018-07-16 Thread thierry . fournier
roxy-lua-api/1.8/index.html#Channel.dup). If you receive data, it's ok, if the channel is close you receive 'nil' reponse, and you can send your redirect. I'm not sure that the dup() function wait for data, and I'm not sure that HAPRoxy call the Lua function if the client close the connection. Thierry

Re: SSL: double free on reload

2018-07-16 Thread Thierry Fournier
On Mon, 16 Jul 2018 08:00:48 +0200 Willy Tarreau wrote: > Hi Thierry, > > On Fri, Jul 06, 2018 at 04:28:22PM +0200, Thierry Fournier wrote: > > Hi list, > > > > I caught a double-free whien I reload haproxy-1.8: > > > > writev(2, [{"*** Erro

SSL: double free on reload

2018-07-06 Thread Thierry Fournier
nit () at src/haproxy.c:2240 #7 0x0041b83c in main (argc=, argv=0x7ffc22f6b4d8) at src/haproxy.c:3094 I use the last 1.8.12 version. Thierry -- Thierry Fournier Web Performance & Security Expert m: +33 6 68 69 21 85 | e: thierry.fourn...@ozon.io w: http://www.ozon.io/| b: http://blog.ozon.io/

BUG / CLOSE-WAIT / INFINITE-LOOP with applets. How reproducing.

2018-06-30 Thread Thierry FOURNIER
rt haproxy like this: ./haproxy -d -f bug39.1.conf or ./haproxy -d -f bug39.2.conf And curl like this (for http an tcp cases): curl --max-time 1 http://127.0.0.1:8080/ Thierry #include #include #include #include static void bug39_http_fct(struct appctx *ctx) { struct stream_int

[PATCH] Close-wait bug in Lua applets

2018-06-30 Thread Thierry FOURNIER
Hi, It have a bug in the Lua HTTP parser which is a trigger for close-wait behavior. I thing that the close-wait state is not due to the parser bug. I will sent anoter email with a method to reproduce it. This patch must be backported from 1.6 to 1.8. Thierry >F

Re: [Patch] Re: Segfault with haproxy 1.8.10

2018-06-26 Thread Thierry Fournier
> On 26 Jun 2018, at 13:56, Willy Tarreau wrote: > > Hi Thierry, > > On Tue, Jun 26, 2018 at 10:20:38AM +0200, thierry.fourn...@arpalert.org wrote: >> BR,Hi, >> >> I found the bug. The segfault is unavoidable, because is trigged if an >> e

[Patch] Re: Segfault with haproxy 1.8.10

2018-06-26 Thread thierry . fournier
d7bd88009d88dd413e01bc0baa90d6662a3d7718 Author: Daniel Corbett Date: Sun May 27 09:47:12 2018 -0400 I join a patch. Daniel, could you check the compliance with your original patch ? William, The backport in 1.8 stable is trivial. BR, Thierry On Mon, 25 Jun 2018 23:03:37 +0200 Willy

Re: Segfault with haproxy 1.8.10

2018-06-25 Thread Thierry Fournier
Just for information, If someone is working on this bug, I think that I found the origin of the crash. I check impact and the validity of the patch, and them I submit a patch Thierry > On 25 Jun 2018, at 11:07, Thierry Fournier > wrote: > > Hi, > > I freshly compile haproxy

Segfault with haproxy 1.8.10

2018-06-25 Thread Thierry Fournier
USE_SYSTEMD=1 \ USE_LINUX_TPROXY=1 \ USE_OPENSSL=yes \ USE_PCRE=yes \ USE_ZLIB=yes \ USE_LUA=1 \ USE_51DEGREES=1 \ 51DEGREES_SRC=/opt/Device-Detection/src/pattern Tell me if you want the core & binary file. Thierry

Re: Variables

2018-06-24 Thread Thierry Fournier
Hi, There are no mean to display the memory used. It is a good idea to do somme accounting about variable usage. Default limit is “unlimited”. Thierry > On 23 Jun 2018, at 19:51, mlist wrote: > > Hi, > > how to debug/show variables memory consumption to corr

Re: [PATCH] Re: Random crash (segfault, double free, ...) with a mix of SSL + cipherlist hash

2018-06-18 Thread Thierry Fournier
> On 18 Jun 2018, at 15:38, Emmanuel Hocdet wrote: > > >> Le 18 juin 2018 à 15:30, Thierry Fournier a >> écrit : >> >> >> >>> On 18 Jun 2018, at 14:37, Emmanuel Hocdet wrote: >>> >>>> >>>> Le 18 juin

Re: [PATCH] Re: Random crash (segfault, double free, ...) with a mix of SSL + cipherlist hash

2018-06-18 Thread Thierry Fournier
> On 18 Jun 2018, at 14:37, Emmanuel Hocdet wrote: > >> >> Le 18 juin 2018 à 10:43, Thierry Fournier a >> écrit : >> >> >>> On 18 Jun 2018, at 10:33, Willy Tarreau wrote: >>> >>> On Sun, Jun 17, 2018 at 09:44:50PM +0200

Re: [PATCH] Re: Random crash (segfault, double free, ...) with a mix of SSL + cipherlist hash

2018-06-18 Thread Thierry Fournier
s, including the Friday :-) But I hope this path improve stability. If someone have time and is interested by the subject, it may be interesting to see in the OpenSSL code if the slot 0 used without reservation works fine, or works because we have luck. BR, Thierry

Re: [PATCH] BUG/MINOR: lua: Segfaults with wrong usage of types.

2018-06-17 Thread Thierry Fournier
I read the ML too quicky, thiss is the right patch. Thanks. Thierry > On 15 Jun 2018, at 15:06, Frederic Lecaille wrote: > > On 06/15/2018 02:28 PM, Frederic Lecaille wrote: >> On 06/15/2018 02:15 PM, Frederic Lecaille wrote: >>> On 06/14/2018 11:05 PM, Patrick He

Re: BUG: segfault with lua sample converters & wrong arg types

2018-06-17 Thread Thierry Fournier
x0001000e7c74 >> haproxy`run_thread_poll_loop(data=0x7fff5fbff3a4) at haproxy.c:2464 >> frame #16: 0x0001000e4a49 haproxy`main(argc=3, >> argv=0x7fff5fbff590) at haproxy.c:3082 >> frame #17: 0x7fffc9db9235 libdyld.dylib`start + 1 >> Issue goes away if you change the lua txn.sc:ipmask() line to: >> txn.sc:ipmask(txn.f:src(), '24', '112') >> Reproduced with current master (9db0fed) and lua version 5.3.4. >> -Patrick > > It seems the patch attached to this mail fixes this issue. It at least make > the varnishtest test file pass. > > Must be checked by Thierry. > > > Fred. > <0001-BUG-MINOR-lua-Segfaults-with-wrong-usage-of-types.patch>

[PATCH] Re: Random crash (segfault, double free, ...) with a mix of SSL + cipherlist hash

2018-06-17 Thread thierry . fournier
x the app data compatibility, I dont known (at least 1.8). I join also the backports for 1.8 (there are trivial backport, with ery minor conflict) Thierry On Sun, 17 Jun 2018 03:01:54 +0200 Thierry FOURNIER wrote: > Hi, > > When I use SSL requests and the cipherlist hash enabled,

Random crash (segfault, double free, ...) with a mix of SSL + cipherlist hash

2018-06-16 Thread Thierry FOURNIER
e requests, and the bug is reproduced. BR, Thierry #!/bin/bash make -j8 \ TARGET=linux2428 \ USE_DL=1 \ USE_OPENSSL=1 \ $* #!/bin/bash curl -i -k https://127.0.0.1:/ curl -i -k https://127.0.0.1:/ #!/bin/bash ./haproxy -d -f bug36.conf bug36.pem Description: Binary data bug36.conf D

Re: [Patch] Lua / Increase error verbosity

2018-06-11 Thread Thierry Fournier
thanks. > On 11 Jun 2018, at 11:12, William Lallemand wrote: > > On Fri, Jun 08, 2018 at 06:28:10PM +0200, Thierry Fournier wrote: >> >> >>> On 8 Jun 2018, at 18:21, Willy Tarreau wrote: >>> >>> On Fri, Jun 08, 2018 at 01:09:04PM +0200, Thi

Re: [Patch] Lua / Increase error verbosity

2018-06-08 Thread Thierry Fournier
> On 8 Jun 2018, at 18:21, Willy Tarreau wrote: > > On Fri, Jun 08, 2018 at 01:09:04PM +0200, Thierry Fournier wrote: >> Hi, >> >> runtime errors doesn't provides the error line, in particular the memory >> error (out of memory) >> >> Please f

[Patch] Lua / Increase error verbosity

2018-06-08 Thread Thierry Fournier
Hi, runtime errors doesn’t provides the error line, in particular the memory error (out of memory) Please find a Lua patch in attachment. It provides backtrace condensed in one line. Thierry 0001-MINOR-lua-Increase-debug-information.patch Description: Binary data

Re: [PATCH] Mod security

2018-05-31 Thread Thierry Fournier
Hi Willy, Could you apply ? Thierry On Thu, 31 May 2018 18:49:03 +0100 David CARLIER wrote: > Hi list, > > Here a small diff for fixing few typos. > > Cheers ! -- Thierry Fournier Web Performance & Security Expert m: +33 6 68 69 21 85 | e: thierry.fourn

Re: [PATCH] Re: 1.8.8 & 1.9dev, lua, xref_get_peer_and_lock hang / 100% cpu usage after restarting haproxy a few times

2018-05-26 Thread Thierry FOURNIER
On Sat, 26 May 2018 19:47:54 +0200 PiBa-NL <piba.nl@gmail.com> wrote: > Hi Thierry, > > Op 25-5-2018 om 15:40 schreef Thierry FOURNIER: > > On Fri, 18 May 2018 22:17:00 +0200 > > PiBa-NL <piba.nl@gmail.com> wrote: > > > >> Hi Thierry,

Re: [PATCH] Re: 1.8.8 & 1.9dev, lua, xref_get_peer_and_lock hang / 100% cpu usage after restarting haproxy a few times

2018-05-26 Thread Thierry Fournier
> On 26 May 2018, at 19:47, PiBa-NL <piba.nl@gmail.com> wrote: > > Hi Thierry, > > Op 25-5-2018 om 15:40 schreef Thierry FOURNIER: >> On Fri, 18 May 2018 22:17:00 +0200 >> PiBa-NL <piba.nl@gmail.com> wrote: >> >>> Hi Thierry, &

[PATCH] lua socket / Read maount of data

2018-05-25 Thread Thierry Fournier
Hi, Actually, I'm working with Lua and Redis, and I found a bug with the socket function. It impacts the read of a great amount of data when these data arriving in a lot of network packet. the Lua user ask for 1 bytes and it receive many more data. The patch in attachment. Thierry >F

[PATCH] Re: 1.8.8 & 1.9dev, lua, xref_get_peer_and_lock hang / 100% cpu usage after restarting haproxy a few times

2018-05-25 Thread Thierry FOURNIER
On Fri, 18 May 2018 22:17:00 +0200 PiBa-NL <piba.nl@gmail.com> wrote: > Hi Thierry, > > Op 18-5-2018 om 20:00 schreef Thierry FOURNIER: > > Hi Pieter, > > > > Could you test the attached patch ? It seems to fix the problem, but I > > have some do

Re: [PATCH] lua & threads

2018-05-24 Thread Thierry Fournier
> On 22 May 2018, at 19:03, Willy Tarreau <w...@1wt.eu> wrote: > > Hi Thierry, > > On Mon, May 21, 2018 at 07:58:01PM +0200, Thierry Fournier wrote: >> Hi, >> >> You will two patches in attachment. >> >> - The first fix some Lua error

[PATCH] lua & threads

2018-05-21 Thread Thierry Fournier
Hi, You will two patches in attachment. - The first fix some Lua error messages - The second fix a build error. This second should be reviewed because, I’m not so proud of solution :-) Note that this build error happens for compilation without threads on macosx. BR, Thierry 0001

Re: 1.8.8 & 1.9dev, lua, xref_get_peer_and_lock hang / 100% cpu usage after restarting haproxy a few times

2018-05-18 Thread Thierry FOURNIER
Hi Pieter, Could you test the attached patch ? It seems to fix the problem, but I have some doubts about the reliability of the patch. Thierry On Fri, 11 May 2018 20:13:25 +0200 PiBa-NL <piba.nl@gmail.com> wrote: > Hi Thierry, > > Okay found a simple reproduction with t

Re: Show: h-app-proxy – Application server inside haproxy

2018-05-18 Thread Thierry FOURNIER
On Fri, 18 May 2018 16:30:46 +0200 Tim Düsterhus <t...@bastelstu.be> wrote: > Thierry, > > Am 18.05.2018 um 12:47 schrieb Thierry FOURNIER: > > Hi, > > > > This is a great usage of Lua. I add a link on my own blog: > > > >http://blog.arpaler

Re: Modifying TCP payload via LUA action & yield issues

2018-05-18 Thread thierry . fournier
, haproxy wait XX seconds for more data. In this case, the yield is allowed during at mean 10s. Thierry On Fri, 18 May 2018 14:22:20 +0200 thierry.fourn...@arpalert.org wrote: > Could you change your configuration to test a workaround ? > > After the line: > >tcp-

Re: Modifying TCP payload via LUA action & yield issues

2018-05-18 Thread thierry . fournier
Could you change your configuration to test a workaround ? After the line: tcp-request content lua.enrich_query if !has_client_version Add a fake action: tcp-request set-var(req.wa) int(0) Tell me if this work around fix the issue. Thierry On Tue, 15 May 2018 01:11:46 + Grant

Re: Modifying TCP payload via LUA action & yield issues

2018-05-18 Thread Thierry FOURNIER
Hi Grant, It seems to be a bug. The action should allow yield. Could you have a method for reproducing the bug ? Thierry On Tue, 15 May 2018 01:11:46 + Grant Byers <gr...@apnic.net> wrote: > Hi all, > > Is it at all feasible to modify a TCP payload via a custom LUA actio

Re: Show: h-app-proxy – Application server inside haproxy

2018-05-18 Thread Thierry FOURNIER
Hi, This is a great usage of Lua. I add a link on my own blog: http://blog.arpalert.org/p/interesting-links.html Thierry On Sat, 12 May 2018 11:23:31 +0200 Aleksandar Lazic <al-hapr...@none.at> wrote: > Hi Tim. > > Am 11.05.2018 um 20:57 schrieb Tim Düsterhus: > >

Re: [PATCH] BUG/MINOR: lua: Socket.send threw runtime error: 'close' needs 1 arguments.

2018-05-18 Thread thierry . fournier
Hi Sada, Thanks for the patch, Willy, can you apply ? BR, Thierry On Fri, 11 May 2018 11:48:18 -0700 sada <s...@signalsciences.com> wrote: > Function `hlua_socke_close` expected exactly one argument on the Lua stack. > But when `hlua_socket_close` was called from `hlua_socket

SPOE patchs

2018-05-18 Thread Thierry FOURNIER
Hi, In attachment two patches for SPOE. The first fix an error message, and the second fix a mistake in the protocol. BR, Thierry >From c0274215ed91e90e127bda790b785b698fb149e7 Mon Sep 17 00:00:00 2001 From: Thierry FOURNIER <thierry.fourn...@ozon.io> Date: Thu, 10 May 2018 16:41

[PATCH] Badd SPOE message

2018-05-10 Thread Thierry FOURNIER
Hi List and Christopher, A little patch in attachment. I tagged it as BUG because the bahavior doesn't correspond to the error message and I read the code to understand the problem. So, it is very minor, and maybe I would be classed as DOC ? br, Thierry >F

Re: Haproxy SSO

2018-05-09 Thread thierry . fournier
On Wed, 9 May 2018 22:02:49 +0100 Andrew Smalley <asmal...@loadbalancer.org> wrote: > Hi Thierry > > I saw the packetengine here > https://www.haproxy.com/documentation/aloha/9-5/packetshield/sso/ Ok. There are "HAProxy Technologies" softwares. Do not hesitate to

Re: Haproxy SSO

2018-05-09 Thread thierry . fournier
On Wed, 9 May 2018 21:51:13 +0100 Andrew Smalley <asmal...@loadbalancer.org> wrote: > Hi Thierry, > > I split the thread as I changed subject to SSO part way through, I > apologize for that. > > Your references to SPOA/SPOE Engines were liked very much. I see the >

Re: WAF with HA Proxy.

2018-05-09 Thread thierry . fournier
e more CPU than loadbalancers. BR, Thierry > Could you please help me with some more documentation, configuration about > this. How would I achieve it. > > > > On Thu, May 10, 2018 at 12:14 AM, Malcolm Turnbull <malc...@loadbalancer.org > > wrote: > > > Dhav

Re: WAF with HA Proxy.

2018-05-09 Thread thierry . fournier
On Wed, 9 May 2018 21:10:48 +0100 Andrew Smalley <asmal...@loadbalancer.org> wrote: > Hello Thierry > > Thank you for your response saying it is the SPOE engine that does > mod_security integration and not the almost correct SPOA that I said. No, you're right: SPOA is the Ag

Re: WAF with HA Proxy.

2018-05-09 Thread Thierry Fournier
Hi, I confirm: the modsecurity i done throught SPOE. The limitation are: The limit of the body size analysed is the size of HAProxy buffer (default 16kB, but for my own usage, I configure 1MB) The response is not analysed. BR, Thierry > On 9 May 2018, at 21:40, Andrew Smalley <

Re: 1.8.8 & 1.9dev, lua, xref_get_peer_and_lock hang / 100% cpu usage after restarting haproxy a few times

2018-05-09 Thread Thierry Fournier
> On 9 May 2018, at 18:30, Thierry Fournier <thierry.fourn...@arpalert.org> > wrote: > > > >> On 8 May 2018, at 00:33, PiBa-NL <piba.nl@gmail.com> wrote: >> >> Hi List, Thierry, >> >> Actually this is not limited to restart

Re: 1.8.8 & 1.9dev, lua, xref_get_peer_and_lock hang / 100% cpu usage after restarting haproxy a few times

2018-05-09 Thread Thierry Fournier
> On 8 May 2018, at 00:33, PiBa-NL <piba.nl@gmail.com> wrote: > > Hi List, Thierry, > > Actually this is not limited to restarts, and also happens with 1.9dev. It > now happens while haproxy was running for a while and no restart was > attempted while running/d

Re: [Lua] Using txn.c:

2018-05-09 Thread thierry . fournier
On Tue, 8 May 2018 21:26:49 +0200 Baptiste <bed...@gmail.com> wrote: > On Tue, May 8, 2018 at 8:17 PM, Baptiste <bed...@gmail.com> wrote: > > > Hi All, Thierry, > > > > I'm trying to use the converter 'table_http_req_cnt()' from a Lua script, > > but

Re: [PATCH] BUG/MINOR: lua: schedule socket task when lua connect() is called

2018-05-06 Thread Thierry Fournier
ot yet initialised, you can't set timeouts." would then appear. >> >> Below code for example also shows this issue, as the sleep will >> yield the lua code: >> local con = core.tcp() >> core.sleep(1) >> con:settimeout(10) > > It seems to make sense in

Re: [PATCH] MINOR: Add server name & puid to LUA Server class.

2018-05-06 Thread Thierry Fournier
> On 3 May 2018, at 18:49, Willy Tarreau <w...@1wt.eu> wrote: > > On Thu, May 03, 2018 at 03:35:41PM +0200, Thierry Fournier wrote: >> Ok, I understand ... I hesitate. I think that is better to keep >> the original type, but the consistency is a good reason to con

Re: [PATCH] BUG/MINOR: lua: Socket.send causing 'close' needs 1 arguments.

2018-05-03 Thread Thierry Fournier
patch with this lot of explanation for the commit ? Like this: http://git.haproxy.org/?p=haproxy-1.8.git;a=commitdiff;h=05657bd24ebaf20e5c508a435be9a0830591f033 Thanks, Thierry > So `close` was expecting exactly "one" argument on the Lua stack. > But when `close` was called

Re: [PATCH] MINOR: Add server name & puid to LUA Server class.

2018-05-03 Thread Thierry Fournier
> On 3 May 2018, at 14:27, Patrick Hemmer <phem...@stormcloud9.net> wrote: > > > > On 2018/5/3 02:52, Thierry Fournier wrote: >>> On 2 May 2018, at 16:49, Willy Tarreau <w...@1wt.eu> >>> wrote: >>> >>> Hi Thierry, >

Re: LUA Converters should be global

2018-05-03 Thread Thierry Fournier
your own Lua library containing these two functions. You will find easyly tutorials. BR, Thierry ===== BR, Thierry > On 30 Apr 2018, at 22:19, Patrick Hemmer <hapr...@stormcloud9.net> wrote: > > Right now in LUA, all th

Re: [PATCH] BUG/MINOR: lua: Socket.send causing 'close' needs 1 arguments.

2018-05-03 Thread Thierry Fournier
Hi, I’m not sure about your patch because the values in the stack are kept. I need to be focus to read it, and unfortunately I’m very busy. I try to check this morning, during the french strikes... Thierry > On 25 Apr 2018, at 20:26, Sadasiva Gujjarlapudi <s...@signalsciences.com>

Re: 1.9dev LUA shows partial results from print_r(core.get_info()) after adding headers ?

2018-05-03 Thread Thierry Fournier
Hi, I can’t reproduce the bug. I even installed a FreeBSD :-) I add Willy in copy, maybe he will reproduce it. Thierry > On 28 Apr 2018, at 01:36, PiBa-NL <piba.nl@gmail.com> wrote: > > Hi Thierry, > > Op 27-4-2018 om 1:54 schreef PiBa-NL: >> Hi Thierry, &

Re: [PATCH] MINOR: Add server name & puid to LUA Server class.

2018-05-03 Thread Thierry Fournier
> On 2 May 2018, at 16:49, Willy Tarreau <w...@1wt.eu> wrote: > > Hi Thierry, > > when you have a moment, could you please give a quick look at these > patches from Patrick so that I know if I can merge them or not ? There > are 2 other ones on the list. Hi Willy

Re: [PATCH] BUG/MINOR: lua: Socket.send causing 'close' needs 1 arguments.

2018-05-03 Thread Thierry Fournier
rs a bug caused by anything else. Do you have a method for reproducing a bug ? BR, Thierry > On 3 May 2018, at 08:56, Thierry Fournier <tfourn...@arpalert.org> wrote: > > Hi, > > I’m not sure about your patch because the values in the stack are kept. > I need to be focus to r

Re: [PATCH 1/1] DOC/MINOR: clean up LUA documentation re: servers & array/table.

2018-05-03 Thread Thierry Fournier
Hi Patrick, Thanks for cleaning the Lua doc. Willy, could you apply these patches ? Theses patch could be backported from 1.8 to 1.6, but it is not so important. Thierry > On 2 May 2018, at 03:30, Patrick Hemmer <hapr...@stormcloud9.net> wrote: > > > * A few typos &

Re: 1.9dev LUA shows partial results from print_r(core.get_info()) after adding headers ?

2018-04-26 Thread thierry . fournier
On Wed, 25 Apr 2018 22:13:46 +0200 PiBa-NL <piba.nl@gmail.com> wrote: > Hi Thierry, > > Op 25-4-2018 om 11:19 schreef Thierry Fournier: > > I extracted the part which dumps the ‘core.get_info()’, and I can’t > > reproduce > > the segfault. I attach the

Re: 1.9dev LUA core.tcp() cannot be used from different threads

2018-04-26 Thread Thierry Fournier
> On 26 Apr 2018, at 11:49, Christopher Faulet <cfau...@haproxy.com> wrote: > > Le 25/04/2018 à 20:51, PiBa-NL a écrit : >> Hi Christopher, Thierry, >> Op 25-4-2018 om 11:30 schreef Christopher Faulet: >>> Oh, these tasks can be created before the threads cr

Re: [PATCH] BUG/MINOR: lua: Socket.send causing 'close' needs 1 arguments.

2018-04-25 Thread Thierry Fournier
Hi,do you have a little bit of context. It is not easy to read a patch withoutthe associated explanation.Thanks,ThierryOn 14 Apr 2018, at 01:56, sada wrote:---src/hlua.c | 14 ++1 file changed, 10 insertions(+), 4 deletions(-)diff --git a/src/hlua.c

Re: [PATCH] BUG/MINOR: lua: Socket.send causing 'close' needs 1 arguments.

2018-04-25 Thread Thierry Fournier
Hi. I miss this email, I will chek it ASAP. Thierry > On 19 Apr 2018, at 19:53, Sadasiva Gujarlapudi <s...@signalsciences.com> > wrote: > > Hi, > Did you get a chance to review the patch. > > Thanks, > Sada. > > On Fri, Apr 13, 2018 at 4:56 PM,

Re: 1.9dev LUA shows partial results from print_r(core.get_info()) after adding headers ?

2018-04-25 Thread Thierry Fournier
Hi, > On 24 Apr 2018, at 21:46, PiBa-NL wrote: > > Hi Tim, > > Op 24-4-2018 om 14:36 schreef Tim Düsterhus: >> Hi >> >> Am 23.04.2018 um 22:36 schrieb PiBa-NL: >>> Is there a bug in my script, or is it more likely that 'something' needs >>> fixing in the lua api /

Re: [PATCH] BUG/MEDIUM: lua: Fix segmentation fault if a Lua task exits

2018-04-25 Thread Thierry Fournier
Hi Tim, Thanks for the patch. You got it ! (and I discover the --scissors :-) ) Willy, You can apply the patch in attachment. This patch should be backported on 1.8. (1.6 and 1.7 are not impacted by the bug). The backport is simple. BR, Thierry 0001-BUG-MEDIUM-lua-Fix-segmentation-fault

Re: 1.9dev LUA core.tcp() cannot be used from different threads

2018-04-25 Thread Thierry Fournier
ng, and before start of threads. Maybe, if “tid” is no set, using 0x01, or random bit ? This is ugly... Any idea ? Pieter: I attach a temporary patch just for validating the source of the problem. Could you try it ? BR, Thierry 0001-TEMP-BUG-MINOR-Lua-Task-are-not-attached-to-a-thread.pa

Re: Grrrr.... warnings

2018-04-02 Thread Thierry Fournier
You can rewrite haproxy with Lua. It was announced one year and one day ago. It’s time ... :-) Thierry - > On 1 Apr 2018, at 23:24, Willy Tarreau <w...@1wt.eu> wrote: > > Can someone tell me how I'm supposed to work around this one ? > > gcc -Iinclude -Iebtree -Wall -O2

Re: lua socket api settimeout in seconds vs. milliseconds

2018-03-27 Thread Thierry Fournier
Thank Mark, Willy, could you apply the attached patch. For information, I updated doc and add comment in the commit message. Thierry 0001-MINOR-lua-allow-socket-api-settimeout-to-accept-inte.patch Description: Binary data > On 27 Mar 2018, at 06:49, Mark Lakes <mla...@signalscienc

Segfault / 1.8.5 / 9a083d1428b

2018-03-26 Thread Thierry Fournier
t;data_cb $3 = (const struct data_cb *) 0x0 Tell me if you want the binary and the core, I will sent you. Thierry

[PATCH] server-template and allowed chars in the name

2018-03-26 Thread Thierry Fournier
ich contains numbers and forces to review the monitoring system. This is not great. It have a good reason to reject chars [0-9:] ? If it is not a case, I join a patch which fix the syntax for [0-9], not for ':' Thanks, Thierry 0001-MINOR-servers-Support-alphanumeric-characters-for-th.patch Description: Binary data

Re: lua socket api settimeout in seconds vs. milliseconds

2018-03-09 Thread Thierry Fournier
> On 8 Mar 2018, at 22:41, Tim Düsterhus <t...@bastelstu.be> wrote: > > Thierry, > > Am 08.03.2018 um 21:15 schrieb Thierry Fournier: >> Hey, the example of use of socket.http in attachment of your original >> commit is great ! > > If you are curious

  1   2   3   4   >