From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA22151; Tue, 25 Nov 2003 14:20:30 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA23623 for ; Tue, 25 Nov 2003 14:20:26 +0100 (MET) Received: from flyingtuxman.baretta.com ([213.255.109.130]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hAPDKO126817; Tue, 25 Nov 2003 14:20:24 +0100 (MET) Received: from baretta.com (flyingtuxman.baretta.com [127.0.0.1]) by flyingtuxman.baretta.com (8.12.8/8.12.8) with ESMTP id hAPDJoku003217; Tue, 25 Nov 2003 14:19:51 +0100 Message-ID: <3FC356F5.9080309@baretta.com> Date: Tue, 25 Nov 2003 14:19:49 +0100 From: Alex Baretta User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard Jones CC: Ocaml , Jacques Garrigue Subject: Re: [Caml-list] Ocamlc stack overflow References: <3FC23E03.4030805@baretta.com> <20031124174743.GA30052@redhat.com> In-Reply-To: <20031124174743.GA30052@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; baretta:01 baretta:01 caml-list:01 ocamlc:01 overflows:01 ocamlc:01 98%:99 footprint:01 allocating:01 damien:01 damien:01 bugfix:01 overdue:99 backtrace:01 debugging:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Thanks for answering. I finally managed to fix my mail client. I haven't been able to get anything from the list yesterday.. Richard Jones wrote: > On Mon, Nov 24, 2003 at 06:21:07PM +0100, Alex Baretta wrote: > >>I am experiencing stack overflows while compiling a source file with >>ocamlc. Why in world should ocamlc overflow? How can I diagnose the problem? > > > We had this when compiling some OLE code (auto-generated ML). The > workaround was to increase the stack size: I am also trying to compile an auto-generated file, but it is rather small (140 lines of code). The binary search is probably not the way to go, but let me see what happens if I try to increase the stack size... > export OCAMLRUNPARAM=l=16M OK, done that... ocamlc is presently running with 98% of the cpu and some 70 MB of memory footprint. It's almost certainly looping somewhere, allocating it's head off... Damien Doligez wrote: > On Monday, November 24, 2003, at 06:21 PM, Alex Baretta wrote: > > If you are using the CVS version, you should try to update to the > latest one. One version was committed last week with a stack > overflow problem. > > -- Damien I am using the Xavier-patch 2 to ocaml-3.07. I'm not ehntusiastic about using CVS. Since my company uses ocaml as it's main language for developing commercial applications, I'd prefer to have a stable stock version. After all the turmoil around 3.07, a stable bugfix release is overdue now. *** Let try to produce a backtrace for the list... OK, so the standard ocamlc is compiled without debugging info. Let me tweak the Makefile, so that I can build a copy of ocamlc with the -g option. Done that. Here's the command I'm using to run the debugger: [alex@flyingtuxman anagrafiche]$ ocamldebug /opt/ocaml/3.07+2g/bin/ocamlc -I /opt/ocaml/3.07/lib/ocaml/site-lib/postgres -I /opt/ocaml/3.07/lib/ocaml/site-lib/cgi -I /home/alex/cvs/sw2/ocamllib-addons -I /home/alex/cvs/sw2/unixlib-addons -I /home/alex/cvs/sw2/rules-engine -I /home/alex/cvs/sw2/xcaml/xcaml-lib -I /home/alex/cvs/sw2/dbinterface -I /home/alex/cvs/sw2/freerp/db/db_access -I /home/alex/cvs/sw2/freerp/lib -I /home/alex/cvs/sw2/freerp/business_rules -I /home/alex/cvs/sw2/dbschema -I /home/alex/cvs/sw2/freerp/db/xcaml_db_schema -I /home/alex/cvs/sw2/xcaml/xcaml-lib -c inserimento_enti_sql.ml Objective Caml Debugger version 3.07+2 (ocd) run Loading program... done. Time : 2766617 Program end. Uncaught exception: Stack_overflow (ocd) prev Time : 2766616 - pc : 824648 - module Errors No source file for Errors. (ocd) bt #0 Pc : 824648 Errors char 2807 #1 Pc : 68568 Format char 35089 #2 Pc : 830376 Main char 5649 #3 Pc : 834284 Main char 5678 ************ Now what? Alex ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners