caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Assertion failure in ocamlrund
@ 2005-05-27 19:26 Sami Liedes
  2005-05-27 21:13 ` [Caml-list] " Damien Doligez
  2005-05-31  1:15 ` Sami Liedes
  0 siblings, 2 replies; 4+ messages in thread
From: Sami Liedes @ 2005-05-27 19:26 UTC (permalink / raw)
  To: caml-list

[-- 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 --]

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

end of thread, other threads:[~2005-05-31  1:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-27 19:26 Assertion failure in ocamlrund Sami Liedes
2005-05-27 21:13 ` [Caml-list] " Damien Doligez
2005-05-27 22:03   ` Sami Liedes
2005-05-31  1:15 ` Sami Liedes

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