From owner-freebsd-current@FreeBSD.ORG Mon Mar 9 19:02:12 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E8251065676 for ; Mon, 9 Mar 2009 19:02:12 +0000 (UTC) (envelope-from justin.teller@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.231]) by mx1.freebsd.org (Postfix) with ESMTP id 6B6088FC1A for ; Mon, 9 Mar 2009 19:02:12 +0000 (UTC) (envelope-from justin.teller@gmail.com) Received: by rv-out-0506.google.com with SMTP id f6so1944134rvb.43 for ; Mon, 09 Mar 2009 12:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:x-mailer:mime-version:subject:date; bh=J94m/Q3fkY4Q65YA0WzDMjpzRGhlR7qU3R2xjQe0RLk=; b=xL384qkqwcB0h/x7y3DFNnZLX75yvyNf01vvdO9a4M5tgh0oA0Rpjxszj0Qu6StH0a 0dVWYUiYJ4P4rlUTwXg88/E1BkezlJKX4c1+pQj7E8t/Eddvw72xkehxyakdXEPzoOGv OfHJJcWJZ/mVNmbQcdRavg6wvWmdxOFctGn4Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:x-mailer:mime-version:subject:date; b=xXmxMeJcfz8MMToe4L6u6DWxjqkakUPfoLD3G4H/5apYywTeCvXpOvPoOCuR09SP08 R9dGaBFEbwt5nggKpu/OCopX2h7CVSbLlHNkIK49fQuS7ddYMKjx2lIHpvIleRYH2XDQ Z+cMPCB04q75g2NRKmd/VURiKCXCwsJhPGcYk= Received: by 10.141.180.16 with SMTP id h16mr3226145rvp.68.1236625331867; Mon, 09 Mar 2009 12:02:11 -0700 (PDT) Received: from ?10.91.14.61? ([32.157.118.52]) by mx.google.com with ESMTPS id g31sm15497223rvb.7.2009.03.09.12.02.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 09 Mar 2009 12:02:11 -0700 (PDT) Message-Id: <3561C827-66BD-4B3F-A3D4-97C4C06884B4@gmail.com> From: Justin Teller To: "freebsd-current@freebsd.org" Content-Type: multipart/mixed; boundary=Apple-Mail-1-620089454 X-Mailer: iPhone Mail (5H11) Mime-Version: 1.0 (iPhone Mail 5H11) Date: Mon, 9 Mar 2009 12:02:03 -0700 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Using PTHREAD_PRIO_INHERIT causes panic in kern_umtx.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2009 19:02:13 -0000 --Apple-Mail-1-620089454 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit When I compile and run the attached program, it panics my system, (FreeBSD CURRENT as of 2-20-09) with the following message: panic: Assertion pi != NULL failed at /usr/src/sys/kern/kern_umtx: 1464 With the backtrace being: Tracing pid 1079 tid 100045 td 0xffffff00037c8000 kdb_enter() at kdb_enter+0x40 panic() at panic+0x1ec umtx_pi_adjust() at umtx_pi_adjust+0xfc8 umtx_pi_adjust() at umtx_pi_adjust+0x19bd _umtx_unlock() at _umtx_unlock+0x2c41 _umtx_op() at _umtx_op+0x22 syscall() at syscall+0x1f4 Xfast_syscall() at Xfast_syscall+0xaa --- syscall (454, FreeBSD ELF64, _umtx_op), rip = 0x4056ac, rsp = 0x7fffffbfef38, rbp = 0x80060b150 --- This problem only shows up when I use PTHREAD_PRIO_INHERIT -- if I change the line for pthread_mutexattr_setprotocol to PTHREAD_PRIO_NONE, then it works fine. I've been trying to trace thru the code to figure out where uq_pi_blocked should be setup, but I'm not too familiar with the code so I haven't found where the problem originates. How can I get PTHREAD_PRIO_INHERIT to work? And even if the change is in user-space, it probably shouldn't be this easy to panic the kernel :-) -Justin PS I'm reasonably certain that the most recent checkins (between now and Feb 20th) wouldn't fix this, but if I'm wrong, just let me know! --Apple-Mail-1-620089454 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-1-620089454--