From owner-freebsd-threads@FreeBSD.ORG Mon May 19 14:48:36 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BAC437B401 for ; Mon, 19 May 2003 14:48:36 -0700 (PDT) Received: from h132-197-179-27.gte.com (h132-197-179-27.gte.com [132.197.179.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F8B143FAF for ; Mon, 19 May 2003 14:48:35 -0700 (PDT) (envelope-from ak03@gte.com) Received: from kanpc.gte.com (ak03@localhost [127.0.0.1]) h4JLmX3D091039 for ; Mon, 19 May 2003 17:48:33 -0400 (EDT) (envelope-from ak03@kanpc.gte.com) Received: (from ak03@localhost) by kanpc.gte.com (8.12.9/8.12.9/Submit) id h4JLmXJm091038; Mon, 19 May 2003 17:48:33 -0400 (EDT) Date: Mon, 19 May 2003 17:48:33 -0400 From: Alexander Kabaev To: freebsd-threads@FreeBSD.ORG Message-Id: <20030519174833.28db3cd2.ak03@gte.com> Organization: Verizon Data Services X-Mailer: Sylpheed version 0.8.11claws156 (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: _pthread_cond_wait vs. __pthread_condwait X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2003 21:48:36 -0000 The _pthread_cond_wait function has this at the beginning: _thr_enter_cancellation_point(curthread); if (cond == NULL) { _thr_leave_cancellation_point(curthread); and this at the end: _thr_leave_cancellation_point(curthread); __pthread_cond_wait is defined as _thr_enter_cancellation_point(curthread); ret = _pthread_cond_wait(cond, mutex); _thr_leave_cancellation_point(curthread); return (ret); So what is the difference between the two? Should't cancellantion checks ve removed from _pthread_cond_wait? -- Alexander Kabaev From owner-freebsd-threads@FreeBSD.ORG Mon May 19 15:13:30 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0E1037B41C for ; Mon, 19 May 2003 15:13:30 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3746A43F75 for ; Mon, 19 May 2003 15:13:30 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h4JMDTwQ023706; Mon, 19 May 2003 18:13:29 -0400 (EDT) Received: from localhost (eischen@localhost)h4JMDTNK023701; Mon, 19 May 2003 18:13:29 -0400 (EDT) Date: Mon, 19 May 2003 18:13:28 -0400 (EDT) From: Daniel Eischen To: Alexander Kabaev In-Reply-To: <20030519174833.28db3cd2.ak03@gte.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: _pthread_cond_wait vs. __pthread_condwait X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2003 22:13:31 -0000 On Mon, 19 May 2003, Alexander Kabaev wrote: > The _pthread_cond_wait function has this at the beginning: > > _thr_enter_cancellation_point(curthread); > > if (cond == NULL) { > _thr_leave_cancellation_point(curthread); > and this at the end: > _thr_leave_cancellation_point(curthread); > > > __pthread_cond_wait is defined as > > _thr_enter_cancellation_point(curthread); > ret = _pthread_cond_wait(cond, mutex); > _thr_leave_cancellation_point(curthread); > return (ret); > > So what is the difference between the two? Should't cancellantion checks > ve removed from _pthread_cond_wait? Yes, and the weak references are wrong too (they should be to __pthread_cond_wait/__pthread_cond_timedwait). -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Thu May 22 12:35:54 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DB8537B401; Thu, 22 May 2003 12:35:54 -0700 (PDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE97643FAF; Thu, 22 May 2003 12:35:53 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by attbi.com (sccrmhc01) with ESMTP id <2003052219355200100s1knne>; Thu, 22 May 2003 19:35:53 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA83497; Thu, 22 May 2003 12:35:52 -0700 (PDT) Date: Thu, 22 May 2003 12:35:50 -0700 (PDT) From: Julian Elischer To: Dan Nelson In-Reply-To: <20030522191234.GA13498@dan.emsphone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: threads@freebsd.org cc: Daniel Eischen cc: davidxu@freebsd.org Subject: Re: libkse and SMP (was Re: USB bulk read & pthreads) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2003 19:35:54 -0000 On Thu, 22 May 2003, Dan Nelson wrote: > In the last episode (May 22), Julian Elischer said: > > what's 'pike'? > checking for pthread_mutexattr_init... yes > checking for pthread_kill... yes > checking posix threads... panic: mtx_lock() of spin mutex =E2=94=94=E2=94= =AC<=E2=96=80=C3=A9=E2=94=94B @ ../../../vm/vm_map.c:2142 > cpuid =3D 1; lapic.id =3D 00000000 > Stack backtrace: > panic(c03e5cf4,c082e000,c03f59e2,85e,d1d21000) at panic+0x11b > _mtx_lock_flags(c21a42c0,0,c03f59e2,85e,db9e8b9c) at _mtx_lock_flags+0x84 > vm_map_delete(c0831000,d1d1d000,d1d21000,dfe1dda0,c3ed5e40) at vm_map_del= ete+0x19b > vm_map_remove(c0831000,d1d1d000,d1d21000,121,c3ed5d10) at vm_map_remove+0= x55 > cpu_thread_clean(c3ed5d10,6ab,c3ed5d10,c3ed5e40,db9e8c3c) at cpu_thread_c= lean+0x66 > thread_free(c3ed5d10,0,c03e7262,365,c492e000) at thread_free+0x14 > thread_reap(c3e45780,ffffffff,0,28c,0) at thread_reap+0x124 > wait1(c3821be0,db9e8d10,0,db9e8d40,c039b603) at wait1+0x7d6 > wait4(c3821be0,db9e8d10,c03fb8ec,3fb,4) at wait4+0x20 > syscall(c038002f,2f,2f,1,80ff100) at syscall+0x3a3 > Xint0x80_syscall() at Xint0x80_syscall+0x1d > --- syscall (7), eip =3D 0x807c1eb, esp =3D 0xbfbff01c, ebp =3D 0xbfbff03= 8 --- > boot() called on cpu#1 >=20 > Manually running the "checking posix threads" conftest by itself works > fine, though... AHA! I've seen this panic from ksetest.. can you go to /usr/src/tools/KSE/ksetest and=20 make =2E/ksetest it may not do it the first time so let it run 10 seconds then kill it with ^C and retry about 10 times.. let me know the result.. I've been looking for this for a while.. From owner-freebsd-threads@FreeBSD.ORG Thu May 22 13:04:35 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABCE737B401; Thu, 22 May 2003 13:04:35 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3A9F43F3F; Thu, 22 May 2003 13:04:34 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h4MK4Wlq084525; Thu, 22 May 2003 15:04:32 -0500 (CDT) (envelope-from dan) Date: Thu, 22 May 2003 15:04:32 -0500 From: Dan Nelson To: Julian Elischer Message-ID: <20030522200432.GA45995@dan.emsphone.com> References: <20030522191234.GA13498@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.1-BETA X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: threads@freebsd.org cc: Daniel Eischen cc: davidxu@freebsd.org Subject: Re: libkse and SMP (was Re: USB bulk read & pthreads) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2003 20:04:36 -0000 In the last episode (May 22), Julian Elischer said: > On Thu, 22 May 2003, Dan Nelson wrote: > > AHA! > I've seen this panic from ksetest.. > can you go to /usr/src/tools/KSE/ksetest > and > make > ./ksetest > > it may not do it the first time so let it run 10 seconds then kill it > with ^C and retry about 10 times.. It's not cooperating.. It hasn't crashed for me yet. Sometimes it exits cleanly on its own immediately after starting (see below), but it's never caused a panic. I'll try automating it by running it in a loop with a 2nd script running killall -9 ksetest every 10 seconds. $ ./ksetest main() : 0x804c000 eip -> 0x280ae8df uts() at : 0x8048d04 uts stack at : 0x814d000 - 0x8155000 main() : 0x804c400 eip -> 0x280ae8df uts() at : 0x8048d04 uts stack at : 0x8255000 - 0x825d000 thread_start() : 0x804c800 804c800 thread_start() : 0x826d000 826d000 kse_create() -> 0 +-kse_create() -> 0 main() : 0x826d800 eip -> 0x280ae8df uts() at : 0x8048d04 uts stack at : 0x837e000 - 0x8386000 +-main() : 0x826dc00 eip -> 0x280ae8df uts() at : 0x8048d04 uts stack at : 0x8486000 - 0x848e000 thread_start() : 0x848e000 848e000 thread_start() : 0x848e800 848e800 thread_start() : 0x84af000 84af000 kse_create() -> 0 A*.kse_create() -> 0 $ -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-threads@FreeBSD.ORG Thu May 22 14:08:38 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09B2D37B404; Thu, 22 May 2003 14:08:38 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F1F543F3F; Thu, 22 May 2003 14:08:37 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h4ML8Yps070116; Thu, 22 May 2003 16:08:34 -0500 (CDT) (envelope-from dan) Date: Thu, 22 May 2003 16:08:34 -0500 From: Dan Nelson To: Julian Elischer Message-ID: <20030522210834.GA63668@dan.emsphone.com> References: <20030522191234.GA13498@dan.emsphone.com> <20030522200432.GA45995@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030522200432.GA45995@dan.emsphone.com> X-OS: FreeBSD 5.1-BETA X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: threads@freebsd.org cc: Daniel Eischen cc: davidxu@freebsd.org Subject: Re: libkse and SMP (was Re: USB bulk read & pthreads) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2003 21:08:38 -0000 In the last episode (May 22), Dan Nelson said: > In the last episode (May 22), Julian Elischer said: > > AHA! > > I've seen this panic from ksetest.. > > can you go to /usr/src/tools/KSE/ksetest > > and > > make > > ./ksetest > > > > it may not do it the first time so let it run 10 seconds then kill > > it with ^C and retry about 10 times.. > > It's not cooperating.. It hasn't crashed for me yet. Sometimes it > exits cleanly on its own immediately after starting (see below), but > it's never caused a panic. I'll try automating it by running it in a > loop with a 2nd script running killall -9 ksetest every 10 seconds. Ok, after an hour still no panics. Should it really be exiting on its own this often, though? $ lastcomm ksetest | cut -c1-20 | sort | uniq -c 75 ksetest - 366 ksetest -X The above proceses were generated by the following loops in two different vtys: while sleep 10 ; do killall -9 ksetest ; done while : ; do ./ksetest; done -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-threads@FreeBSD.ORG Thu May 22 14:13:11 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B87137B401; Thu, 22 May 2003 14:13:11 -0700 (PDT) Received: from sccrmhc03.attbi.com (sccrmhc03.attbi.com [204.127.202.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id E56F743FEC; Thu, 22 May 2003 14:13:09 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by attbi.com (sccrmhc03) with ESMTP id <2003052221130800300p6362e>; Thu, 22 May 2003 21:13:09 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id OAA84168; Thu, 22 May 2003 14:13:08 -0700 (PDT) Date: Thu, 22 May 2003 14:13:06 -0700 (PDT) From: Julian Elischer To: Dan Nelson In-Reply-To: <20030522210834.GA63668@dan.emsphone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org cc: Daniel Eischen cc: davidxu@freebsd.org Subject: Re: libkse and SMP (was Re: USB bulk read & pthreads) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2003 21:13:11 -0000 On Thu, 22 May 2003, Dan Nelson wrote: > In the last episode (May 22), Dan Nelson said: > > In the last episode (May 22), Julian Elischer said: > > > AHA! > > > I've seen this panic from ksetest.. > > > can you go to /usr/src/tools/KSE/ksetest > > > and > > > make > > > ./ksetest > > > > > > it may not do it the first time so let it run 10 seconds then kill > > > it with ^C and retry about 10 times.. > > > > It's not cooperating.. It hasn't crashed for me yet. Sometimes it > > exits cleanly on its own immediately after starting (see below), but > > it's never caused a panic. I'll try automating it by running it in a > > loop with a 2nd script running killall -9 ksetest every 10 seconds. > > Ok, after an hour still no panics. Should it really be exiting on its > own this often, though? > > $ lastcomm ksetest | cut -c1-20 | sort | uniq -c > > 75 ksetest - > 366 ksetest -X > > The above proceses were generated by the following loops in two > different vtys: no it's not supposed to stop.. I wonder why it does it.. I have seen it a few ties on my system.. I'll try track it down.. > > while sleep 10 ; do killall -9 ksetest ; done > while : ; do ./ksetest; done > Thanks.. it's almost as if after a system has seen this crash few times it gets immune from it in some way.. my system has stopped doing it.. :-( thanks for trying however.. > -- > Dan Nelson > dnelson@allantgroup.com > From owner-freebsd-threads@FreeBSD.ORG Thu May 22 14:36:40 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E20AB37B401; Thu, 22 May 2003 14:36:40 -0700 (PDT) Received: from HAL9000.homeunix.com (12-233-57-131.client.attbi.com [12.233.57.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D65443FBD; Thu, 22 May 2003 14:36:40 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.5) with ESMTP id h4MLaXXD003185; Thu, 22 May 2003 14:36:33 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.5/Submit) id h4MLaXa2003184; Thu, 22 May 2003 14:36:33 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Thu, 22 May 2003 14:36:33 -0700 From: David Schultz To: Julian Elischer Message-ID: <20030522213633.GA3139@HAL9000.homeunix.com> Mail-Followup-To: Julian Elischer , Dan Nelson , threads@freebsd.org, Daniel Eischen , davidxu@freebsd.org References: <20030522210834.GA63668@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: threads@FreeBSD.ORG cc: Dan Nelson cc: Daniel Eischen cc: davidxu@FreeBSD.ORG Subject: Re: libkse and SMP (was Re: USB bulk read & pthreads) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2003 21:36:41 -0000 On Thu, May 22, 2003, Julian Elischer wrote: > > while sleep 10 ; do killall -9 ksetest ; done > > while : ; do ./ksetest; done > > > Thanks.. > > it's almost as if after a system has seen this crash few times > it gets immune from it in some way.. > > my system has stopped doing it.. :-( Maybe your genetic algorithms caught a virus... From owner-freebsd-threads@FreeBSD.ORG Thu May 22 17:03:58 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D41637B401; Thu, 22 May 2003 17:03:58 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFA5343FA3; Thu, 22 May 2003 17:03:57 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from tiger (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with SMTP id h4N03tUp023997; Thu, 22 May 2003 17:03:56 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <006901c320bf$401583a0$0701a8c0@tiger> From: "David Xu" To: "Julian Elischer" , "Dan Nelson" References: Date: Fri, 23 May 2003 08:07:06 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 cc: threads@freebsd.org cc: Daniel Eischen Subject: Re: libkse and SMP (was Re: USB bulk read & pthreads) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Xu List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 00:03:58 -0000 ----- Original Message -----=20 From: "Julian Elischer" To: "Dan Nelson" Cc: ; "Daniel Eischen" ; = Sent: Friday, May 23, 2003 5:13 AM Subject: Re: libkse and SMP (was Re: USB bulk read & pthreads) >=20 >=20 > On Thu, 22 May 2003, Dan Nelson wrote: >=20 > > In the last episode (May 22), Dan Nelson said: > > > In the last episode (May 22), Julian Elischer said: > > > > AHA! > > > > I've seen this panic from ksetest.. > > > > can you go to /usr/src/tools/KSE/ksetest > > > > and=20 > > > > make > > > > ./ksetest > > > >=20 > > > > it may not do it the first time so let it run 10 seconds then = kill > > > > it with ^C and retry about 10 times.. > > >=20 > > > It's not cooperating.. It hasn't crashed for me yet. Sometimes = it > > > exits cleanly on its own immediately after starting (see below), = but > > > it's never caused a panic. I'll try automating it by running it = in a > > > loop with a 2nd script running killall -9 ksetest every 10 = seconds. > >=20 > > Ok, after an hour still no panics. Should it really be exiting on = its > > own this often, though? > >=20 > > $ lastcomm ksetest | cut -c1-20 | sort | uniq -c > >=20 > > 75 ksetest - > > 366 ksetest -X > >=20 > > The above proceses were generated by the following loops in two > > different vtys: >=20 > no it's not supposed to stop.. I wonder why it does it.. > I have seen it a few ties on my system.. I'll try track it down.. >=20 >=20 > >=20 > > while sleep 10 ; do killall -9 ksetest ; done > > while : ; do ./ksetest; done > > =20 > Thanks.. >=20 > it's almost as if after a system has seen this crash few times > it gets immune from it in some way.. >=20 > my system has stopped doing it.. :-( >=20 > thanks for trying however.. >=20 >=20 It must be caused by an invalid thread pointer or some memory blocks = belong zoombie threads are corrupted, but I don't know where it came from. cpu_thread_clean only frees pcb_ext, and it is just an i386 hardware = I/O port map page, in normal case pcb_ext is zero, because we never access hardware I/O port in ksetest. > > --=20 > > Dan Nelson > > dnelson@allantgroup.com > >=20 >=20 Dvaid Xu From owner-freebsd-threads@FreeBSD.ORG Fri May 23 07:43:39 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADB5137B401 for ; Fri, 23 May 2003 07:43:39 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69BF643F85 for ; Fri, 23 May 2003 07:43:38 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (h81.vuokselantie10.fi [193.64.42.129]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h4NEhZk8017306 for ; Fri, 23 May 2003 17:43:36 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <089001c32139$ae0d5e30$c02a40c1@PETEX31> From: "Petri Helenius" To: Date: Fri, 23 May 2003 17:43:30 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 14:43:40 -0000 In 5-CURRENT (5.1-BETA) what is the way to link/compile my posix threads program so I would get more than one thread scheduled on a SMP machine? Is there a document somewhere or does it "just work" ? Pete From owner-freebsd-threads@FreeBSD.ORG Fri May 23 07:57:32 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E5CA37B401 for ; Fri, 23 May 2003 07:57:32 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50A9243FAF for ; Fri, 23 May 2003 07:57:31 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h4NEvUwQ010709; Fri, 23 May 2003 10:57:30 -0400 (EDT) Received: from localhost (eischen@localhost)h4NEvUYC010706; Fri, 23 May 2003 10:57:30 -0400 (EDT) Date: Fri, 23 May 2003 10:57:30 -0400 (EDT) From: Daniel Eischen To: Petri Helenius In-Reply-To: <089001c32139$ae0d5e30$c02a40c1@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 14:57:32 -0000 On Fri, 23 May 2003, Petri Helenius wrote: > > In 5-CURRENT (5.1-BETA) what is the way to link/compile my posix threads program > so I would get more than one thread scheduled on a SMP machine? Is there a document > somewhere or does it "just work" ? Either link to libkse or libthr (-lkse or -lthr). Don't use libc_r (-pthread or -lc_r). Libkse will set the concurrency to the number of CPUs in your system. You can also use scope system threads with libkse. libthr will create each thread in its own KSE, and is more like Linuxthreads (1:1) model. libkse is M:N. -- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Fri May 23 08:38:04 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FC2537B401 for ; Fri, 23 May 2003 08:38:04 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A6CD43F85 for ; Fri, 23 May 2003 08:38:04 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38lc0o6.dialup.mindspring.com ([209.86.3.6] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19JEcK-00048A-00; Fri, 23 May 2003 08:38:01 -0700 Message-ID: <3ECE4014.B29DC0E4@mindspring.com> Date: Fri, 23 May 2003 08:36:52 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Petri Helenius References: <089001c32139$ae0d5e30$c02a40c1@PETEX31> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4d071267c8ef13943911185fb9f99fbe8a7ce0e8f8d31aa3f350badd9bab72f9c350badd9bab72f9c cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 15:38:04 -0000 Petri Helenius wrote: > > In 5-CURRENT (5.1-BETA) what is the way to link/compile my posix > threads program so I would get more than one thread scheduled on > a SMP machine? Is there a document somewhere or does it "just work" ? Yes. See the archives of this mailing list. -- Terry From owner-freebsd-threads@FreeBSD.ORG Fri May 23 08:53:43 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F5A037B401 for ; Fri, 23 May 2003 08:53:43 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AE6E43F75 for ; Fri, 23 May 2003 08:53:42 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (h81.vuokselantie10.fi [193.64.42.129]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h4NFrfk8017864; Fri, 23 May 2003 18:53:41 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <08c401c32143$7843a390$c02a40c1@PETEX31> From: "Petri Helenius" To: "Daniel Eischen" References: Date: Fri, 23 May 2003 18:53:35 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 15:53:43 -0000 > > Either link to libkse or libthr (-lkse or -lthr). Don't use > libc_r (-pthread or -lc_r). Libkse will set the concurrency > to the number of CPUs in your system. You can also use > scope system threads with libkse. > > libthr will create each thread in its own KSE, and is more > like Linuxthreads (1:1) model. libkse is M:N. > As far as my experience shows linuxthreads has issues with mutexes on an SMP machine (at least when running on FreeBSD). I actually tried -lkse on a machine with kernel about two weeks old, so far I have not been able to reach the machine since ... Will try again on more local box, because it does not seem to crash to console debugger but just plain out "die". Pete From owner-freebsd-threads@FreeBSD.ORG Fri May 23 08:56:23 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3BF1437B401 for ; Fri, 23 May 2003 08:56:23 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 066EB43F93 for ; Fri, 23 May 2003 08:56:20 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PETEX31 (h81.vuokselantie10.fi [193.64.42.129]) by silver.he.iki.fi (8.12.9/8.11.4) with SMTP id h4NFuIk8017907; Fri, 23 May 2003 18:56:18 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <08d601c32143$d62fd410$c02a40c1@PETEX31> From: "Petri Helenius" To: "Terry Lambert" References: <089001c32139$ae0d5e30$c02a40c1@PETEX31> <3ECE4014.B29DC0E4@mindspring.com> Date: Fri, 23 May 2003 18:56:13 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 15:56:23 -0000 > Petri Helenius wrote: > > > > In 5-CURRENT (5.1-BETA) what is the way to link/compile my posix > > threads program so I would get more than one thread scheduled on > > a SMP machine? Is there a document somewhere or does it "just work" ? > > Yes. See the archives of this mailing list. > I tried to browse the subjects but they are not always too informative. Is -lkse supposed to enable thread-safe malloc/free? I´m seeing messages about recursive calls... Pete From owner-freebsd-threads@FreeBSD.ORG Fri May 23 11:18:12 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 613C537B401 for ; Fri, 23 May 2003 11:18:11 -0700 (PDT) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCF1A43F93 for ; Fri, 23 May 2003 11:18:10 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by attbi.com (sccrmhc02) with ESMTP id <20030523181809002002jstqe>; Fri, 23 May 2003 18:18:10 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA92084; Fri, 23 May 2003 11:18:08 -0700 (PDT) Date: Fri, 23 May 2003 11:18:08 -0700 (PDT) From: Julian Elischer To: Petri Helenius In-Reply-To: <08c401c32143$7843a390$c02a40c1@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Daniel Eischen cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 18:18:13 -0000 On Fri, 23 May 2003, Petri Helenius wrote: > > > > Either link to libkse or libthr (-lkse or -lthr). Don't use > > libc_r (-pthread or -lc_r). Libkse will set the concurrency > > to the number of CPUs in your system. You can also use > > scope system threads with libkse. > > > > libthr will create each thread in its own KSE, and is more > > like Linuxthreads (1:1) model. libkse is M:N. > > > As far as my experience shows linuxthreads has issues with mutexes on an SMP > machine (at least when running on FreeBSD). > > I actually tried -lkse on a machine with kernel about two weeks old, > so far I have not been able to reach the machine since ... > > Will try again on more local box, because it does not seem to crash to console > debugger but just plain out "die". Also make sure you have newest code.. We do have a problem where the system seems to crash but it's not at all reproducible and I'm pulling my hair out trying to find it.. > > Pete > > _______________________________________________ > 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 Fri May 23 13:23:40 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0530C37B401 for ; Fri, 23 May 2003 13:23:40 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A4C043F3F for ; Fri, 23 May 2003 13:23:39 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h4NKNcwQ009183; Fri, 23 May 2003 16:23:38 -0400 (EDT) Received: from localhost (eischen@localhost)h4NKNcOY009179; Fri, 23 May 2003 16:23:38 -0400 (EDT) Date: Fri, 23 May 2003 16:23:38 -0400 (EDT) From: Daniel Eischen To: Petri Helenius In-Reply-To: <08d601c32143$d62fd410$c02a40c1@PETEX31> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 20:23:40 -0000 On Fri, 23 May 2003, Petri Helenius wrote: > > Petri Helenius wrote: > > > > > > In 5-CURRENT (5.1-BETA) what is the way to link/compile my posix > > > threads program so I would get more than one thread scheduled on > > > a SMP machine? Is there a document somewhere or does it "just work" ? > > > > Yes. See the archives of this mailing list. > > > I tried to browse the subjects but they are not always too informative. >=20 > Is -lkse supposed to enable thread-safe malloc/free? I=B4m seeing message= s > about recursive calls... Yes, -lkse should enable thread-safety in libc. --=20 Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Fri May 23 15:19:04 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD2A037B401 for ; Fri, 23 May 2003 15:19:04 -0700 (PDT) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [24.61.43.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id F380C43F75 for ; Fri, 23 May 2003 15:19:03 -0700 (PDT) (envelope-from rodrigc@attbi.com) Received: from h00609772adf0.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1])h4NMJxmW006080 for ; Fri, 23 May 2003 18:19:59 -0400 (EDT) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)h4NMJrbt006026 for freebsd-threads@freebsd.org; Fri, 23 May 2003 18:19:53 -0400 (EDT) Date: Fri, 23 May 2003 18:19:53 -0400 From: Craig Rodrigues To: freebsd-threads@freebsd.org Message-ID: <20030523221953.GA1117@attbi.com> References: <089001c32139$ae0d5e30$c02a40c1@PETEX31> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 22:19:05 -0000 On Fri, May 23, 2003 at 10:57:30AM -0400, Daniel Eischen wrote: > Either link to libkse or libthr (-lkse or -lthr). Don't use > libc_r (-pthread or -lc_r). Libkse will set the concurrency > to the number of CPUs in your system. You can also use > scope system threads with libkse. Hi, The FreeBSD KSE web page does not mention -lkse, but instead it mentions linking against libpthreads. Does this web page need to be updated? It mentions linking against libpthreads and libpthread. -- Craig Rodrigues http://home.attbi.com/~rodrigc rodrigc@attbi.com From owner-freebsd-threads@FreeBSD.ORG Fri May 23 15:33:50 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E219F37B401 for ; Fri, 23 May 2003 15:33:50 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D90343F3F for ; Fri, 23 May 2003 15:33:50 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h4NMXmwQ001421; Fri, 23 May 2003 18:33:48 -0400 (EDT) Received: from localhost (eischen@localhost)h4NMXmvX001416; Fri, 23 May 2003 18:33:48 -0400 (EDT) Date: Fri, 23 May 2003 18:33:48 -0400 (EDT) From: Daniel Eischen To: Craig Rodrigues In-Reply-To: <20030523221953.GA1117@attbi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2003 22:33:51 -0000 On Fri, 23 May 2003, Craig Rodrigues wrote: > On Fri, May 23, 2003 at 10:57:30AM -0400, Daniel Eischen wrote: > > Either link to libkse or libthr (-lkse or -lthr). Don't use > > libc_r (-pthread or -lc_r). Libkse will set the concurrency > > to the number of CPUs in your system. You can also use > > scope system threads with libkse. > > Hi, > > The FreeBSD KSE web page does not mention -lkse, but > instead it mentions linking against libpthreads. > > Does this web page need to be updated? It mentions > linking against libpthreads and libpthread. I don't know; it's a question of timing. After -release and when rtld-elf gets fixed (kan is working on it right now), it'll go back to being installed as libpthread. Does this work for you? Index: index.sgml =================================================================== RCS file: /home/dcvs/www/en/kse/index.sgml,v retrieving revision 1.11 diff -u -r1.11 index.sgml --- index.sgml 3 May 2003 21:17:01 -0000 1.11 +++ index.sgml 23 May 2003 22:32:52 -0000 @@ -58,21 +58,13 @@ the KSE-related changes (the changes are inextricable from the FreeBSD scheduler). -

In order to use KSE in an application, you need to link it against - libpthreads, which is not built by default. To build and install it - on your system, either run make all install from - /usr/src/lib/libpthread (if you have - sources installed on your system), or check out the - libpthread and - libc modules from CVS. You don't need to - rebuild libc, but the libpthread makefiles refer to parts of the - libc sources.

-

Linking an application against libpthread is straightforward. In its makefiles, change the -pthread option to -lpthread and relink. Alternatively, you can copy libpthread.so on top of libc_r.so, but this is not recommended until libpthread.so becomes a - bit more stable. + bit more stable. Please note that at this time, libpthread is installed + as libkse to prevent autoconf and the like from picking up libpthread + instead of libc_r (use -lkse instead of -lpthread).

Further Reading

-- Dan Eischen From owner-freebsd-threads@FreeBSD.ORG Fri May 23 17:32:01 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5557237B401 for ; Fri, 23 May 2003 17:32:01 -0700 (PDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1FE143F93 for ; Fri, 23 May 2003 17:32:00 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by attbi.com (sccrmhc01) with ESMTP id <200305240031590010083dule>; Sat, 24 May 2003 00:31:59 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id RAA94490; Fri, 23 May 2003 17:31:58 -0700 (PDT) Date: Fri, 23 May 2003 17:31:57 -0700 (PDT) From: Julian Elischer To: Craig Rodrigues In-Reply-To: <20030523221953.GA1117@attbi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2003 00:32:01 -0000 On Fri, 23 May 2003, Craig Rodrigues wrote: > On Fri, May 23, 2003 at 10:57:30AM -0400, Daniel Eischen wrote: > > Either link to libkse or libthr (-lkse or -lthr). Don't use > > libc_r (-pthread or -lc_r). Libkse will set the concurrency > > to the number of CPUs in your system. You can also use > > scope system threads with libkse. > > Hi, > > The FreeBSD KSE web page does not mention -lkse, but > instead it mentions linking against libpthreads. > > Does this web page need to be updated? It mentions > linking against libpthreads and libpthread. When the library is fully working it will be renamed.. > > > -- > Craig Rodrigues > http://home.attbi.com/~rodrigc > rodrigc@attbi.com > _______________________________________________ > 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 Fri May 23 22:18:58 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD44037B401 for ; Fri, 23 May 2003 22:18:58 -0700 (PDT) Received: from puffin.mail.pas.earthlink.net (puffin.mail.pas.earthlink.net [207.217.120.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0AA0843F75 for ; Fri, 23 May 2003 22:18:58 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38ldvet.dialup.mindspring.com ([209.86.253.221] helo=mindspring.com) by puffin.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19JRQj-0002ti-00; Fri, 23 May 2003 22:18:53 -0700 Message-ID: <3ECF006C.54227726@mindspring.com> Date: Fri, 23 May 2003 22:17:32 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Petri Helenius References: <089001c32139$ae0d5e30$c02a40c1@PETEX31> <3ECE4014.B29DC0E4@mindspring.com> <08d601c32143$d62fd410$c02a40c1@PETEX31> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4edaf3d14038aeb45e9f0c35dd4b1b3da2601a10902912494350badd9bab72f9c350badd9bab72f9c cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2003 05:18:59 -0000 Petri Helenius wrote: > > Petri Helenius wrote: > > > In 5-CURRENT (5.1-BETA) what is the way to link/compile my posix > > > threads program so I would get more than one thread scheduled on > > > a SMP machine? Is there a document somewhere or does it "just work"= ? > > > > Yes. See the archives of this mailing list. > > > I tried to browse the subjects but they are not always too informative.= > = > Is -lkse supposed to enable thread-safe malloc/free? I=B4m seeing messa= ges > about recursive calls... EDOOFUS? 8-) 8-). -- Terry From owner-freebsd-threads@FreeBSD.ORG Fri May 23 23:06:42 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48BA837B401 for ; Fri, 23 May 2003 23:06:42 -0700 (PDT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EA3C43F75 for ; Fri, 23 May 2003 23:06:41 -0700 (PDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h4O66XX56431; Sat, 24 May 2003 02:06:33 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Date: Sat, 24 May 2003 02:06:33 -0400 (EDT) From: Jeff Roberson To: Petri Helenius In-Reply-To: <08c401c32143$7843a390$c02a40c1@PETEX31> Message-ID: <20030524020525.D69975-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Daniel Eischen cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2003 06:06:42 -0000 On Fri, 23 May 2003, Petri Helenius wrote: > > > > Either link to libkse or libthr (-lkse or -lthr). Don't use > > libc_r (-pthread or -lc_r). Libkse will set the concurrency > > to the number of CPUs in your system. You can also use > > scope system threads with libkse. > > > > libthr will create each thread in its own KSE, and is more > > like Linuxthreads (1:1) model. libkse is M:N. > > > As far as my experience shows linuxthreads has issues with mutexes on an SMP > machine (at least when running on FreeBSD). libthr does not have issues with mutexes. I'm not sure what linux threads issues are. You should try libthr as well. It has some advantages over kse as well as some disadvantages. > > I actually tried -lkse on a machine with kernel about two weeks old, > so far I have not been able to reach the machine since ... > > Will try again on more local box, because it does not seem to crash to console > debugger but just plain out "die". > > Pete > > _______________________________________________ > 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 Sat May 24 03:08:44 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 450F437B401 for ; Sat, 24 May 2003 03:08:44 -0700 (PDT) Received: from silver.he.iki.fi (silver.he.iki.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0719643F3F for ; Sat, 24 May 2003 03:08:43 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from he.iki.fi (localhost.he.iki.fi [127.0.0.1]) by silver.he.iki.fi (8.12.9/8.11.4) with ESMTP id h4OA8ek8035486; Sat, 24 May 2003 13:08:40 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <3ECF44A7.7060106@he.iki.fi> Date: Sat, 24 May 2003 13:08:39 +0300 From: Petri Helenius User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030501 X-Accept-Language: English [en],Finnish [fi] MIME-Version: 1.0 To: Terry Lambert References: <089001c32139$ae0d5e30$c02a40c1@PETEX31> <3ECE4014.B29DC0E4@mindspring.com> <08d601c32143$d62fd410$c02a40c1@PETEX31> <3ECF006C.54227726@mindspring.com> In-Reply-To: <3ECF006C.54227726@mindspring.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2003 10:08:44 -0000 Terry Lambert wrote: >Petri Helenius wrote: > =20 > >>>Petri Helenius wrote: >>> =20 >>> >>>>In 5-CURRENT (5.1-BETA) what is the way to link/compile my posix >>>>threads program so I would get more than one thread scheduled on >>>>a SMP machine? Is there a document somewhere or does it "just work" ?= >>>> =20 >>>> >>>Yes. See the archives of this mailing list. >>> >>> =20 >>> >>I tried to browse the subjects but they are not always too informative.= >> >>Is -lkse supposed to enable thread-safe malloc/free? I=B4m seeing messa= ges >>about recursive calls... >> =20 >> > >EDOOFUS? > >8-) 8-). > > =20 > You mean EUSERERR also applies to library programmers? :-) I thought that was only supposed to be towards "end user" developers. =20 Pete From owner-freebsd-threads@FreeBSD.ORG Sat May 24 03:50:25 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ACFA237B401; Sat, 24 May 2003 03:50:25 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D10C543F3F; Sat, 24 May 2003 03:50:23 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from tiger (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with SMTP id h4OAoLUp014124; Sat, 24 May 2003 03:50:22 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <002f01c321e2$b8b793b0$0701a8c0@tiger> From: "David Xu" To: "Petri Helenius" References: <089001c32139$ae0d5e30$c02a40c1@PETEX31><3ECE4014.B29DC0E4@mindspring.com> <08d601c32143$d62fd410$c02a40c1@PETEX31> Date: Sat, 24 May 2003 18:53:32 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 cc: freebsd-threads@freebsd.org Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: David Xu List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2003 10:50:26 -0000 ----- Original Message -----=20 From: "Petri Helenius" To: "Terry Lambert" Cc: Sent: Friday, May 23, 2003 11:56 PM Subject: Re: basic thread question >=20 > > Petri Helenius wrote: > > > > > > In 5-CURRENT (5.1-BETA) what is the way to link/compile my posix > > > threads program so I would get more than one thread scheduled on > > > a SMP machine? Is there a document somewhere or does it "just = work" ? > > > > Yes. See the archives of this mailing list. > > > I tried to browse the subjects but they are not always too = informative. >=20 > Is -lkse supposed to enable thread-safe malloc/free? I=B4m seeing = messages > about recursive calls... >=20 This is an old story, update to newest libpthread source code and see if = you can still reproduce it. :-) > Pete >=20 > _______________________________________________ > 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 Sat May 24 10:31:22 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E075837B401 for ; Sat, 24 May 2003 10:31:22 -0700 (PDT) Received: from h00609772adf0.ne.client2.attbi.com (h00609772adf0.ne.client2.attbi.com [24.61.43.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A09443F85 for ; Sat, 24 May 2003 10:31:22 -0700 (PDT) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: from h00609772adf0.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1])h4OJN7fm002474 for ; Sat, 24 May 2003 15:23:07 -0400 (EDT) (envelope-from rodrigc@h00609772adf0.ne.client2.attbi.com) Received: (from rodrigc@localhost)h4OJN6IY002473 for freebsd-threads@freebsd.org; Sat, 24 May 2003 15:23:06 -0400 (EDT) Date: Sat, 24 May 2003 15:23:06 -0400 From: Craig Rodrigues To: freebsd-threads@freebsd.org Message-ID: <20030524192305.GA2385@attbi.com> References: <20030523221953.GA1117@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Subject: Re: basic thread question X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 May 2003 17:31:23 -0000 On Fri, May 23, 2003 at 06:33:48PM -0400, Daniel Eischen wrote: > > > > The FreeBSD KSE web page does not mention -lkse, but > > instead it mentions linking against libpthreads. > > > > Does this web page need to be updated? It mentions > > linking against libpthreads and libpthread. > > I don't know; it's a question of timing. After -release and > when rtld-elf gets fixed (kan is working on it right now), > it'll go back to being installed as libpthread. > > Does this work for you? > [snip] That works for me. Even though things are changing around, it doesn't hurt to have the web page reflect the current state of the code, to encourage new testers. The web page can easily be changed once the library is named back to libpthread. Does libthr have a web page too? -- Craig Rodrigues http://home.attbi.com/~rodrigc rodrigc@attbi.com