From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 79407BCAB for ; Fri, 27 May 2005 21:31:15 +0200 (CEST) Received: from smtp-1.hut.fi (smtp-1.hut.fi [130.233.228.91]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j4RJVEvs017813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 27 May 2005 21:31:15 +0200 Received: from localhost (katosiko.hut.fi [130.233.228.115]) by smtp-1.hut.fi (8.12.10/8.12.10) with ESMTP id j4RJVEd3002312 for ; Fri, 27 May 2005 22:31:14 +0300 Received: from smtp-1.hut.fi ([130.233.228.91]) by localhost (katosiko.hut.fi [130.233.228.115]) (amavisd-new, port 10024) with LMTP id 20193-51 for ; Fri, 27 May 2005 22:31:12 +0300 (EEST) Received: from vipunen.hut.fi (vipunen.hut.fi [130.233.228.9]) by smtp-1.hut.fi (8.12.10/8.12.10) with ESMTP id j4RJQ9FL001588 for ; Fri, 27 May 2005 22:26:09 +0300 Received: (from sliedes@localhost) by vipunen.hut.fi (8.12.10/8.12.9/Submit) id j4RJPtBQ017342 for caml-list@yquem.inria.fr; Fri, 27 May 2005 22:25:55 +0300 (EEST) Received: by sk2-4.tky.hut.fi (hashcash-sendmail, from uid 1000); Fri, 27 May 2005 22:26:31 +0300 Date: Fri, 27 May 2005 22:26:31 +0300 From: Sami Liedes To: caml-list@yquem.inria.fr Subject: Assertion failure in ocamlrund Message-ID: <20050527192631.GF4700@sk2-4.tky.hut.fi> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bKyqfOwhbdpXa4YI" Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Hashcash: 1:24:050527:caml-list@yquem.inria.fr::wx2T3nOVyaMDS9gU:0000000000000 000000000000000000000003HMEf X-TKK-Virus-Scanned: by amavisd-new-2.1.2-hutcc at katosiko.hut.fi X-Miltered: at concorde with ID 42977582.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; assertion:01 ocamlrund:01 ocamlrun:01 segfault:01 uncaught:01 debugging:01 freelist:01 assertion:01 backtrace:01 expr:01 freelist:01 alloc:01 wosize:01 oldify:01 minor:01 X-Attachments: type="application/pgp-signature" name="signature.asc" X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: --bKyqfOwhbdpXa4YI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 ### != 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 --bKyqfOwhbdpXa4YI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCl3Rnyc0QC7DZBM8RAst9AJ4mlW3Zi3SF6PWA8D4NYP69Z+mDwgCeMalC Y78+Sd/jCdvO1yEIE4kaV8Q= =/r0s -----END PGP SIGNATURE----- --bKyqfOwhbdpXa4YI--