From owner-freebsd-threads@FreeBSD.ORG Sun Mar 12 02:52:00 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 DB0C316A422; Sun, 12 Mar 2006 02:52:00 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15CEE456A7; Sun, 12 Mar 2006 00:34:16 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from localhost.my.domain (root@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k2C0YEEl044042; Sun, 12 Mar 2006 00:34:15 GMT (envelope-from davidxu@freebsd.org) From: David Xu To: freebsd-threads@freebsd.org, Martin , freebsd-stable@freebsd.org Date: Sun, 12 Mar 2006 08:29:18 +0800 User-Agent: KMail/1.8.2 References: <200603111140.k2BBerFh096411@freefall.freebsd.org> In-Reply-To: <200603111140.k2BBerFh096411@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603120829.18291.davidxu@freebsd.org> Cc: Subject: Re: threads/80435: panic on high loads 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: Sun, 12 Mar 2006 02:52:01 -0000 [stable is included] On Saturday 11 March 2006 19:40, Martin wrote: > > The following reply was made to PR threads/80435; it has been noted by GNATS. > > From: Martin > To: bug-followup@FreeBSD.org > Cc: > Subject: Re: threads/80435: panic on high loads > Date: Sat, 11 Mar 2006 12:36:04 +0100 > > Hi, > > I've a similar panic. Not exactly the same, but in a similar > situation. You can trigger it with a slightly modified fork bomb: > > #include > #include > > int main(void) > { > while(1) { > fork(); > malloc(1024); > } > return 0; > } > > > The resulting panic is: > > fault code = supervisor write, page not present > > backtrace: > pmap_qenter() > vm_thread_new() > thread_init() > slab_zalloc() > uma_zone_slab() > uma_zalloc_bucket() > uma_zalloc_arg() > thread_alloc() > proc_init() > slab_zalloc() > uma_zone_slab() > uma_zalloc_bucket() > uma_zalloc_arg() > fork1() > fork() > syscall() > Xint0x80() > -- syscall (2, FreeBSD ELF32, fork) > > Reproducible on: -STABLE > uname -a: > FreeBSD klotz.local 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Mon Mar 6 > 00:21:54 CET 2006 root@klotz.local:/usr/obj/usr/src/sys/KLOTZ i386 > > -- > Martin This bug unlikely should be reported on thread@, your code is a fork bomb, I think it is a warning why recent days the kernel crashed by such attack, can you reproduce it on 6.0 ? David Xu From owner-freebsd-threads@FreeBSD.ORG Mon Mar 13 11:03:04 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 A355516A400 for ; Mon, 13 Mar 2006 11:03:04 +0000 (UTC) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C797343D6A for ; Mon, 13 Mar 2006 11:03:03 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k2DB3256097831 for ; Mon, 13 Mar 2006 11:03:02 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k2DB31TN097825 for freebsd-threads@freebsd.org; Mon, 13 Mar 2006 11:03:01 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 13 Mar 2006 11:03:01 GMT Message-Id: <200603131103.k2DB31TN097825@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter 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, 13 Mar 2006 11:03:04 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2005/01/26] threads/76690threads fork hang in child for (-lc_r & -lthr) 1 problem total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/07/18] kern/20016 threads pthreads: Cannot set scheduling timer/Can o [2000/08/26] kern/20861 threads libc_r does not honor socket timeouts o [2001/01/20] threads/24472threads libc_r does not honor SO_SNDTIMEO/SO_RCVT o [2001/01/25] threads/24632threads libc_r delicate deviation from libc in ha o [2001/01/25] kern/24641 threads pthread_rwlock_rdlock can deadlock o [2001/11/26] bin/32295 threads pthread dont dequeue signals o [2002/02/01] threads/34536threads accept() blocks other threads o [2002/05/25] kern/38549 threads the procces compiled whith pthread stoppe o [2002/06/27] threads/39922threads [threads] [patch] Threaded applications e o [2002/08/04] kern/41331 threads Pthread library open sets O_NONBLOCK flag o [2003/03/02] threads/48856threads Setting SIGCHLD to SIG_IGN still leaves z o [2003/03/10] threads/49087threads Signals lost in programs linked with libc s [2004/03/15] kern/64313 threads FreeBSD (OpenBSD) pthread implicit set/un o [2004/08/26] threads/70975threads unexpected and unreliable behaviour when o [2004/10/05] threads/72353threads Assertion fails in /usr/src/lib/libpthrea o [2004/10/07] threads/72429threads threads blocked in stdio (fgets, etc) are o [2004/10/21] threads/72953threads fork() unblocks blocked signals w/o PTHRE o [2004/12/19] threads/75273threads FBSD 5.3 libpthread (KSE) bug o [2004/12/21] threads/75374threads pthread_kill() ignores SA_SIGINFO flag o [2005/01/26] threads/76694threads fork cause hang in dup()/close() function p [2005/03/10] threads/78660threads Java hangs unkillably in STOP state after o [2005/04/08] threads/79683threads svctcp_create() fails if multiple threads o [2005/04/28] threads/80435threads panic on high loads o [2005/05/19] threads/81258threads Thread specific data is sometimes assigne o [2005/07/22] threads/83914threads [libc] popen() doesn't work in static thr o [2005/08/02] threads/84483threads problems with devel/nspr and -lc_r on 4.x o [2005/08/20] threads/85160threads [libthr] [patch] libobjc + libpthread/lib p [2005/11/19] threads/89262threads [kernel] [patch] multi-threaded process h o [2005/12/12] threads/90278threads libthr, ULE and -current produces >100% W o [2006/01/03] kern/91266 threads [threads] Trying sleep, but thread marked o [2006/03/07] threads/94176threads KSE: sigwait doesn't recieve SIGWINCH sen 31 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/06/13] kern/19247 threads uthread_sigaction.c does not do anything o [2000/10/21] kern/22190 threads A threaded read(2) from a socketpair(2) f o [2001/09/09] threads/30464threads pthread mutex attributes -- pshared o [2002/05/02] threads/37676threads libc_r: msgsnd(), msgrcv(), pread(), pwri s [2002/07/16] threads/40671threads pthread_cancel doesn't remove thread from o [2004/07/13] threads/69020threads pthreads library leaks _gc_mutex o [2004/09/21] threads/71966threads Mlnet Core Dumped : Fatal error '_pq_inse o [2004/11/21] threads/74180threads KSE problem. Applications those riched ma o [2005/04/13] threads/79887threads [patch] freopen() isn't thread-safe o [2005/05/13] threads/80992threads abort() sometimes not caught by gdb depen o [2005/05/26] threads/81534threads [libc_r] [patch] libc_r close() will fail 11 problems total. From owner-freebsd-threads@FreeBSD.ORG Mon Mar 13 23:17:15 2006 Return-Path: X-Original-To: freebsd-threads@FreeBSD.org 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 A16BE16A401 for ; Mon, 13 Mar 2006 23:17:15 +0000 (UTC) (envelope-from kaakun@highway.ne.jp) Received: from mx.highway.ne.jp (pip8.gate01.com [61.122.117.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D32343D70 for ; Mon, 13 Mar 2006 23:17:12 +0000 (GMT) (envelope-from kaakun@highway.ne.jp) Received: from [219.0.96.106] (helo=[192.168.11.17]) by pop11.isp.us-com.jp with esmtp (Mail 4.20) id 1FIwHn-00061l-67 for freebsd-threads@FreeBSD.org; Tue, 14 Mar 2006 08:17:11 +0900 Message-ID: <4415FC99.4070807@highway.ne.jp> Date: Tue, 14 Mar 2006 08:13:29 +0900 From: Kazuaki Oda User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051211) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-threads@FreeBSD.org Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Cc: Subject: about libpthread MFC 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, 13 Mar 2006 23:17:15 -0000 Hi, According to the commit message of libpthread/thread/thr_kern.c rev. 1.121, this change is MFC candidate but not done yet. Without this change, MySQL crashes when I open more than 50 connections. I think this is a serious problem, so please MFC it before 6.1-RELEASE. -- Kazuaki Oda From owner-freebsd-threads@FreeBSD.ORG Wed Mar 15 02:09:25 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 67EA716A420 for ; Wed, 15 Mar 2006 02:09:25 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB29C43D45 for ; Wed, 15 Mar 2006 02:09:24 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.5/8.13.5/NETPLEX) with ESMTP id k2F29MLM002393; Tue, 14 Mar 2006 21:09:23 -0500 (EST) Date: Tue, 14 Mar 2006 21:09:22 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Kazuaki Oda In-Reply-To: <4415FC99.4070807@highway.ne.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-threads@freebsd.org Subject: Re: about libpthread MFC X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 02:09:25 -0000 On Tue, 14 Mar 2006, Kazuaki Oda wrote: > Hi, > > According to the commit message of libpthread/thread/thr_kern.c rev. > 1.121, this change is MFC candidate but not done yet. Without this > change, MySQL crashes when I open more than 50 connections. I think > this is a serious problem, so please MFC it before 6.1-RELEASE. I'm not able to this sufficiently on -stable. Can you verify this patch? http://people.freebsd.org/~deischen/kse/libpthread-6-mfc.diffs -- DE From owner-freebsd-threads@FreeBSD.ORG Wed Mar 15 02:13:56 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 9111E16A400 for ; Wed, 15 Mar 2006 02:13:56 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F0CC43D48 for ; Wed, 15 Mar 2006 02:13:56 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.5/8.13.5/NETPLEX) with ESMTP id k2F2DtVX005213; Tue, 14 Mar 2006 21:13:55 -0500 (EST) Date: Tue, 14 Mar 2006 21:13:55 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Kazuaki Oda In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-threads@freebsd.org Subject: Re: about libpthread MFC X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 02:13:56 -0000 On Tue, 14 Mar 2006, Daniel Eischen wrote: > On Tue, 14 Mar 2006, Kazuaki Oda wrote: > > > Hi, > > > > According to the commit message of libpthread/thread/thr_kern.c rev. > > 1.121, this change is MFC candidate but not done yet. Without this > > change, MySQL crashes when I open more than 50 connections. I think > > this is a serious problem, so please MFC it before 6.1-RELEASE. > > I'm not able to this sufficiently on -stable. Can you verify ^ test > this patch? > > http://people.freebsd.org/~deischen/kse/libpthread-6-mfc.diffs > > -- DE From owner-freebsd-threads@FreeBSD.ORG Wed Mar 15 04:13:48 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 CD49516A401; Wed, 15 Mar 2006 04:13:48 +0000 (UTC) (envelope-from kaakun@highway.ne.jp) Received: from mx.highway.ne.jp (pip8.gate01.com [61.122.117.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D3E443D45; Wed, 15 Mar 2006 04:13:48 +0000 (GMT) (envelope-from kaakun@highway.ne.jp) Received: from [219.0.96.106] (helo=[192.168.11.17]) by pop11.isp.us-com.jp with esmtp (Mail 4.20) id 1FJNON-0003JL-13; Wed, 15 Mar 2006 13:13:47 +0900 Message-ID: <4417939C.8040204@highway.ne.jp> Date: Wed, 15 Mar 2006 13:10:04 +0900 From: Kazuaki Oda User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051211) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-threads@freebsd.org Subject: Re: about libpthread MFC 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: Wed, 15 Mar 2006 04:13:48 -0000 Daniel Eischen wrote: > On Tue, 14 Mar 2006, Daniel Eischen wrote: > > >>On Tue, 14 Mar 2006, Kazuaki Oda wrote: >> >> >>>Hi, >>> >>>According to the commit message of libpthread/thread/thr_kern.c rev. >>>1.121, this change is MFC candidate but not done yet. Without this >>>change, MySQL crashes when I open more than 50 connections. I think >>>this is a serious problem, so please MFC it before 6.1-RELEASE. >> >>I'm not able to this sufficiently on -stable. Can you verify > > > ^ test > > >>this patch? >> >> http://people.freebsd.org/~deischen/kse/libpthread-6-mfc.diffs Thanks for your reply, I will test your patch today or tomorrow by running MySQL and Apache-worker. But your patch is larger than I expected. Is there any other test I can do? -- Kazuaki Oda From owner-freebsd-threads@FreeBSD.ORG Wed Mar 15 06:20:12 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 35FB516A401 for ; Wed, 15 Mar 2006 06:20:12 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A352C43D46 for ; Wed, 15 Mar 2006 06:20:11 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.5/8.13.5/NETPLEX) with ESMTP id k2F6K9iL022153; Wed, 15 Mar 2006 01:20:10 -0500 (EST) Date: Wed, 15 Mar 2006 01:20:09 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Kazuaki Oda In-Reply-To: <4417939C.8040204@highway.ne.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: freebsd-threads@freebsd.org Subject: Re: about libpthread MFC X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 06:20:12 -0000 On Wed, 15 Mar 2006, Kazuaki Oda wrote: > Daniel Eischen wrote: > > > >>this patch? > >> > >> http://people.freebsd.org/~deischen/kse/libpthread-6-mfc.diffs > > Thanks for your reply, I will test your patch today or tomorrow by > running MySQL and Apache-worker. But your patch is larger than I > expected. Is there any other test I can do? The patch is an MFC of just about everything that is in -current, not just the problem that you were seeing. Verifying it works with mysql under load is probably good enough. Thanks, -- DE From owner-freebsd-threads@FreeBSD.ORG Wed Mar 15 11:10:23 2006 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA73916A44E for ; Wed, 15 Mar 2006 11:10:23 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC7C243D55 for ; Wed, 15 Mar 2006 11:10:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k2FBAMkr065617 for ; Wed, 15 Mar 2006 11:10:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k2FBAM65065616; Wed, 15 Mar 2006 11:10:22 GMT (envelope-from gnats) Resent-Date: Wed, 15 Mar 2006 11:10:22 GMT Resent-Message-Id: <200603151110.k2FBAM65065616@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sven Berkvens-Matthijsse Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA84616A400 for ; Wed, 15 Mar 2006 11:09:54 +0000 (UTC) (envelope-from sven@serv7.ilse.net) Received: from serv1.ilse.net (serv1.ilse.net [62.69.160.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 350C843D49 for ; Wed, 15 Mar 2006 11:09:53 +0000 (GMT) (envelope-from sven@serv7.ilse.net) Received: from serv7.ilse.net (serv7.ilse.net [10.1.8.17]) by serv1.ilse.net (8.12.10/8.10.2) with ESMTP id k2FB9p8L067907 for ; Wed, 15 Mar 2006 12:09:52 +0100 (MET) Received: (from sven@localhost) by serv7.ilse.net (8.13.3/8.11.1) id k2FB9pCN037532; Wed, 15 Mar 2006 12:09:51 +0100 (CET) (envelope-from sven) Message-Id: <200603151109.k2FB9pCN037532@serv7.ilse.net> Date: Wed, 15 Mar 2006 12:09:51 +0100 (CET) From: Sven Berkvens-Matthijsse To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: threads/94467: send(), sendto() and sendmsg() are not correct in libc_r X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Sven Berkvens-Matthijsse List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 11:10:24 -0000 >Number: 94467 >Category: threads >Synopsis: send(), sendto() and sendmsg() are not correct in libc_r >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Mar 15 11:10:21 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Sven Berkvens-Matthijsse >Release: FreeBSD 4.10-STABLE i386 >Organization: ilse media BV >Environment: System: FreeBSD serv7.ilse.net 4.10-STABLE FreeBSD 4.10-STABLE #23: Wed Aug 4 15:18:52 CEST 2004 root@tango.ilse.net:/usr/obj/usr/src/sys/BAROQUE i386 >Description: send(), sendto() and sendmsg() can return prematurely in the libc_r implementation. If the socket has space available, but not enough to accommodate the whole data block at once, the kernel's sendto() will return with a premature byte count, because all the sockets are always put into nonblocking mode. However, unlike write(), which does implement this correctly, the implementation of sendto() and co do not check for this condition if the thread's notion of the socket was non-blocking. Instead, it just returns the permature bytecount instead of starting another sendto()/sendmsg() to complete the action (and possibly putting the thread to sleep until poll() says it's okay to try again), like a non-blocking version should. >How-To-Repeat: sendto() using a socket and try to write 1 MB of data, for example. >Fix: Working on this one... will post a patch when available. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Wed Mar 15 14:16:09 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 30A9B16A400; Wed, 15 Mar 2006 14:16:09 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C234743D46; Wed, 15 Mar 2006 14:16:08 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.5/8.13.5/NETPLEX) with ESMTP id k2FEG7PE001961; Wed, 15 Mar 2006 09:16:07 -0500 (EST) Date: Wed, 15 Mar 2006 09:16:07 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Sven Berkvens-Matthijsse In-Reply-To: <200603151109.k2FB9pCN037532@serv7.ilse.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: FreeBSD-gnats-submit@freebsd.org, freebsd-threads@freebsd.org Subject: Re: threads/94467: send(), sendto() and sendmsg() are not correct in libc_r X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 14:16:09 -0000 On Wed, 15 Mar 2006, Sven Berkvens-Matthijsse wrote: > > >Number: 94467 > >Category: threads > >Synopsis: send(), sendto() and sendmsg() are not correct in libc_r > >Confidential: no > >Severity: serious > >Priority: medium > >Responsible: freebsd-threads > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Wed Mar 15 11:10:21 GMT 2006 > >Closed-Date: > >Last-Modified: > >Originator: Sven Berkvens-Matthijsse > >Release: FreeBSD 4.10-STABLE i386 > >Organization: > ilse media BV > >Environment: > System: FreeBSD serv7.ilse.net 4.10-STABLE FreeBSD 4.10-STABLE #23: Wed Aug 4 15:18:52 CEST 2004 root@tango.ilse.net:/usr/obj/usr/src/sys/BAROQUE i386 > > >Description: > send(), sendto() and sendmsg() can return prematurely in the libc_r > implementation. If the socket has space available, but not enough to > accommodate the whole data block at once, the kernel's sendto() will > return with a premature byte count, because all the sockets are always > put into nonblocking mode. However, unlike write(), which does > implement this correctly, the implementation of sendto() and co do not > check for this condition if the thread's notion of the socket was > non-blocking. Instead, it just returns the permature bytecount instead > of starting another sendto()/sendmsg() to complete the action (and > possibly putting the thread to sleep until poll() says it's okay to > try again), like a non-blocking version should. We're not maintaining libc_r any longer, and 4.x is pretty much a dead branch. If you need bug fixes, you need to upgrade to 6.x stable and use libpthread or libthr. -- DE From owner-freebsd-threads@FreeBSD.ORG Wed Mar 15 14:20:25 2006 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9EFF016A425 for ; Wed, 15 Mar 2006 14:20:25 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEEDA43D46 for ; Wed, 15 Mar 2006 14:20:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k2FEKOHT082286 for ; Wed, 15 Mar 2006 14:20:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k2FEKOtC082285; Wed, 15 Mar 2006 14:20:24 GMT (envelope-from gnats) Date: Wed, 15 Mar 2006 14:20:24 GMT Message-Id: <200603151420.k2FEKOtC082285@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Cc: Subject: Re: threads/94467: send(), sendto() and sendmsg() are not correct in libc_r X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Mar 2006 14:20:25 -0000 The following reply was made to PR threads/94467; it has been noted by GNATS. From: Daniel Eischen To: Sven Berkvens-Matthijsse Cc: FreeBSD-gnats-submit@freebsd.org, Subject: Re: threads/94467: send(), sendto() and sendmsg() are not correct in libc_r Date: Wed, 15 Mar 2006 09:16:07 -0500 (EST) On Wed, 15 Mar 2006, Sven Berkvens-Matthijsse wrote: > > >Number: 94467 > >Category: threads > >Synopsis: send(), sendto() and sendmsg() are not correct in libc_r > >Confidential: no > >Severity: serious > >Priority: medium > >Responsible: freebsd-threads > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Wed Mar 15 11:10:21 GMT 2006 > >Closed-Date: > >Last-Modified: > >Originator: Sven Berkvens-Matthijsse > >Release: FreeBSD 4.10-STABLE i386 > >Organization: > ilse media BV > >Environment: > System: FreeBSD serv7.ilse.net 4.10-STABLE FreeBSD 4.10-STABLE #23: Wed Aug 4 15:18:52 CEST 2004 root@tango.ilse.net:/usr/obj/usr/src/sys/BAROQUE i386 > > >Description: > send(), sendto() and sendmsg() can return prematurely in the libc_r > implementation. If the socket has space available, but not enough to > accommodate the whole data block at once, the kernel's sendto() will > return with a premature byte count, because all the sockets are always > put into nonblocking mode. However, unlike write(), which does > implement this correctly, the implementation of sendto() and co do not > check for this condition if the thread's notion of the socket was > non-blocking. Instead, it just returns the permature bytecount instead > of starting another sendto()/sendmsg() to complete the action (and > possibly putting the thread to sleep until poll() says it's okay to > try again), like a non-blocking version should. We're not maintaining libc_r any longer, and 4.x is pretty much a dead branch. If you need bug fixes, you need to upgrade to 6.x stable and use libpthread or libthr. -- DE From owner-freebsd-threads@FreeBSD.ORG Wed Mar 15 20:02:24 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 8568516A425; Wed, 15 Mar 2006 20:02:24 +0000 (UTC) (envelope-from kaakun@highway.ne.jp) Received: from mx.highway.ne.jp (pip7.gate01.com [61.122.117.245]) by mx1.FreeBSD.org (Postfix) with ESMTP id F324F43D48; Wed, 15 Mar 2006 20:02:23 +0000 (GMT) (envelope-from kaakun@highway.ne.jp) Received: from [219.0.96.106] (helo=[192.168.11.17]) by pop12.isp.us-com.jp with esmtp (Mail 4.20) id 1FJcCM-0004j2-Fx; Thu, 16 Mar 2006 05:02:22 +0900 Message-ID: <441871EF.7090602@highway.ne.jp> Date: Thu, 16 Mar 2006 04:58:39 +0900 From: Kazuaki Oda User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051211) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-threads@freebsd.org Subject: Re: about libpthread MFC 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: Wed, 15 Mar 2006 20:02:24 -0000 Daniel Eischen wrote: > On Wed, 15 Mar 2006, Kazuaki Oda wrote: > > >>Daniel Eischen wrote: >> >>>>this patch? >>>> >>>> http://people.freebsd.org/~deischen/kse/libpthread-6-mfc.diffs >> >>Thanks for your reply, I will test your patch today or tomorrow by >>running MySQL and Apache-worker. But your patch is larger than I >>expected. Is there any other test I can do? > > > The patch is an MFC of just about everything that is in -current, > not just the problem that you were seeing. Verifying it works > with mysql under load is probably good enough. > > Thanks, > I've done. I opened 1000 connections to MySQL server in parallel, and no crash occurred. I also tested Apache-worker, and didn't see any problem. It seems, at least for me, that the patch is fine. Thanks, -- Kazuaki Oda