caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Lin Hong <lhong@amnh.org>
To: Mailing OCaML <caml-list@inria.fr>
Subject: [Caml-list] Segmentation fault right after caml_alloc_custom
Date: Wed, 1 Aug 2012 20:05:19 +0000	[thread overview]
Message-ID: <C960B6881E802A459A09A7DAD55690053E7B66B9@MAIL-MBX-004.internal.amnh.org> (raw)

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

Hi all,

we have a weird problem here. In a c file, right after one call of 'caml_alloc_custom', some old information we have in memory is gone, then we have the segmentation fault because the code try to access those informations later.

 turn on debug message with OCAMLRUNPARAM, get this right before it crash.

......
$Starting new major GC cycle
Marking 9223372036854775807 words
Subphase = 10
Sweeping 9223372036854775807 words
Compacting heap...
Shrinking heap to 37696k bytes
Shrinking heap to 36704k bytes
Shrinking heap to 35712k bytes
Shrinking heap to 34720k bytes
Shrinking heap to 33728k bytes
Shrinking heap to 32736k bytes
Shrinking heap to 31744k bytes
Shrinking heap to 30752k bytes
done.

is it possible that the ocaml garbage collection free memory that is still in use?

the data cause this is kind of big, it doesn't happen right away,and it doesn't happen on every machine (linux with ocaml4 is fine, ocaml3.xx is not. mac with ocaml4 still shows the problem though).

any suggestion is appreciated.


Thanks,
Lin


=======================
American Museum of Natural History
POY website :
https://code.google.com/p/poy/
http://research.amnh.org/scicomp/scripts/download.php

[-- Attachment #2: Type: text/html, Size: 3635 bytes --]

             reply	other threads:[~2012-08-01 20:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01 20:05 Lin Hong [this message]
2012-08-01 20:16 ` AW: " Gerd Stolpmann
     [not found] ` <1343852029.3275.1@samsung>
2012-08-01 21:08   ` Lin Hong
2012-08-01 21:24     ` AW: " Gerd Stolpmann
2012-08-01 21:44       ` Lin Hong
2012-08-01 22:11         ` AW: " Gerd Stolpmann
2012-08-02  1:01           ` Lin Hong

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=C960B6881E802A459A09A7DAD55690053E7B66B9@MAIL-MBX-004.internal.amnh.org \
    --to=lhong@amnh.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).