Is anyone working on Async + TLS?

43 views
Skip to first unread message

Rudi Grinberg

unread,
Jan 24, 2017, 7:24:24 PM1/24/17
to ocaml...@googlegroups.com
Hello,

I remember some chatter on github/slack about making an Async friendly wrapper
for TLS. Something about getting an intern to work on it perhaps? Anyway, I'm
wondering if such work has begun, and if it has, when will we reap its fruit?

Cheers,

Rudi.

Clark Gaebel

unread,
Jan 26, 2017, 9:02:39 PM1/26/17
to ocaml...@googlegroups.com
Is https://github.com/janestreet/async_ssl similar to what you're looking for?

  - Clark

--
You received this message because you are subscribed to the Google Groups "ocaml-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ocaml-core+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeremie Dimino

unread,
Jan 27, 2017, 6:42:27 AM1/27/17
to ocaml...@googlegroups.com, Anil Madhavapeddy, Thomas Gazagnaire
(adding Anil and Thomas who mentioned it on slack)
--
Jeremie

Rudi Grinberg

unread,
Jan 27, 2017, 9:54:55 AM1/27/17
to ocaml...@googlegroups.com
>Is https://github.com/janestreet/async_ssl similar to what you're looking
>for?

It's similar but not quite what I'm looking for. I'd like to use
https://github.com/mirleft/ocaml-tls because it's a pure OCaml solution.

Anil Madhavapeddy

unread,
Jan 27, 2017, 10:39:18 AM1/27/17
to ocaml...@googlegroups.com, Gemma Gordon
It's on the "OCaml Labs project list" but noone's directly working on it yet. This would be a really good candidate for a MirageOS hackathon project, as someone there could get pretty far in a few days.

regards,
Anil

Paolo Donadeo

unread,
Jan 28, 2017, 11:07:27 AM1/28/17
to Core mailing list
Rudi, there is an open issue [1] about a memory leak in Async_ssl and Vincent Bernardoff is trying to add a backend for ocaml-tls in Async_ssl. Details in the thread on GitHub.


--
You received this message because you are subscribed to the Google Groups "ocaml-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ocaml-core+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Paolo

Rudi Grinberg

unread,
Jan 28, 2017, 11:34:21 AM1/28/17
to ocaml...@googlegroups.com, v...@luminar.eu.org
On 01/28, Paolo Donadeo wrote:
>Rudi, there is an open issue [1]
><https://github.com/janestreet/async_ssl/issues/21> about a memory leak in
>Async_ssl and Vincent Bernardoff is trying to add a backend for ocaml-tls
>in Async_ssl. Details in the thread on GitHub.

Thanks for notifying me. My original plan was to work on the async/tls during
the 2017 marrakech retreat [1].

Let's see if Vincent has made progress on this already. I'm happy to join his
effort if that's the case.

[1] http://marrakech2017.mirage.io/

Rudi Grinberg

unread,
Jan 29, 2017, 7:23:37 PM1/29/17
to ocaml...@googlegroups.com
On 01/28, Paolo Donadeo wrote:
>Rudi, there is an open issue [1]
><https://github.com/janestreet/async_ssl/issues/21> about a memory leak in
>Async_ssl and Vincent Bernardoff is trying to add a backend for ocaml-tls
>in Async_ssl. Details in the thread on GitHub.

Seems like Vincent has already put in serious effort into this in case anybody
is wondering.

https://github.com/mirleft/ocaml-tls/pull/355

Vincent Bernardoff

unread,
Feb 9, 2017, 8:17:07 PM2/9/17
to ocaml...@googlegroups.com
Le 28/01/2017 à 17:34, Rudi Grinberg a écrit :
>
> Let's see if Vincent has made progress on this already. I'm happy to
> join his
> effort if that's the case.

I started something here:

https://github.com/mirleft/ocaml-tls/pull/355

I followed the existing Lwt backend and tried to adapt to Async.
I'm at the bugfixing stage, it's not working yet, and I hope I did not
completely misunderstood how I should proceed on this.

The main difference with Lwt is that the Lwt implementation works on the
socket (file descriptor) level and produce a Lwt_io interface on top of
it, whereas in Async, the way IO is performed is different and it seems
we have to work with Reader/Writer directly.

It should not be really difficult at all, but I don't have that much
time to work on it.

My main motivator was that Async_ssl is leaking memory, and instead of
trying to find the memory leak in it (now possible thanks to Spacetime),
I felt I would try my luck adapting ocaml-tls to Async.

I'm not against somebody looking at my code and trying to spot obvious
issues in it. The ocaml-tls team seems not that interested/available to
work on this at this time.

Best,

--
Vincent

Yaron Minsky

unread,
Feb 9, 2017, 9:07:11 PM2/9/17
to ocaml...@googlegroups.com
For what it's worth, I believe the memory leak in Async_ssl has now
been resolved.

https://github.com/janestreet/async_ssl/issues/13
https://github.com/janestreet/async_ssl/issues/21

(The second one I think was just a bug in the client code and not an
actual link.)
> --
> You received this message because you are subscribed to the Google Groups "ocaml-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ocaml-core+...@googlegroups.com.

Vincent Bernardoff

unread,
Feb 16, 2017, 8:41:11 AM2/16/17
to ocaml...@googlegroups.com
Le 10/02/2017 à 03:06, Yaron Minsky a écrit :
> For what it's worth, I believe the memory leak in Async_ssl has now
> been resolved.

The issue was in code improperly using Async_ssl, not in Async_ssl
itself. In particular I think the issue was to not properly closing
Writer.t after use, resulting in fd/space leaks.

--
Vincent
Reply all
Reply to author
Forward
0 new messages