From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 4D825BB81 for ; Sun, 11 Dec 2005 12:12:05 +0100 (CET) Received: from kraid.nerim.net (smtp-100-sunday.nerim.net [62.4.16.100]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jBBBC5uW019549 for ; Sun, 11 Dec 2005 12:12:05 +0100 Received: from karryall.dnsalias.org (oandrieu.pck.nerim.net [213.41.240.180]) by kraid.nerim.net (Postfix) with ESMTP id 8235F40E24; Sun, 11 Dec 2005 12:11:57 +0100 (CET) Received: by karryall.dnsalias.org (Postfix, from userid 500) id 7C17C596FEA; Sun, 11 Dec 2005 12:11:56 +0100 (CET) From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17308.2428.209758.492757@karryall.dnsalias.org> Date: Sun, 11 Dec 2005 12:11:56 +0100 To: jtbryant@valdosta.edu Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Mysterious bug In-Reply-To: <1134271835.1763.8.camel@localhost.localdomain> References: <1134271835.1763.8.camel@localhost.localdomain> X-Mailer: VM 7.19 under Emacs 21.4.1 X-Miltered: at nez-perce with ID 439C0985.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; andrieu:01 oandrieu:01 nerim:01 caml-list:01 bug:01 bug:01 gdb:01 einval:01 manpage:01 einval:01 elusive:98 elusive:98 unix:01 unix:01 thread:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 Jonathan Bryant [Saturday 10 December 2005] : > > Everybody, > > I'm working on my client/server library and I've run into a rather > elusive bug. It may be elusive because my skills with GDB are rather > shoddy (usually I'm pretty good at achieving my goal of not needing to > use it). > > The attachment is my code for the library (as well as a small build > script and tester). It's documented in the Acceptor module, but when I > run the server under high loads (10 thread pinging it 1,000,000 times or > so each), one of three things happens: > 1. Nothing (works like it should) > 2. Unix.accept raises an Unix.Unix_error(12, "accept", "") at some > random time (sometimes, I believe, after all of the connections have > been made, but I feel very wrong in thinking this) 12 is EINVAL, and the accept(2) manpage says: EINVAL Socket is not listening for connections. So I guess your code has some ordering issues, you accept() either before you listen() or after you shutdown(). -- Olivier