caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: Mysterious bug
@ 2005-12-11 14:33 Joshua Smith
  0 siblings, 0 replies; 2+ messages in thread
From: Joshua Smith @ 2005-12-11 14:33 UTC (permalink / raw)
  To: caml-list, jtbryant

The "nothing works like it should" sounds like you've got a thread
raising an exception without reporting it or its getting caught in a
way that makes it silent. I looked at your code  little bit but didn't
see anything obvious like this, however.   I also would say that the
EventBroker may be the problem for situation 1).  if you have a thread
that locks a mutex and then raises an exception you could get a race
condition in there which would create situation 1).

Situation 2) ENOMEM can also be raised when a program is exceeding
ulimit parameters.

And situation 3) I dunno.  Your program shouldn't segfault at any
time,  let alone a random one. What version of the ocaml compiler are
you using?

HTH.

-jbs


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Mysterious bug
@ 2005-12-11  3:30 Jonathan Bryant
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Bryant @ 2005-12-11  3:30 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

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)
3. Segmentation Fault at a random time.

These bugs sometimes come up immediately into execution and sometimes 5
minutes or so into execution.  I don't know if this is a bug in my
tester, my library, OCaml, or Linux.  Any ideas?  I think it may just be
that I've been staring at the code for too long and need another set of
eyes to look at it...

--Jonathan Bryant

[-- Attachment #2: clientServer.tar.gz --]
[-- Type: application/x-compressed-tar, Size: 6896 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-11 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-11 14:33 Mysterious bug Joshua Smith
  -- strict thread matches above, loose matches on Subject: below --
2005-12-11  3:30 Jonathan Bryant

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).