Tim,

On 9/12/20 4:25 PM, Tim Düsterhus wrote:
> Reinhard,
>
> Am 12.09.20 um 12:45 schrieb Reinhard Vicinus:
>> thanks, for your reply and the information. Sorry for my late reply, but
>> I had only today time to test. I did try to get the spoa server working
>> on a ubuntu bionic (18.04.4) with haproxy 2.2.3-2ppa1~bionic from the
>> vbernat ppa. I could compile the spoa server with python 3.6 support
>> from the latest github sources without obvious problems and it also
>> started without problems with the example python script (./spoa -d -f
>> ps_python.py).
>>
>> If I start haproxy with the following command:
>>
>> haproxy -f spoa-server.conf -d
>>
>> haproxy seg faults on the first request to port 10001
> This is a bug in HAProxy then. Do you happen to have a core dump / stack
> trace?
Yes I have a core dump. But I am somewhat rusty in analyzing them. So
any pointers what to do with the core dump is appreciated. Also the
segmentation fault only occurs if the spoa server is running so the
problem is probably somewhere in the code regarding the connection to
the spoa server.
>
>> If I start haproxy with the additional parameter -Ws then it does not
>> seg fault, but only the first and every 4th request get (correctly?)
>> forwarded to the spoa server, the 3 requests in between get answered
>> with an empty %[var(sess.iprep.ip_score)].
>>
>> [...]
>>
>> I am unsure if I am making some stupid mistakes, or if I should test it
>> with an older haproxy version or how to debug the issue further. So any
>> pointers are very much appreciated.
> Can you share the configuration you attempted to use?
Sorry, I forgot to mention that the configuration used is the example
configuration from haproxy repository. But here it is, to ensure that
there were no changes in the meantime:

spoa-server.conf:
global
        debug

defaults
        mode http
        option httplog
        option dontlognull
        timeout connect 5000
        timeout client 5000
        timeout server 5000

listen test
        mode http
        bind :10001
        filter spoe engine spoa-server config spoa-server.spoe.conf
        http-request set-var(req.a) var(txn.iprep.null),debug
        http-request set-var(req.a) var(txn.iprep.boolean),debug
        http-request set-var(req.a) var(txn.iprep.int32),debug
        http-request set-var(req.a) var(txn.iprep.uint32),debug
        http-request set-var(req.a) var(txn.iprep.int64),debug
        http-request set-var(req.a) var(txn.iprep.uint64),debug
        http-request set-var(req.a) var(txn.iprep.ipv4),debug
        http-request set-var(req.a) var(txn.iprep.ipv6),debug
        http-request set-var(req.a) var(txn.iprep.str),debug
        http-request set-var(req.a) var(txn.iprep.bin),debug
        http-request redirect location /%[var(sess.iprep.ip_score)]

backend spoe-server
        mode tcp
        balance roundrobin
        timeout connect 5s
        timeout server  3m
        server spoe-server 127.0.0.1:12345


spoa-server.spoe.conf:
[spoa-server]

spoe-agent spoa-server
        messages check-client-ip
        option var-prefix  iprep
        timeout hello      100ms
        timeout idle       30s
        timeout processing 15ms
        use-backend spoe-server

spoe-message check-client-ip
        args always_true int(1234) src ipv6(::55) req.fhdr(host)
        event on-frontend-http-request


Thanks in advance
Reinhard Vicinus

Reply via email to