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 LAA10693; Wed, 4 Sep 2002 11:44:39 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA00148 for ; Wed, 4 Sep 2002 11:44:38 +0200 (MET DST) Received: from fichte.ai.univie.ac.at (fichte.ai.univie.ac.at [131.130.174.156]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g849iZD16297; Wed, 4 Sep 2002 11:44:35 +0200 (MET DST) Received: from kiefer.ai.univie.ac.at (markus@kiefer.ai.univie.ac.at [131.130.174.157]) by fichte.ai.univie.ac.at (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id LAA06273; Wed, 4 Sep 2002 11:44:32 +0200 Received: (from markus@localhost) by kiefer.ai.univie.ac.at (8.12.3/8.12.3/Debian -4) id g849iWqe001130; Wed, 4 Sep 2002 11:44:32 +0200 Date: Wed, 4 Sep 2002 11:44:32 +0200 From: Markus Mottl To: Berke Durak Cc: caml-list@inria.fr, caml-bugs Subject: Re: [Caml-list] Native threads under Debian 3.0r0 Message-ID: <20020904094432.GA1375@kiefer.ai.univie.ac.at> Mail-Followup-To: Berke Durak , caml-list@inria.fr, caml-bugs References: <20020903230314.GA311@gogol> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020903230314.GA311@gogol> User-Agent: Mutt/1.4i Organization: Austrian Research Institute for Artificial Intelligence Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 04 Sep 2002, Berke Durak wrote: > I'm having severe problems with native threads. Not only I can't get them to > work with the Graphics module, I can't get them to work at all. I'm > using a fresh Debian 3.0r0. I've recompiled Ocaml 3.06 with > '-with-pthread' option. Shouldn't the following code (cross-posted to caml-bugs) There indeed seems to be something broken about threads (at least native ones). Things work fine with byte-code and the toplevel, but native code + native threads don't. I have managed to reproduced this problem under Linux and Solaris with OCaml 3.06, but also with an older version (3.04+10 - 2002-04-18) on an Alpha (Digital Unix). Regards, Markus Mottl > $ cat toto.ml > open Thread > > let _ = > let code1 () = > let x = ref 0 in > while true do > incr x; > Printf.printf "alpha %d\n" !x; > flush stdout > done > in > let thread1 = Thread.create code1 () > in > while true do > () > done > > compiled with > > $ ocamlopt.opt -thread unix.cmxa threads.cmxa toto.ml -o toto > > and run as > > $ ./toto > > give me something like > > alpha 0 > alpha 1 > alpha 2 > alpha 3 > alpha 4 > alpha 5 > alpha 6 > ... > > ? > > Instead, the program doesn't output anything, and when I hit Ctrl-C, > it leaves some processes running, which can only be killed with > SIGKILL. > > The program works when compiled as bytecode. System info : > > $ uname -a > Linux gogol 2.4.18 #1 Thu Aug 22 20:42:28 CEST 2002 i586 unknown > $ ls -l /lib/libpthread* > -rw-r--r-- 1 root root 102172 Apr 28 11:57 /lib/libpthread-0.9.so > > However, even in bytecode, when I use the Graphics module, some subprocesses > refuse to die when I interrupt the main program. > > Any clues ? Thanks very much. > -- > Berke Durak > ------------------- > 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 -- Markus Mottl markus@oefai.at Austrian Research Institute for Artificial Intelligence http://www.oefai.at/~markus ------------------- 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