From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 1BE19BB81 for ; Sun, 18 Dec 2005 03:48:46 +0100 (CET) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.193]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jBI2mjqw012881 for ; Sun, 18 Dec 2005 03:48:45 +0100 Received: by zproxy.gmail.com with SMTP id 34so883034nzf for ; Sat, 17 Dec 2005 18:48:45 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Mb/I9f+Ba+qcuBa8dvXq+ZRcXyrB4pOmH6u8NT3MoNVBU9nMKkEDfnfyx/MxsuvweDwCeyKBYwKeF/5Jvc6RTEjIbAFWKICkLQGwA8sL4DZM1zV8B4FjRcJB4XRR64y78wzhEj9BgjTY5Y6tPnoGXE7mmXQhmlROm8+uzc67plA= Received: by 10.65.189.12 with SMTP id r12mr2686566qbp; Sat, 17 Dec 2005 18:48:44 -0800 (PST) Received: by 10.65.22.12 with HTTP; Sat, 17 Dec 2005 18:48:44 -0800 (PST) Message-ID: Date: Sun, 18 Dec 2005 15:48:44 +1300 From: Jonathan Roewen To: caml-list@yquem.inria.fr Subject: [Caml-list] caml_callback_depth : byterun + vmthreads MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Miltered: at nez-perce with ID 43A4CE0D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 byterun:01 scheduler:01 grepping:01 byterun:01 interp:01 retval:98 curr:01 thread:02 caml:02 caml:02 instances:02 callback:02 callback:02 depth:06 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 Hi, I found this bit of code in vmthreads/scheduler.c: /* Don't allow preemption during a callback */ if (callback_depth > 1) return curr_thread->retval; I've done some grepping, and I can find one instance of [caml_]callback_depth++ (as far as I can tell, this is done once only), and two instances of [caml_]callback_depth--. These are both in byterun/interp.c. No where else is this value modified that I can find, which has got me baffled. It is the check above that is killing my OS (it never schedules another thread). This also happens randomly. Can some one please explain what the hell is going on? Jonathan