[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] SSL problems after update to libeven 2.1.8
- To: libevent-users@xxxxxxxxxxxxx
- Subject: Re: [Libevent-users] SSL problems after update to libeven 2.1.8
- From: Alexander Rojas <alexander@xxxxxxxxxxxxx>
- Date: Mon, 1 Oct 2018 13:02:24 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Mon, 01 Oct 2018 07:02:33 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mesosphere.io; s=google; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=L/s1IdmqGVJZl6YdSOb9sxJlhcjblTVBmq6ylTtwekw=; b=GsR/kedp+boEpLGuyafNJmojkOVYzEtEiDJEWEUrErbeakhDC1tnCZwGbu7dhDr1VB rGo9Y1Fegp/JAY0yM3LTDiLE+sNBGQwTEzNNkoqFnTl7JPoqaLtpRMQhylB7ERzZEuqA c0mrSEkz6TdqY8rOJRjFgeyBrYqQb9g0DR7a8=
- In-reply-to: <20180930215205.rjhn3eulodgev4vl@macbook-pro.sq.azat.localdomain>
- References: <7549CDE3-675F-4EC0-8D7E-051ED2FCEB63@mesosphere.io> <20180909231314.jeeunh6q3jcauaqf@carbon.azat.localdomain> <04EC0810-99DC-4FB5-9335-230F132FC5EC@mesosphere.io> <F9C52CF1-1F73-42B9-829A-67A95A4AB9F6@mesosphere.io> <20180910100222.hbga3e3ete4fq7vd@carbon.azat.localdomain> <85F8645F-6176-4A09-9A0A-E49F32963E00@mesosphere.io> <20180930215205.rjhn3eulodgev4vl@macbook-pro.sq.azat.localdomain>
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
Thanks Azat!
This was a great catch!
Alexander Rojas
alexander@xxxxxxxxxxxxx
> On 30. Sep 2018, at 23:52, Azat Khuzhin <a3at.mail@xxxxxxxxx> wrote:
>
> On Thu, Sep 13, 2018 at 03:05:41AM +0200, Till Toenshoff wrote:
>>> On 10. Sep 2018, at 12:02, Azat Khuzhin <a3at.mail@xxxxxxxxx> wrote:
>>>
>>>>> commit f4b6284b8393dbabf389ddce734a30f4cdeffa17
>>>>> be_openssl: don't add events during bev creation (like be_sock)
>>>
>>> Thanks for the bisect!
>>>
>>> Interesting, just revering it doesn't fixes the issue to me (on linux).
>>> And to reset to this commit I need openssl 1.0 (since I have 1.1), will
>>> prepare env for it and get back.
>>>
>>>> The above bisect was done on macOS 10.14 - which works fine with Mesos l+ libevent 2.1.5 but breaks with libevent 2.1.8.
>>>>
>>>> Will do the same bisect on Ubuntu 18.04 as well - just to be sure.
>>>
>> Bisect on Ubuntu 18.04 resulted in the very same offender.
>>
>> Reverting that commit makes things worse, not better. Instead of a timeout on the receive, we then get a failure already on the accept.
>>
>> ../../../3rdparty/libprocess/src/tests/ssl_tests.cpp:254: Failure
>> (socket).failure(): Failed accept: connection error: error:00000000:lib(0):func(0):reason(0)
>>
>> This bisect and the revert results are based on libssl 1.0.
>>
>> Will also keep pondering … and get back with new results.
>
> Hi Till,
>
> So finally I had time to investigate this, and after looking into mesos
> sources I find out that you libevent wrappers do not enable needable
> events for openssl bufferevents. And that is why everything hangs (why I
> didn't check this before?).
>
> I just added bufferevent_enable() into two places and now SSLTest.*
> passes.
>
> You will find patches for mesos here:
> https://github.com/azat-archive/mesos.git le-dev
>
> Also it contains some fixes for cmake (since I don't like autotools due
> to how difficult to handle every single dependency right there, in
> particular "make -C 3rdparty/libprocess/ -j4 libprocess-tests" will not
> built all dependencies, if you curious).
>
> And here is startup script for your docker image to pass libevent/mesos
> sources into it that I came up with:
> https://gist.github.com/azat/41ee673d2b5dec9f1ac14a5970265be2
>
> Before this I used your autotools build and hacks around to pass my
> libevent version into the image (things got complicated because that
> unit tests start binaries which reset environ) but maybe I messed up
> maybe not, but you bisect indeed correct. Anyway you should enable
> events manually if you want reliable code.
>
> Also since you wrote that "reverting makes thing worse" could you
> verify referenced patches (including osx) ?
>
> And thanks again for the docker image, details and your correct bisect!
>
> Regards,
> Azat.
> ***********************************************************************
> To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
> unsubscribe libevent-users in the body.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.