From owner-freebsd-threads@FreeBSD.ORG Mon Feb 11 02:37:29 2008 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B15816A417 for ; Mon, 11 Feb 2008 02:37:29 +0000 (UTC) (envelope-from wagner@luthien.iceflower.in-berlin.de) Received: from fallback-mx.in-berlin.de (fallback-mx.in-berlin.de [192.109.42.17]) by mx1.freebsd.org (Postfix) with ESMTP id 7890F13C4EB for ; Mon, 11 Feb 2008 02:37:28 +0000 (UTC) (envelope-from wagner@luthien.iceflower.in-berlin.de) Received: from hirsch.in-berlin.de (hirsch.in-berlin.de [192.109.42.6]) by fallback-mx.in-berlin.de (8.14.1/8.13.6/Debian-1) with ESMTP id m1B1e3a0017479 for ; Mon, 11 Feb 2008 02:40:03 +0100 X-Envelope-From: wagner@luthien.iceflower.in-berlin.de X-Envelope-To: Received: from hirsch.in-berlin.de (localhost [127.0.0.1]) by hirsch.in-berlin.de (8.14.2/8.14.2/Debian-2) with ESMTP id m1B1e2Zn028573 for ; Mon, 11 Feb 2008 02:40:02 +0100 Received: (from uucp@localhost) by hirsch.in-berlin.de (8.14.2/8.14.2/Submit) with UUCP id m1B1e20M028572 for freebsd-threads@freebsd.org; Mon, 11 Feb 2008 02:40:02 +0100 Received: (from wagner@localhost) by luthien.iceflower.in-berlin.de (8.14.2/8.14.2) id m1B1bSDi055003 for freebsd-threads@freebsd.org; Mon, 11 Feb 2008 02:37:28 +0100 (CET) (envelope-from wagner) Date: Mon, 11 Feb 2008 02:37:28 +0100 From: Olaf Wagner To: freebsd-threads@freebsd.org Message-ID: <20080211013728.GB54462@luthien.in-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 Subject: FreeBSD Threading Documentation X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2008 02:37:29 -0000 I haven't found much, so I think I'll have to ask here after all: Is there any overview article or design document about the different threading implementations in FreeBSD? Thanks in advance, Olaf -- /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ || Olaf Wagner | wagner(at)luthien.in-berlin.de (priv.)| || Cranachstrasse 7 | wagner(at)elego.de (business) | || D-12157 Berlin | phone: +49 30 85 60 26 70 | || Germany / Deutschland | ab/am: +49 30 85 58 01 81 | \///////////////////////////////////////////////////////////////// From owner-freebsd-threads@FreeBSD.ORG Mon Feb 11 03:13:25 2008 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D80F416A417 for ; Mon, 11 Feb 2008 03:13:25 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id C5E5A13C4CE for ; Mon, 11 Feb 2008 03:13:25 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id B1EDC1A4D83; Sun, 10 Feb 2008 19:13:25 -0800 (PST) Date: Sun, 10 Feb 2008 19:13:25 -0800 From: Alfred Perlstein To: Olaf Wagner Message-ID: <20080211031325.GF99258@elvis.mu.org> References: <20080211013728.GB54462@luthien.in-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080211013728.GB54462@luthien.in-berlin.de> User-Agent: Mutt/1.4.2.3i Cc: freebsd-threads@freebsd.org Subject: Re: FreeBSD Threading Documentation X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2008 03:13:25 -0000 * Olaf Wagner [080210 18:37] wrote: > I haven't found much, so I think I'll have to ask here after all: > > Is there any overview article or design document about the > different threading implementations in FreeBSD? There have been a few approaches taken over the years, an N-1(libc_r), N-M(libkse) and N-N (libthr). Currently FreeBSD supports pthreads using libthr which is pretty much the same way that Solaris and Linux support pthreads. -- - Alfred Perlstein From owner-freebsd-threads@FreeBSD.ORG Mon Feb 11 07:35:05 2008 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3726E16A41B; Mon, 11 Feb 2008 07:35:05 +0000 (UTC) (envelope-from wagner@luthien.iceflower.in-berlin.de) Received: from hirsch.in-berlin.de (hirsch.in-berlin.de [192.109.42.6]) by mx1.freebsd.org (Postfix) with ESMTP id 876B713C45E; Mon, 11 Feb 2008 07:35:04 +0000 (UTC) (envelope-from wagner@luthien.iceflower.in-berlin.de) X-Envelope-From: wagner@luthien.iceflower.in-berlin.de Received: from hirsch.in-berlin.de (localhost [127.0.0.1]) by hirsch.in-berlin.de (8.14.2/8.14.2/Debian-2) with ESMTP id m1B7Z2W1021960; Mon, 11 Feb 2008 08:35:02 +0100 Received: (from uucp@localhost) by hirsch.in-berlin.de (8.14.2/8.14.2/Submit) with UUCP id m1B7Z2q9021959; Mon, 11 Feb 2008 08:35:02 +0100 Received: (from wagner@localhost) by luthien.iceflower.in-berlin.de (8.14.2/8.14.2) id m1B7O2E2059772; Mon, 11 Feb 2008 08:24:02 +0100 (CET) (envelope-from wagner) Date: Mon, 11 Feb 2008 08:24:02 +0100 From: Olaf Wagner To: Alfred Perlstein Message-ID: <20080211072402.GA59256@luthien.in-berlin.de> References: <20080211013728.GB54462@luthien.in-berlin.de> <20080211031325.GF99258@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080211031325.GF99258@elvis.mu.org> User-Agent: Mutt/1.5.11 Cc: freebsd-threads@freebsd.org Subject: Re: FreeBSD Threading Documentation X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2008 07:35:05 -0000 On Sun, Feb 10, 2008 at 07:13:25PM -0800, Alfred Perlstein wrote: > * Olaf Wagner [080210 18:37] wrote: > > I haven't found much, so I think I'll have to ask here after all: > > > > Is there any overview article or design document about the > > different threading implementations in FreeBSD? > > There have been a few approaches taken over the years, > an N-1(libc_r), N-M(libkse) and N-N (libthr). > > Currently FreeBSD supports pthreads using libthr which > is pretty much the same way that Solaris and Linux support > pthreads. That's about how much I had already figured out :-) I am looking for something a little bit longer (let's say about 5-12 pages) which discusses the design and compares two or more of the solutions. Or is the source code the only available documentation? The FreeBSD documentation project has amassed such a wealth of information, but I couldn't find anything related to threads, which does not seem a very uncommon topic to me. The reason because I'm asking is that I've started to use FreeBSD's system threading libraries for CM3 instead of the built-in user threads system, and there are several interesting effects (hangs, assertion failures, ...) with one or the other of the libraries, which may either be located in M3 or in C code. Olaf -- /\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ || Olaf Wagner | wagner(at)luthien.in-berlin.de (priv.)| || Cranachstrasse 7 | wagner(at)elego.de (business) | || D-12157 Berlin | phone: +49 30 85 60 26 70 | || Germany / Deutschland | ab/am: +49 30 85 58 01 81 | \///////////////////////////////////////////////////////////////// From owner-freebsd-threads@FreeBSD.ORG Mon Feb 11 11:07:16 2008 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 637DF16A417 for ; Mon, 11 Feb 2008 11:07:16 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4B85713C45A for ; Mon, 11 Feb 2008 11:07:16 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m1BB7GSH007562 for ; Mon, 11 Feb 2008 11:07:16 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m1BB7FnV007558 for freebsd-threads@FreeBSD.org; Mon, 11 Feb 2008 11:07:15 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 11 Feb 2008 11:07:15 GMT Message-Id: <200802111107.m1BB7FnV007558@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-threads@FreeBSD.org X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2008 11:07:16 -0000 Current FreeBSD problem reports Critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- s threa/76690 threads fork hang in child for -lc_r 1 problem total. Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- s threa/24472 threads libc_r does not honor SO_SNDTIMEO/SO_RCVTIMEO socket o s threa/24632 threads libc_r delicate deviation from libc in handling SIGCHL s bin/32295 threads pthread dont dequeue signals s threa/34536 threads accept() blocks other threads f kern/38549 threads the procces compiled whith pthread stopped in pthread_ s threa/39922 threads [threads] [patch] Threaded applications executed with s threa/48856 threads Setting SIGCHLD to SIG_IGN still leaves zombies under s threa/49087 threads Signals lost in programs linked with libc_r o threa/70975 threads unexpected and unreliable behaviour when using SYSV se o threa/72953 threads fork() unblocks blocked signals w/o PTHREAD_SCOPE_SYST o threa/75273 threads FBSD 5.3 libpthread (KSE) bug o threa/75374 threads pthread_kill() ignores SA_SIGINFO flag s threa/76694 threads fork cause hang in dup()/close() function in child (-l o threa/79683 threads svctcp_create() fails if multiple threads call at the o threa/80435 threads panic on high loads o threa/83914 threads [libc] popen() doesn't work in static threaded program s threa/84483 threads problems with devel/nspr and -lc_r on 4.x s threa/94467 threads send(), sendto() and sendmsg() are not correct in libc s threa/100815 threads FBSD 5.5 broke nanosleep in libc_r o threa/101323 threads fork(2) in threaded programs broken. o threa/103975 threads Implicit loading/unloading of libpthread.so may crash o threa/110636 threads [request] gdb(1): using gdb with multi thread applicat o threa/118715 threads kse problem o threa/119920 threads [patch] fork broken in libpthread 24 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- s threa/30464 threads pthread mutex attributes -- pshared s threa/37676 threads libc_r: msgsnd(), msgrcv(), pread(), pwrite() need wra s threa/40671 threads pthread_cancel doesn't remove thread from condition qu s threa/69020 threads pthreads library leaks _gc_mutex o threa/79887 threads [patch] freopen() isn't thread-safe o threa/80992 threads abort() sometimes not caught by gdb depending on threa o threa/110306 threads apache 2.0 segmentation violation when calling gethost o threa/115211 threads pthread_atfork misbehaves in initial thread o threa/116181 threads /dev/io-related io access permissions are not propagat o threa/116668 threads can no longer use jdk15 with libthr on -stable SMP 10 problems total. From owner-freebsd-threads@FreeBSD.ORG Mon Feb 11 15:18:10 2008 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6C2816A417 for ; Mon, 11 Feb 2008 15:18:10 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id D827313C467 for ; Mon, 11 Feb 2008 15:18:10 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 7BB3B1A4D8B; Mon, 11 Feb 2008 07:18:10 -0800 (PST) Date: Mon, 11 Feb 2008 07:18:10 -0800 From: Alfred Perlstein To: Olaf Wagner Message-ID: <20080211151810.GH99258@elvis.mu.org> References: <20080211013728.GB54462@luthien.in-berlin.de> <20080211031325.GF99258@elvis.mu.org> <20080211072402.GA59256@luthien.in-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080211072402.GA59256@luthien.in-berlin.de> User-Agent: Mutt/1.4.2.3i Cc: freebsd-threads@freebsd.org Subject: Re: FreeBSD Threading Documentation X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2008 15:18:11 -0000 * Olaf Wagner [080210 23:35] wrote: > On Sun, Feb 10, 2008 at 07:13:25PM -0800, Alfred Perlstein wrote: > > * Olaf Wagner [080210 18:37] wrote: > > > I haven't found much, so I think I'll have to ask here after all: > > > > > > Is there any overview article or design document about the > > > different threading implementations in FreeBSD? > > > > There have been a few approaches taken over the years, > > an N-1(libc_r), N-M(libkse) and N-N (libthr). > > > > Currently FreeBSD supports pthreads using libthr which > > is pretty much the same way that Solaris and Linux support > > pthreads. > > That's about how much I had already figured out :-) > I am looking for something a little bit longer (let's > say about 5-12 pages) which discusses the design and compares > two or more of the solutions. Or is the source code the > only available documentation? > > The FreeBSD documentation project has amassed such a wealth > of information, but I couldn't find anything related to threads, > which does not seem a very uncommon topic to me. > > The reason because I'm asking is that I've started to use > FreeBSD's system threading libraries for CM3 instead of the > built-in user threads system, and there are several interesting > effects (hangs, assertion failures, ...) with one or the other > of the libraries, which may either be located in M3 or in C > code. I'm not aware of a document like that. If you work with the current thread maintainers you might be able to get assertion hooks and further debug assistance. Good luck, -- - Alfred Perlstein