From owner-freebsd-threads@FreeBSD.ORG Mon Jun 27 11:07:13 2011 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC940106566C for ; Mon, 27 Jun 2011 11:07:13 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8273C8FC0C for ; Mon, 27 Jun 2011 11:07:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5RB7D9O071988 for ; Mon, 27 Jun 2011 11:07:13 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5RB7CmK071986 for freebsd-threads@FreeBSD.org; Mon, 27 Jun 2011 11:07:12 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 27 Jun 2011 11:07:12 GMT Message-Id: <201106271107.p5RB7CmK071986@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-threads@FreeBSD.org X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2011 11:07:13 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o threa/157040 threads [libthr] valgrind detects leaks in libthr.so.3 o threa/154893 threads pthread_sigmask don't work if mask and oldmask are pas o threa/150959 threads [libc] Stub pthread_once in libc should call _libc_onc o threa/149366 threads pthread_cleanup_pop never runs the configured routine o threa/148515 threads Memory / syslog strangeness in FreeBSD 8.x ( possible o threa/141721 threads rtprio(1): (id|rt)prio priority resets when new thread o threa/136345 threads Recursive read rwlocks in thread A cause deadlock with o threa/135673 threads databases/mysql50-server - MySQL query lock-ups on 7.2 o threa/128922 threads threads hang with xorg running o threa/127225 threads bug in lib/libthr/thread/thr_init.c o threa/122923 threads 'nice' does not prevent background process from steali o threa/121336 threads lang/neko threading ok on UP, broken on SMP (FreeBSD 7 o threa/116668 threads can no longer use jdk15 with libthr on -stable SMP o threa/115211 threads pthread_atfork misbehaves in initial thread o threa/110636 threads [request] gdb(1): using gdb with multi thread applicat o threa/110306 threads apache 2.0 segmentation violation when calling gethost o threa/103975 threads Implicit loading/unloading of libpthread.so may crash o threa/101323 threads [patch] fork(2) in threaded programs broken. s threa/84483 threads problems with devel/nspr and -lc_r on 4.x o threa/80992 threads abort() sometimes not caught by gdb depending on threa o threa/79683 threads svctcp_create() fails if multiple threads call at the s threa/76694 threads fork cause hang in dup()/close() function in child (-l s threa/76690 threads fork hang in child for -lc_r s threa/69020 threads pthreads library leaks _gc_mutex s threa/48856 threads Setting SIGCHLD to SIG_IGN still leaves zombies under s threa/40671 threads pthread_cancel doesn't remove thread from condition qu s threa/34536 threads accept() blocks other threads s threa/30464 threads [patch] pthread mutex attributes -- pshared 28 problems total. From owner-freebsd-threads@FreeBSD.ORG Wed Jun 29 17:36:54 2011 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8FFF106566C for ; Wed, 29 Jun 2011 17:36:54 +0000 (UTC) (envelope-from schumjs@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id A3FD58FC0A for ; Wed, 29 Jun 2011 17:36:54 +0000 (UTC) Received: by iwr19 with SMTP id 19so1719731iwr.13 for ; Wed, 29 Jun 2011 10:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=foMy63HD8GYxt5kZCNAEtjbEtp6HZ9DyMFKs0AtvdnA=; b=hyxpd0jI+yqjcXBMoG+615NCrit772EAPziEUIFYfOYt6EtZKFeEGLlD/hLCDiVx+h yqaS20HnlQmte0nReHd/buBb8sqzPNo/4vE/6F/HEwmwvZyZoeIOeSY0VQ2+6H5WIhOI KJXdjNxeKb0v49jE595BCLAcpfz3PBLM5FS9o= MIME-Version: 1.0 Received: by 10.231.82.193 with SMTP id c1mr848940ibl.177.1309369013922; Wed, 29 Jun 2011 10:36:53 -0700 (PDT) Received: by 10.231.149.13 with HTTP; Wed, 29 Jun 2011 10:36:53 -0700 (PDT) Date: Wed, 29 Jun 2011 12:36:53 -0500 Message-ID: From: John Schumacher To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Using fbsd-threads.c versus thread-db.c (gdbserver) 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, 29 Jun 2011 17:36:54 -0000 Question: Does anyone understand the differences between freebsd-threads.c and thread-db.c in FreeBSD? Linux's gdbserver makes calls to thread-db.c and thread-db.c sits in the gdbserver folder in the 8.1 FreeBSD distro. However, I notice that fbsd-threads.c (which sits in FreeBSD\8.1\builds\8.1\kernel\source\gnu\usr.bin\gdb\libgdb) has similar functionality. Is the thread-db.c sitting in the gdbserver a relic from when it was ported over, and doesn't work with FreeBSD? Should one use the fbsd-threads.c to query the kernel for new and existing threads? Thanks -John -- John Schumacher University of Minnesota (TC) Electrical Engineering From owner-freebsd-threads@FreeBSD.ORG Thu Jun 30 06:28:23 2011 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F002106566C for ; Thu, 30 Jun 2011 06:28:23 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4318FC13; Thu, 30 Jun 2011 06:28:23 +0000 (UTC) Received: from xyf.my.dom (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5U6SLow098996; Thu, 30 Jun 2011 06:28:22 GMT (envelope-from davidxu@freebsd.org) Message-ID: <4E0C1787.8030102@freebsd.org> Date: Thu, 30 Jun 2011 14:28:23 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.13) Gecko/20110127 Thunderbird/3.1.7 MIME-Version: 1.0 To: John Schumacher References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-threads@freebsd.org Subject: Re: Using fbsd-threads.c versus thread-db.c (gdbserver) 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: Thu, 30 Jun 2011 06:28:23 -0000 On 2011/06/30 01:36, John Schumacher wrote: > Question: > Does anyone understand the differences between freebsd-threads.c and > thread-db.c in FreeBSD? > Linux's gdbserver makes calls to thread-db.c and thread-db.c sits in the > gdbserver folder in the 8.1 FreeBSD distro. > However, I notice that fbsd-threads.c (which sits in > FreeBSD\8.1\builds\8.1\kernel\source\gnu\usr.bin\gdb\libgdb) has similar > functionality. > Is the thread-db.c sitting in the gdbserver a relic from when it was ported > over, and doesn't work with FreeBSD? Should one use the fbsd-threads.c to > query the kernel for new and existing threads? > AFAIK, thread-db.c is for Linux only, fbsd-threads.c is FreeBSD code which implements gdb's target, the code depends on external library called libthread_db which is a standard to query threads. > Thanks > -John > From owner-freebsd-threads@FreeBSD.ORG Thu Jun 30 14:24:48 2011 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 862AB106564A for ; Thu, 30 Jun 2011 14:24:48 +0000 (UTC) (envelope-from schumjs@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 511068FC12 for ; Thu, 30 Jun 2011 14:24:47 +0000 (UTC) Received: by iwr19 with SMTP id 19so2714841iwr.13 for ; Thu, 30 Jun 2011 07:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0CGTjkSQKJ7bxWPHdnLDSZ0SBGmD0guj6V+7ClZgNOc=; b=BWI/jwC30idzBc3upOTdSVk5GHNdzJiU2tWrPdUs0XC0hW4wQ2BIRIMo5BFhUIRIaK sP0Lm8birv1NvreVB1sB3jYbuQ2pyQXNU+JVQ1x6SV961b9beY0AymHzNEtj/tXemRJO TnBu2nvhQHpU1yoep4GeMHdnXWVO2WMKzIavo= MIME-Version: 1.0 Received: by 10.231.113.214 with SMTP id b22mr1850055ibq.102.1309443887426; Thu, 30 Jun 2011 07:24:47 -0700 (PDT) Received: by 10.231.149.13 with HTTP; Thu, 30 Jun 2011 07:24:47 -0700 (PDT) In-Reply-To: <4E0C1787.8030102@freebsd.org> References: <4E0C1787.8030102@freebsd.org> Date: Thu, 30 Jun 2011 09:24:47 -0500 Message-ID: From: John Schumacher To: David Xu Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-threads@freebsd.org Subject: Re: Using fbsd-threads.c versus thread-db.c (gdbserver) 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: Thu, 30 Jun 2011 14:24:48 -0000 Thanks for the clarification David. So for something like gdbserver, which cannot currently query threads, the functional equivalent of fbsd-threads must be implemented to allow for thread awareness? Would there be a reason that gdbserver cannot use the same functions as gdb is using to query threads (gdb being thread aware)? It seems like after the attach on the initial process, there should be no difference between the two- the only difference that I can see is that gdbserver can attach on-the-fly, so it would have to be aware of existing threads. I have looked at the linux flavour of gdbserver. It has full thread awareness and manipulation, but using the nptl threading methods which allow lwps to be handled as full processes. This essentially allows every request type of ptrace() to operate on lwps. There's more to it (like handling certain signals), but that seems to be the big difference. I guess another valid question would be if FreeBSD planned on implementing nptl-like threading in the near future... Thanks a bunch -John On Thu, Jun 30, 2011 at 1:28 AM, David Xu wrote: > On 2011/06/30 01:36, John Schumacher wrote: > > Question: > > Does anyone understand the differences between freebsd-threads.c and > > thread-db.c in FreeBSD? > > Linux's gdbserver makes calls to thread-db.c and thread-db.c sits in the > > gdbserver folder in the 8.1 FreeBSD distro. > > However, I notice that fbsd-threads.c (which sits in > > FreeBSD\8.1\builds\8.1\kernel\source\gnu\usr.bin\gdb\libgdb) has similar > > functionality. > > Is the thread-db.c sitting in the gdbserver a relic from when it was > ported > > over, and doesn't work with FreeBSD? Should one use the fbsd-threads.c to > > query the kernel for new and existing threads? > > > AFAIK, thread-db.c is for Linux only, fbsd-threads.c is FreeBSD code > which implements gdb's target, the code depends on external library > called libthread_db which is a standard to query threads. > > > Thanks > > -John > > > -- John Schumacher University of Minnesota (TC) Electrical Engineering