caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: james woodyatt <jhw@wetware.com>
To: james woodyatt <jhw@wetware.com>
Cc: The Trade <caml-list@inria.fr>
Subject: Re: [Caml-list] troubleshooting problem related to garbage collection
Date: Fri, 1 Mar 2002 16:11:32 -0800	[thread overview]
Message-ID: <0D00592F-2D72-11D6-BA3A-000502DB38F5@wetware.com> (raw)
In-Reply-To: <81A4E362-2D45-11D6-BA3A-000502DB38F5@wetware.com>

On Friday, March 1, 2002, at 10:52 AM, james woodyatt wrote:
>
> Last night I spent a lot of time trying to figure out why an assertion 
> was failing in my code when I use it with large data sets.  I'm still 
> puzzled.
>
> This morning, I inserted the following at the beginning of my main 
> module:
>
>> Gc.set {
>>     (Gc.get ()) with
>>     Gc.major_heap_increment = 64000
>> }
>
> This made the problem go away.

Further investigation reveals that it does not make the problem go away, 
it changes the failure mode into one that only makes it look like the 
problem has gone away.  The process terminates prematurely (but there 
was no more output expected anyway).

> What's even more strange is that there are multiple failure modes to 
> choose from depending on which number I pick for the 
> major_heap_increment value.  The number I am using here just happens to 
> be the one that makes the code work.
>
> Can anyone advise me on how to find the bug here?

I've found the problem.  It was a function trying too hard not to blit a 
string.  The bug only manifested when writing to a non-blocking TCP 
socket would return a value less than the number of octets to send.

This makes me think that when similar problems arise-- i.e. when 
changing the parameters of the GC seems to make always-reproduceable 
misbehavior change in some remarkable way-- the first place to start 
looking for the cause is code that blits strings.


--
j h woodyatt <jhw@wetware.com>
"...the antidote to misinformation is more information, not less."
                                                      --vinton cerf

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2002-03-02  0:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-01 18:52 james woodyatt
2002-03-02  0:11 ` james woodyatt [this message]
2002-03-02  7:57   ` [Caml-list] The DLL-hell of O'Caml Mattias Waldau
2002-03-02 11:56     ` Markus Mottl
2002-03-02 21:40       ` Alexander V. Voinov
2002-03-02 14:46     ` Alain Frisch
2002-03-02 19:00       ` Chris Hecker
2002-03-02 19:42         ` Mattias Waldau
2002-03-02 22:41           ` Chris Hecker
2002-03-03 15:56             ` Vitaly Lugovsky
2002-03-04  9:57           ` Sven
2002-03-04 12:10             ` possible solution to " Dave Mason
2002-03-05  7:58               ` Mattias Waldau
2002-03-05 12:47                 ` Dave Mason
2002-03-04 12:20     ` Jacques Garrigue

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=0D00592F-2D72-11D6-BA3A-000502DB38F5@wetware.com \
    --to=jhw@wetware.com \
    --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).