From owner-freebsd-threads@FreeBSD.ORG Mon Jan 27 11:06:56 2014 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61B52D36 for ; Mon, 27 Jan 2014 11:06:56 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4C5081A9B for ; Mon, 27 Jan 2014 11:06:56 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s0RB6umG013180 for ; Mon, 27 Jan 2014 11:06:56 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id s0RB6tkB013178 for freebsd-threads@FreeBSD.org; Mon, 27 Jan 2014 11:06:55 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 27 Jan 2014 11:06:55 GMT Message-Id: <201401271106.s0RB6tkB013178@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 Subject: Current problem reports assigned to freebsd-threads@FreeBSD.org X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jan 2014 11:06:56 -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/184073 threads wrong signal delivery to multithreaded processes in Pe o threa/180652 threads [patch] compat32 problem in clock_getcpuclockid2 o threa/180496 threads clock_gettime() does not return CPU-time for zombie pr o threa/168417 threads pthread_getcpuclockid() does not work to specification o threa/163512 threads libc defaults to single threaded o threa/160708 threads possible security problem with RLIMIT_VMEM o threa/150959 threads [libc] Stub pthread_once in libc should call _libc_onc 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/135673 threads databases/mysql50-server - MySQL query lock-ups on 7.2 o threa/128922 threads threads hang with xorg running 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/110306 threads apache 2.0 segmentation violation when calling gethost o threa/103975 threads Implicit loading/unloading of libpthread.so may crash 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/30464 threads [patch] pthread mutex attributes -- pshared 20 problems total. From owner-freebsd-threads@FreeBSD.ORG Fri Jan 31 21:10:00 2014 Return-Path: Delivered-To: freebsd-threads@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3931E5D for ; Fri, 31 Jan 2014 21:10:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E4C8195C for ; Fri, 31 Jan 2014 21:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s0VLA0mP091571 for ; Fri, 31 Jan 2014 21:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id s0VLA0NN091570; Fri, 31 Jan 2014 21:10:00 GMT (envelope-from gnats) Resent-Date: Fri, 31 Jan 2014 21:10:00 GMT Resent-Message-Id: <201401312110.s0VLA0NN091570@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, John Wolfe Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D755E3A for ; Fri, 31 Jan 2014 21:08:18 +0000 (UTC) Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 396981948 for ; Fri, 31 Jan 2014 21:08:18 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s0VL8HCq092777 for ; Fri, 31 Jan 2014 21:08:17 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s0VL8Hcc092768; Fri, 31 Jan 2014 21:08:17 GMT (envelope-from nobody) Message-Id: <201401312108.s0VL8Hcc092768@oldred.freebsd.org> Date: Fri, 31 Jan 2014 21:08:17 GMT From: John Wolfe To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: threads/186309: pthread_kill() broken code - signal to current thread sent twice X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jan 2014 21:10:00 -0000 >Number: 186309 >Category: threads >Synopsis: pthread_kill() broken code - signal to current thread sent twice >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 Jan 31 21:10:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: John Wolfe >Release: FreeBSD (PC-BSD) 9.2 & FreeBSD 10.0 RELEASE >Organization: Xinuos, Inc. >Environment: FreeBSD sapphire.nj.sco.com 9.2-RELEASE-p12 FreeBSD 9.2-RELEASE-p12 #0: Thu Jan 16 21:12:30 UTC 2014 root@amd64-builder.pcbsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Regression tests for llvm/LLDB debugger on FreeBSD 9 and FreeBSD 10 fail those tests that expect a specific number of SIGUSR1 signals to be caught by the debugger. See FreeBSD lldb problem report: http://llvm.org/bugs/show_bug.cgi?id=18065 Exactly twice the expected signals are caught. This is because the "if - else if -else if" code in lib/libthr/thread/thr_kill.c pthread_kill () is missing the obviously intended "else" before the last "if" statement. >How-To-Repeat: See above mentioned LLDB problem report. >Fix: A proposed unified diff patch is attached. Patch attached with submission follows: --- /usr/src/lib/libthr/thread/thr_kill.c.orig 2013-11-07 17:27:57.642970341 -0500 +++ /usr/src/lib/libthr/thread/thr_kill.c 2014-01-31 15:17:29.345215938 -0500 @@ -58,7 +58,8 @@ if (sig > 0) _thr_send_sig(pthread, sig); ret = 0; - } if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)) + } + else if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)) == 0) { if (sig > 0) _thr_send_sig(pthread, sig); >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Sat Feb 1 18:20:01 2014 Return-Path: Delivered-To: freebsd-threads@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A90765A for ; Sat, 1 Feb 2014 18:20:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5DFA11252 for ; Sat, 1 Feb 2014 18:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s11IK1qo018290 for ; Sat, 1 Feb 2014 18:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id s11IK1Au018289; Sat, 1 Feb 2014 18:20:01 GMT (envelope-from gnats) Date: Sat, 1 Feb 2014 18:20:01 GMT Message-Id: <201402011820.s11IK1Au018289@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: threads/186309: commit references a PR X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: dfilter service List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Feb 2014 18:20:01 -0000 The following reply was made to PR threads/186309; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: threads/186309: commit references a PR Date: Sat, 1 Feb 2014 18:13:26 +0000 (UTC) Author: kib Date: Sat Feb 1 18:13:18 2014 New Revision: 261354 URL: http://svnweb.freebsd.org/changeset/base/261354 Log: In _pthread_kill(), if passed pthread is current thread, do not send the signal second time, by adding the missed else before if statement. While there, postpone initializing local curthread variable until passed signal number is checked for validity. Submitted by: John Wolfe PR: threads/186309 MFC after: 1 week Modified: head/lib/libthr/thread/thr_kill.c Modified: head/lib/libthr/thread/thr_kill.c ============================================================================== --- head/lib/libthr/thread/thr_kill.c Sat Feb 1 17:53:35 2014 (r261353) +++ head/lib/libthr/thread/thr_kill.c Sat Feb 1 18:13:18 2014 (r261354) @@ -42,24 +42,27 @@ __weak_reference(_pthread_kill, pthread_ int _pthread_kill(pthread_t pthread, int sig) { - struct pthread *curthread = _get_curthread(); + struct pthread *curthread; int ret; /* Check for invalid signal numbers: */ if (sig < 0 || sig > _SIG_MAXSIG) /* Invalid signal: */ - ret = EINVAL; + return (EINVAL); + + curthread = _get_curthread(); + /* * Ensure the thread is in the list of active threads, and the * signal is valid (signal 0 specifies error checking only) and * not being ignored: */ - else if (curthread == pthread) { + if (curthread == pthread) { if (sig > 0) _thr_send_sig(pthread, sig); ret = 0; - } if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0)) - == 0) { + } else if ((ret = _thr_find_thread(curthread, pthread, + /*include dead*/0)) == 0) { if (sig > 0) _thr_send_sig(pthread, sig); THR_THREAD_UNLOCK(curthread, pthread); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"