caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sami Liedes <sliedes@cc.hut.fi>
To: caml-list@yquem.inria.fr
Subject: Assertion failure in ocamlrund
Date: Fri, 27 May 2005 22:26:31 +0300	[thread overview]
Message-ID: <20050527192631.GF4700@sk2-4.tky.hut.fi> (raw)

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

Hi,

After having ocamlrun segfault on my program (only when running with
OCAMLRUNPARAM=b, without b it reports an uncaught Not_found exception)
I compiled the debugging version of it, and this is what I get:

file freelist.c; line 123 ### Assertion failed: wo_sz >= 1

Here's a backtrace:

#0  caml_failed_assert (expr=0x806f000 "wo_sz >= 1", file=0x806ee80 "freelist.c", line=123) at misc.c:25
#1  0x08067b24 in caml_fl_allocate (wo_sz=0) at freelist.c:123
#2  0x080504d3 in caml_alloc_shr (wosize=0, tag=1) at memory.c:261
#3  0x0806955a in caml_oldify_one (v=134801368, p=0xb798ebf0) at minor_gc.c:94
#4  0x0806997a in caml_oldify_mopup () at minor_gc.c:171
#5  0x08069a17 in caml_empty_minor_heap () at minor_gc.c:193
#6  0x08069ae8 in caml_minor_collection () at minor_gc.c:222
#7  0x08055b4e in caml_array_unsafe_get_float (array=-1210587644, index=17) at array.c:92
#8  0x08055bc5 in caml_array_unsafe_get (array=-1210587644, index=17) at array.c:102
#9  0x0806592b in caml_interprete (prog=0xb7df9008, prog_size=149264) at interp.c:874
#10 0x080676b3 in caml_main (argv=0xbffff754) at startup.c:404
#11 0x0804fe7f in main (argc=2, argv=0xbffff754) at main.c:35

I have put the backtrace with values of all locals (ie. gdb "bt full"
output) at

  http://baron.tky.hut.fi/ocamlrund-bt.full.txt

for your convenience.

Although this happens randomly, it does happen often enough so I can
reproduce it. So please ask me for more debugging information such as
contents of some heap variables if you feel it might be useful.

Lastly, here's a snippet of ocamlrund output before the crash (from a
different run). From it seems something in the bytecode program gets
crazy. There's nothing in it that should start to allocate memory like
that; it would be nice to get a backtrace though to diagnose the
problem, but I can't get it with either OCAMLRUNPARAM=b or with
ocamldebug, which seems to be confused by vmthreads or something in
the very beginning of the bytecode program[1].

------------------------------
### O'Caml runtime: heap check ###
!Growing heap to 480k bytes
<>$<>$Starting new major GC cycle
### O'Caml runtime: heap check ###
Compacting heap...
### O'Caml runtime: heap check ###
Shrinking heap to 240k bytes
done.
<>Starting new major GC cycle
### O'Caml runtime: heap check ###
!<Growing heap to 2300k bytes
Growing page table to 738 entries
Growing heap to 2540k bytes
Growing page table to 800 entries
Growing heap to 8776k bytes
Growing page table to 2361 entries
Growing heap to 20544k bytes
Growing page table to 5305 entries
file freelist.c; line 123 ### Assertion failed: wo_sz >= 1
------------------------------

	Sami

[1] shortly after "run" ocamldebug just breaks into the prompt without
    any message at all, which I find confusing, but that's already
    another story

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2005-05-27 19:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-27 19:26 Sami Liedes [this message]
2005-05-27 21:13 ` [Caml-list] " Damien Doligez
2005-05-27 22:03   ` Sami Liedes
2005-05-31  1:15 ` Sami Liedes

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=20050527192631.GF4700@sk2-4.tky.hut.fi \
    --to=sliedes@cc.hut.fi \
    --cc=caml-list@yquem.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).