From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 878CA7F1C3 for ; Tue, 27 Nov 2012 03:54:42 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mlin@mlin.net) identity=pra; client-ip=209.85.217.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="mlin@mlin.net"; x-sender="mlin@mlin.net"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mlin@mlin.net) identity=mailfrom; client-ip=209.85.217.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="mlin@mlin.net"; x-sender="mlin@mlin.net"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-lb0-f182.google.com) identity=helo; client-ip=209.85.217.182; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="mlin@mlin.net"; x-sender="postmaster@mail-lb0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnwBACYrtFDRVdm2m2dsb2JhbABEwB8IJAEBAQEBCAkLCRQngz0BBgNaEgEFASIBiB+hbZ5VBJB4A4hejSOOZBYphDGBfA X-IronPort-AV: E=Sophos;i="4.83,325,1352070000"; d="scan'208";a="183342658" Received: from mail-lb0-f182.google.com ([209.85.217.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 27 Nov 2012 03:54:37 +0100 Received: by mail-lb0-f182.google.com with SMTP id go10so12109587lbb.27 for ; Mon, 26 Nov 2012 18:54:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=55C8f2k6mW2l2XAqdWwN6oIfhkhWEUvnqejTkRLEE5E=; b=jpyHNM7ErZUnQ53hIrOgan0LBkLJ7jmtI8dZ2/NiYN7qks8JiR8KFtZjPTETUOM4SI FxgEPUmvDyGk40I3oMNfGsBHxtLI0WEVA81ZtfoO58+XWQvV3xceTkSmS8cplkIGY4VZ IuAtwq3n8ZEqkQK5B22OnQqfVhZCTsBpM7ZTwEZVlIWa+6ADibmBatjaoxR+8irb7Fyl cJNptaCDks6DaLOk7k/y/wUXeHOtRRrtMamRy/iY1JO71PF28PwFUtuxAo2yvd2KDhhV wfne5duazceIe31QeSuFjuGWGSMfg3hplLYEC/QlPquheLGZ957YgzCrLtnED0vq8L3F b/PA== Received: by 10.112.37.167 with SMTP id z7mr5921202lbj.134.1353984876468; Mon, 26 Nov 2012 18:54:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.154.165 with HTTP; Mon, 26 Nov 2012 18:54:16 -0800 (PST) X-Originating-IP: [76.191.184.242] From: Mike Lin Date: Mon, 26 Nov 2012 18:54:16 -0800 Message-ID: To: Gerd Stolpmann , ocamlnet-devel@lists.sourceforge.net, "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=f46d0421a93197d94d04cf712bf6 X-Gm-Message-State: ALoCoQk7TaA4iedXsp4IlM24xwPRXEPys6OJ55c6KMWrVF0pQ5ZYBiauJRs9sxvToXuz3xjX3Bhy X-Validation-by: mlin@mlin.net Subject: [Caml-list] Multithreaded https requests in ocamlnet netclient --f46d0421a93197d94d04cf712bf6 Content-Type: text/plain; charset=ISO-8859-1 Hello Gerd, all, I'm trying to find the right incantations to make parallel https requests from multiple threads using Http_client. (I know the library is capable of multiple requests from one thread -- I have other strong reasons to use multithreading.) https://gist.github.com/4152047 This program generally segfaults for me at some random point during the 10 requests. Compiled as in the comment in line 2 (ubuntu quantal, libocamlnet-ocaml-dev 3.5.1, ocaml 3.12.1). Permutations attempted: 1) Change https to http in google URL -- works as expected 2) Serialize requests by uncommenting line 35 -- works as expected 3) Move invocations of Ssl.init, Ssl.create_context, HTTPS.https_transport_channel_type in and out of fresh_pipeline (which runs in the worker threads) -- no help Any suggestions? Thanks! Mike Lin --f46d0421a93197d94d04cf712bf6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello Gerd, all,

I'm trying to find the right incantations= to make parallel https requests from multiple threads using Http_client. (= I know the library is capable of multiple requests from one thread -- I hav= e other strong reasons to use multithreading.)


This program generall= y segfaults for me at some random point during the 10 requests. =A0Compiled= as in the comment in line 2=A0(ubuntu quantal, libocamlnet-ocaml-dev=A03.5= .1, ocaml 3.12.1).

Permutations attempted:

= 1) Change https to http in google URL -- works as expected
2) Ser= ialize requests by uncommenting line 35 -- works as expected
3) Move invocations of Ssl.init, Ssl.create_context, HTTPS.https_transport_= channel_type in and out of fresh_pipeline (which runs in the worker threads= ) -- no help

Any suggestions? Thanks!

Mike Lin

--f46d0421a93197d94d04cf712bf6--