From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p282HSpF018549 for ; Tue, 8 Mar 2011 03:17:28 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar8QAOMgdU2t/9A2/2dsb2JhbACEK5QkjXsNdK0ckSKBJ4NFdgSPeIIh X-IronPort-AV: E=Sophos;i="4.62,281,1297033200"; d="scan'208";a="101503365" Received: from sairyx.org ([173.255.208.54]) by mail1-smtp-roc.national.inria.fr with ESMTP; 08 Mar 2011 03:17:22 +0100 Received: by sairyx.org (Postfix, from userid 5001) id 085BE4801D; Tue, 8 Mar 2011 02:17:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sairyx.org X-Spam-Level: Received: from [192.168.200.106] (203-206-182-151.perm.iinet.net.au [203.206.182.151]) (Authenticated sender: celtic@sairyx.org) by sairyx.org (Postfix) with ESMTPSA id A914A4801C for ; Tue, 8 Mar 2011 02:17:19 +0000 (UTC) From: Arlen Cuss To: caml-list@inria.fr Content-Type: text/plain; charset="UTF-8" Date: Tue, 08 Mar 2011 13:17:16 +1100 Message-ID: <1299550636.21350.49.camel@azayaka> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: [Caml-list] Unix.Unix_error(31, "write", "") raised from format.ml!? This is not right. Hi all, I'm getting bizarre errors in a program which multiplexes on 50-100 sockets (some Unix domain, some TCP), where an error will apparently occur in "write", but the entire backtrace is limited to 'format.ml': backtrace: Raised at file "format.ml", line 194, characters 15-26 Called from file "format.ml", line 420, characters 8-33 Called from file "format.ml", line 435, characters 6-24 The backtrace does describe a correct path through format.ml: 194 | _ -> raise Empty_queue 420 match peek_queue state.pp_queue with 435 try advance_loop state with It's hard to determine what's going on, because for some reason the backtrace is limited to this file, and none of my own code. I'm a bit lost as to how these errors are being raised: Exception Unix.Unix_error(31, "write", "") occurred Exception Unix.Unix_error(56, "write", "") occurred Both are occurring with the same reported backtrace; the former is Unix error EMLINK (too many links), the latter EISCONN (socket is connected); the strange thing is that *neither* of these errors should be throwable on a write() call! I've ensured I'm correctly compiling with debug info, so I'm a bit lost. I can only assume a sprintf or similar call somewhere is going haywire. Anyone seen anything like this before? Best, Arlen