From owner-freebsd-threads@FreeBSD.ORG Mon Dec 4 11:09:07 2006 Return-Path: X-Original-To: freebsd-threads@FreeBSD.org Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9912016A517 for ; Mon, 4 Dec 2006 11:09:07 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9568543CC0 for ; Mon, 4 Dec 2006 11:08:18 +0000 (GMT) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kB4B8nm9045554 for ; Mon, 4 Dec 2006 11:08:49 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kB4B8mp6045550 for freebsd-threads@FreeBSD.org; Mon, 4 Dec 2006 11:08:48 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 4 Dec 2006 11:08:48 GMT Message-Id: <200612041108.kB4B8mp6045550@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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, 04 Dec 2006 11:09:07 -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 -------------------------------------------------------------------------------- o kern/20016 threads pthreads: Cannot set scheduling timer/Cannot set virtu 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 o 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 s kern/64313 threads FreeBSD (OpenBSD) pthread implicit set/unset O_NONBLOC o threa/70975 threads unexpected and unreliable behaviour when using SYSV se o threa/72353 threads Assertion fails in /usr/src/lib/libpthread/sys/lock.c, o threa/72429 threads threads blocked in stdio (fgets, etc) are not cancella 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 o threa/85160 threads [libthr] [patch] libobjc + libpthread/libthr crash pro o threa/90278 threads libthr, ULE and -current produces >100% WCPU with apac o kern/91266 threads [threads] Trying sleep, but thread marked as sleeping s threa/94467 threads send(), sendto() and sendmsg() are not correct in libc f threa/98256 threads gnome-system-monitor core dumps from pthread_testcance 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 29 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- s kern/19247 threads uthread_sigaction.c does not do anything wrt SA_NOCLDW s kern/22190 threads A threaded read(2) from a socketpair(2) fd can sometim 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/74180 threads KSE problem. Applications those riched maximum possibl 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/81534 threads [libc_r] [patch] libc_r close() will fail on any fd ty 10 problems total. From owner-freebsd-threads@FreeBSD.ORG Mon Dec 4 20:09:36 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 693AB16A50B for ; Mon, 4 Dec 2006 20:09:36 +0000 (UTC) (envelope-from katsuo_harada_evil_does@hotmail.com) Received: from bay0-omc1-s39.bay0.hotmail.com (bay0-omc1-s39.bay0.hotmail.com [65.54.246.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAFFA43F97 for ; Mon, 4 Dec 2006 20:04:18 +0000 (GMT) (envelope-from katsuo_harada_evil_does@hotmail.com) Received: from hotmail.com ([65.55.133.95]) by bay0-omc1-s39.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 4 Dec 2006 12:02:57 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 4 Dec 2006 12:02:57 -0800 Message-ID: Received: from 65.55.133.123 by by128fd.bay128.hotmail.msn.com with HTTP; Mon, 04 Dec 2006 20:02:57 GMT X-Originating-IP: [130.243.142.27] X-Originating-Email: [katsuo_harada_evil_does@hotmail.com] X-Sender: katsuo_harada_evil_does@hotmail.com From: "Joshua M" To: freebsd-threads@freebsd.org Date: Mon, 04 Dec 2006 21:02:57 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 04 Dec 2006 20:02:57.0385 (UTC) FILETIME=[3131ED90:01C717DF] X-Mailman-Approved-At: Mon, 04 Dec 2006 20:57:48 +0000 Subject: Threading arch quetions 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, 04 Dec 2006 20:09:36 -0000 Hello, Sorry for disturbing but i have some questions concerning threaded arch in FreeBSD. Sorry for possible repeating also. 1. What was primary concern when adopting KSE based threading model ? 2. Is there benchmarks comparing Linux's NPTL and KSE based pthreads in FreeBSD ? Thank you. _________________________________________________________________ Windows Live Messenger sur i-mode™ : dialoguez avec vos amis depuis votre mobile comme sur PC ! http://mobile.live.fr/messenger/bouygues/ From owner-freebsd-threads@FreeBSD.ORG Mon Dec 4 21:57:55 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D2E7016AA06 for ; Mon, 4 Dec 2006 21:57:55 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outQ.internet-mail-service.net (outQ.internet-mail-service.net [216.240.47.240]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B42143CD6 for ; Mon, 4 Dec 2006 21:56:57 +0000 (GMT) (envelope-from julian@elischer.org) Received: from shell.idiom.com (HELO idiom.com) (216.240.47.20) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Mon, 04 Dec 2006 13:43:37 -0800 Received: from [10.251.18.229] (nat.ironport.com [63.251.108.100]) by idiom.com (8.12.11/8.12.11) with ESMTP id kB4LvOhD007266; Mon, 4 Dec 2006 13:57:25 -0800 (PST) (envelope-from julian@elischer.org) Message-ID: <457499BD.9080000@elischer.org> Date: Mon, 04 Dec 2006 13:57:17 -0800 From: Julian Elischer User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) MIME-Version: 1.0 To: Joshua M References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-threads@freebsd.org Subject: Re: Threading arch quetions 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, 04 Dec 2006 21:57:56 -0000 Joshua M wrote: > Hello, > > Sorry for disturbing but i have some questions concerning threaded arch > in FreeBSD. > Sorry for possible repeating also. > > 1. What was primary concern when adopting KSE based threading model ? We adopted a scheme which would allow us to implement both M:N threads and 1:1 threads with compatible libraries that do it each way. The hope was that this would allow people to experiment with these. and for us to be able to select the best approach. After a couple of years, the general consensus is that M:N threads has added complexity that keeps it from reaching it's theoretical potential. There are examples where M:N outperforms 1:1 but they are the minority, so we will be switching the default library to 1:1 threads and making the M:N library available to those applications for which it makes more sense. We will continue to keep M:N threading available where it is currently supported, but there are a lot of complexities that make things like correct statistics (per thread) and debugging, to be more difficult in M:N threading. Note that the kernel support for threads is the same for both models, where processes have sub-entities (kernel schedulable entities) called threads, as opposed to in Linux where each thread is a separate process. > 2. Is there benchmarks comparing Linux's NPTL and KSE based pthreads in > FreeBSD ? Not generally..there are some that show performance problems with the FreeBSD threads and there is an ongoing project to improve the situation. > > Thank you. > > _________________________________________________________________ > Windows Live Messenger sur i-mode™ : dialoguez avec vos amis depuis > votre mobile comme sur PC ! http://mobile.live.fr/messenger/bouygues/ > > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" From owner-freebsd-threads@FreeBSD.ORG Tue Dec 5 06:52:26 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 391DE16A40F for ; Tue, 5 Dec 2006 06:52:26 +0000 (UTC) (envelope-from vaidehi.shukla@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AAC543C9D for ; Tue, 5 Dec 2006 06:51:48 +0000 (GMT) (envelope-from vaidehi.shukla@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so126309nfc for ; Mon, 04 Dec 2006 22:52:24 -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; b=taSEXH0y4PePtD0twioT+Yum1nmeyusuyXAkVOlESKb7kHrxu6xFPt27Em86oOKAyQqWon03MRJKt4ZDDs0gHF8reVeiMZTlt4gjF6lSnSw7XgwVSwlxiXP5z3+xYooA4K5A4q9ZBeDXRa8VRfRjLwvQspDzKZAs5KlEr6hJ+Ls= Received: by 10.82.172.15 with SMTP id u15mr944339bue.1165301544277; Mon, 04 Dec 2006 22:52:24 -0800 (PST) Received: by 10.82.127.11 with HTTP; Mon, 4 Dec 2006 22:52:24 -0800 (PST) Message-ID: <90242b1f0612042252p25ccca99i54a19d0f288e826c@mail.gmail.com> Date: Tue, 5 Dec 2006 12:22:24 +0530 From: "Vaidehi Shukla" To: freebsd-threads MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Debugging threaded application 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: Tue, 05 Dec 2006 06:52:26 -0000 Hi, Here I've written following gdb macro: define thbt info threads set $_count=1 while ( $_count < 3 ) thread $_count bt set $_count++ end end document thbt Display backtrack of all the threads end 'thread $_count' command returns error: (gdb) thread $_count Thread ID 0 not known. Use the "info threads" command to see the IDs of currently known threads. Means 'thread' command doesn't understand shell variable. Other commands like 'print' works properly with shell variable. I'm using '4.18' gdb version. Let me know if anybody has some idea why it's not working and how to make it correct. Regards, Vaidehi From owner-freebsd-threads@FreeBSD.ORG Tue Dec 5 11:29:18 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 34DB416A407 for ; Tue, 5 Dec 2006 11:29:18 +0000 (UTC) (envelope-from katsuo_harada_evil_does@hotmail.com) Received: from bay0-omc3-s31.bay0.hotmail.com (bay0-omc3-s31.bay0.hotmail.com [65.54.246.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 524DE43CA2 for ; Tue, 5 Dec 2006 11:28:39 +0000 (GMT) (envelope-from katsuo_harada_evil_does@hotmail.com) Received: from hotmail.com ([65.55.133.89]) by bay0-omc3-s31.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 5 Dec 2006 03:29:17 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 5 Dec 2006 03:29:17 -0800 Message-ID: Received: from 65.55.133.123 by by128fd.bay128.hotmail.msn.com with HTTP; Tue, 05 Dec 2006 11:29:14 GMT X-Originating-IP: [130.238.13.124] X-Originating-Email: [katsuo_harada_evil_does@hotmail.com] X-Sender: katsuo_harada_evil_does@hotmail.com In-Reply-To: <457499BD.9080000@elischer.org> From: "Joshua M" To: julian@elischer.org Date: Tue, 05 Dec 2006 12:29:14 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 05 Dec 2006 11:29:17.0230 (UTC) FILETIME=[995D3CE0:01C71860] X-Mailman-Approved-At: Tue, 05 Dec 2006 13:00:05 +0000 Cc: freebsd-threads@freebsd.org Subject: Re: Threading arch quetions 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: Tue, 05 Dec 2006 11:29:18 -0000 >From: Julian Elischer >To: Joshua M >CC: freebsd-threads@freebsd.org >Subject: Re: Threading arch quetions >Date: Mon, 04 Dec 2006 13:57:17 -0800 >We adopted a scheme which would allow us to implement both M:N threads >and 1:1 threads with compatible libraries that do it each way. >The hope was that this would allow people to experiment with these. >and for us to be able to select the best approach. Thank you for your response. Can you please name those libs ? >There are examples where M:N outperforms 1:1 but they are the >minority, so we will be switching the default library to >1:1 threads What is the default library ? > >Note that the kernel support for threads is the same for both models, >where processes have sub-entities (kernel schedulable entities) called >threads, as opposed to in Linux where each thread is a separate process. This is the point i dont understand at all. As i understood KSE is an N to M approach and it is implemented in FBSD. So how 1:1 is supposed to coexist if finally everythig is converted to N to M ? does it mean that basically FBSD if it wants 1 to 1 always creates 1 KSEG per thread and thus create a *simulation* of 1 to 1 approach ? Thank you again. _________________________________________________________________ Windows Live Spaces : créez votre Space à votre image ! http://www.windowslivespaces.fr/ From owner-freebsd-threads@FreeBSD.ORG Tue Dec 5 17:32:19 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA8D416A416 for ; Tue, 5 Dec 2006 17:32:19 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outL.internet-mail-service.net (outL.internet-mail-service.net [216.240.47.235]) by mx1.FreeBSD.org (Postfix) with ESMTP id F13C043CA6 for ; Tue, 5 Dec 2006 17:31:37 +0000 (GMT) (envelope-from julian@elischer.org) Received: from shell.idiom.com (HELO idiom.com) (216.240.47.20) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Tue, 05 Dec 2006 09:15:52 -0800 Received: from [192.168.2.4] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id kB5HTiWg053830; Tue, 5 Dec 2006 09:29:45 -0800 (PST) (envelope-from julian@elischer.org) Message-ID: <4575AC88.3010208@elischer.org> Date: Tue, 05 Dec 2006 09:29:44 -0800 From: Julian Elischer User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) MIME-Version: 1.0 To: Joshua M References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-threads@freebsd.org Subject: Re: Threading arch quetions 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: Tue, 05 Dec 2006 17:32:20 -0000 Joshua M wrote: >> From: Julian Elischer >> To: Joshua M >> CC: freebsd-threads@freebsd.org >> Subject: Re: Threading arch quetions >> Date: Mon, 04 Dec 2006 13:57:17 -0800 > >> We adopted a scheme which would allow us to implement both M:N threads >> and 1:1 threads with compatible libraries that do it each way. >> The hope was that this would allow people to experiment with these. >> and for us to be able to select the best approach. > > Thank you for your response. > Can you please name those libs ? /usr/lib/libpthread.so (also known in the past as libkse.so) M:N library (though it can be configured to run 1:1) /usr/lib/libthr.so 1:1 library > >> There are examples where M:N outperforms 1:1 but they are the >> minority, so we will be switching the default library to >> 1:1 threads > > What is the default library ? libpthread.so (for now) > >> >> Note that the kernel support for threads is the same for both models, >> where processes have sub-entities (kernel schedulable entities) called >> threads, as opposed to in Linux where each thread is a separate process. > > This is the point i dont understand at all. As i understood KSE is an N > to M approach and it is implemented in FBSD. So how 1:1 is supposed to > coexist if finally everythig is converted to N to M ? does it mean that > basically FBSD if it wants 1 to 1 always creates 1 KSEG per thread and > thus create a *simulation* of 1 to 1 approach ? in M:N threading, you only create a small number of kernel threads. Whenever a user thread goes into the kernel and BLOCKS there, you create a new kernel thread and allow it to go back to userland in place of teh one that blocked, to give the userland threads a chance to keep running. in 1:1 threading you create more kernel threads.. one for each user thread, so when one blocks, no extra work is needed.. the other user threads already HAVE the capacity to keep running. nothing is simulated.. > > Thank you again. > > _________________________________________________________________ > Windows Live Spaces : créez votre Space à votre image ! > http://www.windowslivespaces.fr/