caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Arlen Cuss <celtic@sairyx.org>
To: caml-list@inria.fr
Subject: [Caml-list] Unix.Unix_error(31, "write", "") raised from format.ml!? This is not right.
Date: Tue, 08 Mar 2011 13:17:16 +1100	[thread overview]
Message-ID: <1299550636.21350.49.camel@azayaka> (raw)

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


             reply	other threads:[~2011-03-08  2:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08  2:17 Arlen Cuss [this message]
2011-03-08  2:22 ` Arlen Cuss
2011-03-08 14:35 ` Gerd Stolpmann
     [not found] ` <1001695803.480327.1299594992792.JavaMail.root@zmbs4.inria.fr>
2011-03-08 21:28   ` Fabrice Le Fessant
2011-03-08 23:17     ` Gerd Stolpmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299550636.21350.49.camel@azayaka \
    --to=celtic@sairyx.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).