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 IAA18337; Fri, 12 Sep 2003 08:34:59 +0200 (MET DST) 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 IAA16265 for ; Fri, 12 Sep 2003 08:34:58 +0200 (MET DST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.184]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h8C6Yvf24307 for ; Fri, 12 Sep 2003 08:34:57 +0200 (MET DST) Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19xhWD-00025p-00; Fri, 12 Sep 2003 08:34:57 +0200 Received: from [80.129.102.66] (helo=gate.gerd-stolpmann.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19xhWC-00079n-00; Fri, 12 Sep 2003 08:34:56 +0200 Received: from ice.gerd-stolpmann.de (ice.gerd-stolpmann.de [192.168.0.13]) by gate.gerd-stolpmann.de (Postfix) with ESMTP id CCB9656F1; Fri, 12 Sep 2003 08:34:55 +0200 (CEST) Received: by ice.gerd-stolpmann.de (Postfix, from userid 1000) id C8767B039; Fri, 12 Sep 2003 08:34:52 +0200 (CEST) Subject: Re: [Caml-list] FreeBSD + lablglut + thread: bug or not bug From: Gerd Stolpmann To: Christophe Raffalli Cc: ijtrotts@ucdavis.edu, caml-list@inria.fr In-Reply-To: <3F61604A.6050201@univ-savoie.fr> References: <20030910185255.GF25815@ecooper.com> <3F607D6F.4010405@univ-savoie.fr> <20030911173321.GA4359@beech> <3F60D66A.2010204@univ-savoie.fr> <3F61604A.6050201@univ-savoie.fr> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1063348491.958.24.camel@ice.gerd-stolpmann.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 12 Sep 2003 08:34:52 +0200 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 lablglut:01 bug:01 bug:01 gerd:01 stolpmann:01 fre:99 raffalli:01 user-level:01 crashes:01 userland:01 threading:01 watches:99 gerd:01 debugging:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Am Fre, 2003-09-12 um 07.57 schrieb Christophe Raffalli: > I was wrong to say other multi-threaded code work: here is a stack of > a crashed kcontrol ... I would not conclude that from this stack trace. libc_r is a user-level multi-threading emulation, and many system calls (such as "poll" here) are redefined to get the effect of the emulation. Maybe the code crashes in __sys_poll because kcontrol called "poll" with an invalid pointer; a userland threading library cannot check whether addresses are valid like the kernel does for real system calls. Concerning the stability of libc_r I found the bug that the signal mask is not restored after the signal routine has finished execution. For most multi-threaded applications this is not a big problem: They usually do not define signal handlers at all, because this has the disadavantage that it is undefined in which thread the signal handler runs. Instead, there is often a separate thread that watches for signals (sigsuspend). However, O'Caml relies on correct signal semantics, especially for multi-threaded applications, because it uses an alarm timer to implement its own time-sharing policy. Consider O'Caml as a "stress test" for the multi-threading implementation. Gerd > > ..... > (no debugging symbols found)...(no debugging symbols found)... > (no debugging symbols found)...(no debugging symbols found)... > (no debugging symbols found)...0x28ec256c in __sys_poll () > from /usr/lib/libc_r.so.4 > #0 0x28ec256c in __sys_poll () from /usr/lib/libc_r.so.4 > #1 0x28ec1ab8 in _thread_kern_sched_state_unlock () from > /usr/lib/libc_r.so.4 > #2 0x28ec147d in _thread_kern_scheduler () from /usr/lib/libc_r.so.4 > #3 0x0 in ?? () -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de ------------------------------------------------------------ ------------------- 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