From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 168037EC41 for ; Tue, 16 Oct 2012 17:50:45 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of lhong@amnh.org) identity=pra; client-ip=216.73.244.167; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="lhong@amnh.org"; x-sender="lhong@amnh.org"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of lhong@amnh.org) identity=mailfrom; client-ip=216.73.244.167; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="lhong@amnh.org"; x-sender="lhong@amnh.org"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-mx-002.amnh.org) identity=helo; client-ip=216.73.244.167; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="lhong@amnh.org"; x-sender="postmaster@mail-mx-002.amnh.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtEAAMOBfVDYSfSnmWdsb2JhbAArGoJuvRQjAQEBAQEICwsHFCeCIAEBAQQ6PxACAQgOAwQBAQEKFBAyHQgBAQQOBQiHfAEKLKpMkE6LT4VdYAOXAIoKiACCFw X-IronPort-AV: E=Sophos;i="4.80,593,1344204000"; d="scan'208";a="159243052" Received: from mail-mx-002.amnh.org ([216.73.244.167]) by mail4-smtp-sop.national.inria.fr with ESMTP; 16 Oct 2012 17:50:44 +0200 X-ASG-Debug-ID: 1350402624-04264141a730580001-jBxyQn Received: from amnh.org ([172.16.8.238]) by mail-mx-002.amnh.org with ESMTP id MNy74jrao8JAf3s8; Tue, 16 Oct 2012 11:50:24 -0400 (EDT) X-Barracuda-Envelope-From: lhong@amnh.org Received: from MAIL-MBX-004.internal.amnh.org ([fe80::7070:e0a1:bc56:c30a]) by MAIL-CASHT-003.internal.amnh.org ([fe80::a487:6081:d54f:db9e%12]) with mapi id 14.01.0289.001; Tue, 16 Oct 2012 11:50:23 -0400 From: Lin Hong X-Barracuda-Apparent-Source-IP: fe80::7070:e0a1:bc56:c30a To: David House CC: "caml-list@inria.fr" Thread-Topic: [Caml-list] Segmentation fault from Array.append X-ASG-Orig-Subj: RE: [Caml-list] Segmentation fault from Array.append Thread-Index: Ac2rr9EX9pdeTykEReS0KJzd2+kKjgAIiimA///EARWAAETNAP//vV2J Date: Tue, 16 Oct 2012 15:50:22 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.8.249] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: UNKNOWN[172.16.8.238] X-Barracuda-Start-Time: 1350402624 X-Barracuda-URL: http://spam.amnh.org:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at amnh.org X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=4.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.111512 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Subject: RE: [Caml-list] Segmentation fault from Array.append oh yes, we have c functions called from ocaml. if any of them screw heap up, why gdb debug didn't say anything. is there s= ome debug option that we can get a closer look at heap? Thanks, Lin Hong American Museum of Natural History POY website : https://code.google.com/p/poy/ http://research.amnh.org/scicomp/scripts/download.php ________________________________________ From: David House [dhouse@janestreet.com] Sent: Tuesday, October 16, 2012 11:42 AM To: Lin Hong Cc: caml-list@inria.fr Subject: Re: [Caml-list] Segmentation fault from Array.append By "c stubs" I really mean c functions that you're calling from ocaml. It's very easy to get such things wrong and stamp all over your heap. On Tue, Oct 16, 2012 at 4:41 PM, Lin Hong wrote: > > > if by "c stubs" you mean some function that holding up place but does not= hing, we are not doing any of that. > > and yes it's reproducible on one mac, I will test it on other machine wit= h Ocaml4.X.X > > > Thanks, > Lin Hong > American Museum of Natural History > POY website : > https://code.google.com/p/poy/ > http://research.amnh.org/scicomp/scripts/download.php > > ________________________________________ > From: David House [dhouse@janestreet.com] > Sent: Tuesday, October 16, 2012 11:10 AM > To: Lin Hong > Cc: caml-list@inria.fr > Subject: Re: [Caml-list] Segmentation fault from Array.append > > Segfaults in the GC are often the fault of random heap corruption. Are > you using any C stubs that might be at fault here? > > Is the fault reproducable? > > On Tue, Oct 16, 2012 at 4:08 PM, Lin Hong wrote: >> Hi, all >> >> we got a Segmentation fault with Ocaml 4.0.0 and 4.0.1 from append funct= ion >> of Array. gdb traceback give us this: >> >> Program received signal EXC_BAD_ACCESS, Could not access memory. >> Reason: KERN_INVALID_ADDRESS at address: 0x0000000107b65000 >> 0x0000000100488840 in mark_slice () >> (gdb) backtrace >> #0 0x0000000100488840 in mark_slice () >> #1 0x0000000100489216 in caml_major_collection_slice () >> #2 0x000000010048984c in caml_check_urgent_gc () >> #3 0x000000010048f26d in caml_array_gather () >> #4 0x000000010048f42e in caml_array_append () >> #5 0x00000001003ef216 in .L363 () >> Previous frame inner to this frame (gdb could not unwind past this frame) >> (gdb) >> >> looks like the error is from array.c >> >> we don't see this problem with Ocaml3.X.X, they have different array >> function in the cside anyway. >> >> Does anyone else have similar problem like this? >> >> >> Thanks in advance for any suggestions. >> >> Cheers, >> Lin Hong >> American Museum of Natural History >> POY website : >> https://code.google.com/p/poy/ >> http://research.amnh.org/scicomp/scripts/download.php