From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 4C26C7EF21 for ; Fri, 20 Jun 2014 10:53:31 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of mshinwell@janestreet.com) identity=pra; client-ip=38.105.200.233; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="mshinwell@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of mshinwell@janestreet.com designates 38.105.200.233 as permitted sender) identity=mailfrom; client-ip=38.105.200.233; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="mshinwell@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mxout3.mail.janestreet.com) identity=helo; client-ip=38.105.200.233; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mshinwell@janestreet.com"; x-sender="postmaster@mxout3.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AncBAH/1o1MmacjpnGdsb2JhbABZg19agm2nNwaCV5ZTAXweDwEBAQEBBhYJPIQDAQEBBBIRHQEBLAsBDwsLDQICCR0CAiISAQUBChIGExIQiAwDEQMCCKB3aoowd4UBAQWSZwOGUBEGgSqEOIkUB4J3gUyEZwWVXIFDkCYYKYRz X-IPAS-Result: AncBAH/1o1MmacjpnGdsb2JhbABZg19agm2nNwaCV5ZTAXweDwEBAQEBBhYJPIQDAQEBBBIRHQEBLAsBDwsLDQICCR0CAiISAQUBChIGExIQiAwDEQMCCKB3aoowd4UBAQWSZwOGUBEGgSqEOIkUB4J3gUyEZwWVXIFDkCYYKYRz X-IronPort-AV: E=Sophos;i="5.01,512,1400018400"; d="scan'208";a="68019785" Received: from mxout4.mail.janestreet.com (HELO mxout3.mail.janestreet.com) ([38.105.200.233]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Jun 2014 10:53:29 +0200 Received: from tot-oib-smtp1.delacy.com ([172.27.22.15] helo=tot-smtp) by mxout3.mail.janestreet.com with esmtps (UNKNOWN:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1WxuZa-0008M8-HL for caml-list@inria.fr; Fri, 20 Jun 2014 04:53:26 -0400 Received: from tot-dmz-mxgoog1.delacy.com ([172.27.224.14] helo=mxgoog2.janestreet.com) by tot-smtp with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WxuZa-0008Sc-EF for caml-list@inria.fr; Fri, 20 Jun 2014 04:53:26 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]) by mxgoog2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1WxuZa-0006Wm-Bu for caml-list@inria.fr; Fri, 20 Jun 2014 04:53:26 -0400 Received: by mail-ob0-f175.google.com with SMTP id wm4so740449obc.34 for ; Fri, 20 Jun 2014 01:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=q3S9+OYGUCsV/+TLEfBv28FQ4ou8BIoJLIuiffPa/io=; b=RZSbc/HyKAgdp9yOXrPgr7IHBBitdyLV7gFagWS8O327RLY+GjwqbF+KlqFojUF0H0 pYfAasqM1mxtoZSEtS9l+8PxqozMYMoWlKIIZApNNpWO9RYz1zewP2SXN+ZILw9QEN49 YrISy2xVF5k+aguQH1CRO64Y9cqRl/3NXBAJI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=q3S9+OYGUCsV/+TLEfBv28FQ4ou8BIoJLIuiffPa/io=; b=DQ03trSBRpiCSeDbbRAj1qTbQkLzDiWlo6zCqr5u8sdECVlchIjBL6/W7gWnbMsVQt ZxQlNX/GjNu/GYgHxeIgHtj/85SPm61QYue9No91cK4L5K1kMkJ/CPLRksTZahcLSvf7 W3pSYuWB1YHYM7LqZ7BU5C4Ou1/eBlJszNtpYs/zZ3KSYa5eLk7ch1r9AO7fmC7Hrcb6 FS78coIfNNE1tlYpw2NNXc69hk6hdbMQ842Q1VhAUdYfHePAs1IsqQ1lkpZywM4sJ0iQ 40J7GNmfM4yU2w1RAXi6nkG25i6ZCD4ZiVpY0hOSLd15S+a1zy7pbaDOZtQ9YWZvIGeF psYg== X-Gm-Message-State: ALoCoQmp1hZ555d2+7Lk00lRNoHnq2BrWFjOTQWzsZo5DLX0EiIREOch4UUCAjJO3PRGW0htJ+4XGlZ6GSRALTRPMSKM4f4TjTzf1fA0qGq+aIWH2bQgwJi6Ag3Chn8SjaU7jHt1lPTY X-Received: by 10.182.181.74 with SMTP id du10mr1908112obc.52.1403254406079; Fri, 20 Jun 2014 01:53:26 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.181.74 with SMTP id du10mr1908100obc.52.1403254405925; Fri, 20 Jun 2014 01:53:25 -0700 (PDT) Received: by 10.60.93.226 with HTTP; Fri, 20 Jun 2014 01:53:25 -0700 (PDT) In-Reply-To: <53A3CB24.3040102@khandkar.net> References: <53A14140.2060502@cea.fr> <53A18CA3.7030402@cea.fr> <53A3AD7A.4040400@colba.net> <53A3CB24.3040102@khandkar.net> Date: Fri, 20 Jun 2014 09:53:25 +0100 Message-ID: From: Mark Shinwell To: Siraaj Khandkar Cc: eliot@colba.net, Ocaml Mailing List Content-Type: text/plain; charset=UTF-8 X-Validation-by: mshinwell@janestreet.com Subject: Re: [Caml-list] mysterious cgi problem Is the OCaml executable compiled to native code? If so, you may be able to trap this by having the HTTP server execute gdb with commands to execute your OCaml program, and then give you a backtrace immediately before it exits. Ensure your program was compiled with the -g option to ocamlopt. Then for example if you currently run: /my/executable --foo-bar you would instead run: gdb -ex "b exit" -ex "r" -ex "bt" -ex "set confirm 0" -ex "q" --args /my/executable --foo-bar Mark On 20 June 2014 06:48, Siraaj Khandkar wrote: > Not_found must be coming from some initialization procedure in module Y, > so try to trap it from there. > > > On 06/19/2014 11:41 PM, Eliot Handelman wrote: >> Hi list, >> >> We have a demo coming up on Monday of an ocaml based music analysis and >> generation system with a >> web component for music notation that, irritatingly, has stopped >> working. The interface is a CGI >> with an ocaml 4.01 executable. After several harrowing days I narrowed >> the problem down to the >> following situation: >> >> X, a basic system, runs fine in firefox/chrome/various linuxen >> >> X + module Y generates "Not_found" exceptions in the CGI merely by >> linking Y. Y is >> otherwise not invoked. Moreover, I'm unable to trap the exception in >> the CGI itself >> (ie, a try/with around the main function is somehow bypassed as the >> apache error long reports). So >> it would seem the that the code fails before the main function is executed. >> >> We were using ocamlnet, but I rolled my own cgi parser and reproduced >> the problem. >> >> Any suggestions? My next step would be to start rolling back the system, >> which is >> not pleasant. >> >> >> thanks, >> >> -- eliot >> > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs