From owner-freebsd-threads@FreeBSD.ORG Mon May 9 11:01:51 2005 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 62ED616A509 for ; Mon, 9 May 2005 11:01:51 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3785F43DA5 for ; Mon, 9 May 2005 11:01:51 +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.3/8.13.3) with ESMTP id j49B1plY097772 for ; Mon, 9 May 2005 11:01:51 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j49B1oj2097764 for freebsd-threads@freebsd.org; Mon, 9 May 2005 11:01:50 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 9 May 2005 11:01:50 GMT Message-Id: <200505091101.j49B1oj2097764@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 Subject: Current problem reports assigned to you 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, 09 May 2005 11:01:52 -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 [PATCH?] Threaded applications executed w 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 o [2003/05/08] threads/51949threads thread in accept cannot be cancelled 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/09/14] threads/71725threads Mysql Crashes frequently giving Sock Erro 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/04] threads/75795threads applications linked with -lc_r can't clos o [2005/01/26] threads/76694threads fork cause hang in dup()/close() function o [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 26 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/05/26] kern/18824 threads gethostbyname is not thread safe 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/01/20] threads/76513threads libpthread is not working o [2005/02/01] threads/76938threads include/unistd.h: ttyname_r prototype mis o [2005/04/13] threads/79887threads [patch] freopen() isn't thread-safe 12 problems total. From owner-freebsd-threads@FreeBSD.ORG Wed May 11 11:50:03 2005 Return-Path: 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 130AD16A4CE for ; Wed, 11 May 2005 11:50:03 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9B2343D76 for ; Wed, 11 May 2005 11:50:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4BBo2Mi061131 for ; Wed, 11 May 2005 11:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4BBo2CE061130; Wed, 11 May 2005 11:50:02 GMT (envelope-from gnats) Resent-Date: Wed, 11 May 2005 11:50:02 GMT Resent-Message-Id: <200505111150.j4BBo2CE061130@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, Steven Jurczyk Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9017816A4CE for ; Wed, 11 May 2005 11:49:48 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E5DF43D66 for ; Wed, 11 May 2005 11:49:48 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j4BBnlH2046864 for ; Wed, 11 May 2005 11:49:48 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j4BBnlG7046863; Wed, 11 May 2005 11:49:47 GMT (envelope-from nobody) Message-Id: <200505111149.j4BBnlG7046863@www.freebsd.org> Date: Wed, 11 May 2005 11:49:47 GMT From: Steven Jurczyk To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: threads/80887: ULE with SMP broke libpthread/libthr on 5.4-RELEASE 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: Wed, 11 May 2005 11:50:03 -0000 >Number: 80887 >Category: threads >Synopsis: ULE with SMP broke libpthread/libthr on 5.4-RELEASE >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed May 11 11:50:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Steven Jurczyk >Release: 5.4-RELEASE >Organization: >Environment: FreeBSD meritum2.home.net.pl 5.4-RELEASE FreeBSD 5.4-RELEASE #17: Wed May 11 11:11:01 CEST 2005 steve@meritum2.home.net.pl:/data/src/bsd/sys/i386/compile/HOME i386 >Description: Using ULE on SMP machine broke applications which use libpthread/libthr, probably at context switching between threads... The applications simply hang and they aren't killable (kill -9 don't work).. Usually this also break kernel shutdown (can't flush some inodes or blocks)... >How-To-Repeat: Compile kernel with options: options SMP options SCHED_ULE and try to start mysqld_server on dual dual processor (may be on Pentium IV with enabled HT) The problem also is repeatable at 50% success rate with simple /usr/bin/host util. Setting setenv LIBPTHREAD_SYSTEM_SCOPE usually helps to hang any pthreads application at their initialization. >Fix: sorry :) >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Fri May 13 15:59:04 2005 Return-Path: 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 36C9016A4CE; Fri, 13 May 2005 15:59:04 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1032543D53; Fri, 13 May 2005 15:59:04 +0000 (GMT) (envelope-from delphij@FreeBSD.org) Received: from freefall.freebsd.org (delphij@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4DFx3G0031025; Fri, 13 May 2005 15:59:03 GMT (envelope-from delphij@freefall.freebsd.org) Received: (from delphij@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4DFx3Vu031021; Fri, 13 May 2005 15:59:03 GMT (envelope-from delphij) Date: Fri, 13 May 2005 15:59:03 GMT From: Xin LI Message-Id: <200505131559.j4DFx3Vu031021@freefall.freebsd.org> To: delphij@FreeBSD.org, freebsd-threads@FreeBSD.org, delphij@FreeBSD.org Subject: Re: threads/76938: include/unistd.h: ttyname_r prototype missing 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, 13 May 2005 15:59:04 -0000 Synopsis: include/unistd.h: ttyname_r prototype missing Responsible-Changed-From-To: freebsd-threads->delphij Responsible-Changed-By: delphij Responsible-Changed-When: Fri May 13 15:58:01 GMT 2005 Responsible-Changed-Why: Grab as reminded by Jeremy Messenger. http://www.freebsd.org/cgi/query-pr.cgi?pr=76938 From owner-freebsd-threads@FreeBSD.ORG Fri May 13 17:40:02 2005 Return-Path: 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 A240A16A4CE for ; Fri, 13 May 2005 17:40:02 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73F3543D66 for ; Fri, 13 May 2005 17:40:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4DHe2ql043888 for ; Fri, 13 May 2005 17:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4DHe2Q0043887; Fri, 13 May 2005 17:40:02 GMT (envelope-from gnats) Resent-Date: Fri, 13 May 2005 17:40:02 GMT Resent-Message-Id: <200505131740.j4DHe2Q0043887@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, Pete French Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A721C16A4CE for ; Fri, 13 May 2005 17:39:20 +0000 (GMT) Received: from mail.ticketswitch.com (mail.ticketswitch.com [194.200.93.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DA5A43D76 for ; Fri, 13 May 2005 17:39:20 +0000 (GMT) (envelope-from petefrench@ticketswitch.com) Received: from [172.16.1.6] (helo=dilbert.firstcallgroup.co.uk) by mail.ticketswitch.com with esmtp (Exim 4.50 (FreeBSD)) id 1DWe83-0004ln-Fc for FreeBSD-gnats-submit@freebsd.org; Fri, 13 May 2005 18:39:15 +0100 Received: from petefrench by dilbert.firstcallgroup.co.uk with local (Exim 4.50 (FreeBSD)) id 1DWe83-000K2U-Aq for FreeBSD-gnats-submit@freebsd.org; Fri, 13 May 2005 18:39:15 +0100 Message-Id: Date: Fri, 13 May 2005 18:39:15 +0100 From: Pete French To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: threads/80992: abort() sometimes not caught by gdb depending on thread library X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Pete French List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2005 17:40:02 -0000 >Number: 80992 >Category: threads >Synopsis: abort() sometimes not caught by gdb depending on thread library >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri May 13 17:40:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Pete French >Release: FreeBSD 5.4-RELEASE i386 >Organization: www.ticketswitch.com >Environment: System: FreeBSD dilbert.rattatosk 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Tue May 10 14:15:25 BST 2005 petefrench@dilbert.rattatosk:/usr/obj/usr/src/sys/P4-SMP-WORKSTATION i386 >Description: When an unknown method is called in /usr/lib/libobjc.a it calls abort() to halt the program with a SIGABRT. Running such a program under gdb should then allow you to trace the point of the call. If the program is linked with -lthr then this works. If it is linked with -lpthread then this does not work, and gdb says "The program no longer exists." This works on FreeBSD 4 and all other operating systems I have tried it on. It also works, as stated, with libthr on FreeBSD 5. The problem seems to be specific to libpthread This has only shown up when trying to debug threaded code, but the fact it is specific to a thread library and that the code behaves everywhere else makes me wonder if something more sinister is going on inside pthread. >How-To-Repeat: Simple test code: #include #include #include #include int main(int argc, char *argv[]) { id my_test = [Object new]; [my_test a_missing_method]; return 0; } Compile with "cc -g test.m -lobj -lpthread" and run under gdb. Compiling with "cc -g test.m -lobj -lthr" behaves as expected. >Fix: This is only an issue when debugging, and if I need to track down a bad method call I can always compile and run with libthr in order to find it. Annoying but not the end of the world. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Sat May 14 11:40:28 2005 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 A2BA316A4CE for ; Sat, 14 May 2005 11:40:28 +0000 (GMT) Received: from bute.st-andrews.ac.uk (bute.st-and.ac.uk [138.251.12.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CECD43D46 for ; Sat, 14 May 2005 11:40:27 +0000 (GMT) (envelope-from s_sourceforge@nedprod.com) Received: from johanna (res04-ned6.res.st-and.ac.uk [138.251.234.67]) by bute.st-andrews.ac.uk (8.9.1a/8.9.1) with SMTP id MAA03776 for ; Sat, 14 May 2005 12:34:38 +0100 (BST) From: "Niall Douglas" To: freebsd-threads@freebsd.org Date: Sat, 14 May 2005 12:39:55 +0100 MIME-Version: 1.0 Message-ID: <4285F19B.27289.5F10BB@localhost> Priority: normal X-mailer: Pegasus Mail for Windows (4.21c) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Content-Transfer-Encoding: 7BIT Subject: Benchmarking 5.4 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, 14 May 2005 11:40:28 -0000 As promised, here is the writeup of the benchmarking of my code on various systems: http://www.nedprod.com/Tn/ The code is heavily multithreaded, with some eleven to fourteen threads running most of these experiencing some load. It represents a good test of the scheduler and thread performance. It uses its own mutex implementation as to be honest, my own is far faster than any other I've found. This could change if FreeBSD made full use of the M:N scope for optimisation. The code uses a mixture of process scope and system scope threads but mostly process scope as that's the default on FreeBSD builds on my library. The kernel was a GENERIC amd64 build but only with SCHED_ULE changed (so no witness, invariant etc.). The good news is that performance now matches Linux for the first time having previously been a fraction. The bad news is that Windows is still whooping both Linux and FreeBSD. There is a curious thing on FreeBSD - during the memory mapped i/o test, the percent complete goes from 0%-60% very quickly indeed but then hangs at 60% for what seems like ages before completing at a slower rate than before. What's happening internally is that a 4.47Mb file is being mapped in in 1Mb segments and memcpy()'ed elsewhere. I initially thought it might be the 4BSD scheduler so I tried ULE but it made no difference (to the benchmarks or anything). The test file was on UFS with soft updates. Even in the packet based transfers, the percent complete noticeably goes faster from 0%-60% and then halts momentarily before continuing at a slower pace though it's nothing like as bad as memory mapped. Of course internally the file is still being accessed as memory mapped ie; the server still maps the file, just it reads and packetises it for the client. If I watch the disk drive light, it does flicker briefly at the end of the test but otherwise remained unlit - surely under UFS the file would still be in the cache? If that memory mapped i/o thing were sorted out, I'm quite sure that FreeBSD would at least reach half the Windows speeds. Any ideas? Is there some kernel sysctl for setting read ahead buffering or something? 60% of 4.47Mb is around 2.6Mb. Cheers, Niall