From owner-freebsd-standards@FreeBSD.ORG Mon Oct 18 11:02:10 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C75D16A4CF for ; Mon, 18 Oct 2004 11:02:10 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 269CD43D41 for ; Mon, 18 Oct 2004 11:02:10 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i9IB2ATn048199 for ; Mon, 18 Oct 2004 11:02:10 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i9IB29qi048193 for freebsd-standards@freebsd.org; Mon, 18 Oct 2004 11:02:09 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 18 Oct 2004 11:02:09 GMT Message-Id: <200410181102.i9IB29qi048193@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Oct 2004 11:02:10 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/03/05] bin/25542 standards /bin/sh: null char in quoted string p [2002/02/25] standards/35307standards standard include files are not standard c o [2002/12/13] kern/46239 standards posix semaphore implementation errors o [2003/04/21] standards/51209standards [PATCH] add a64l()/l64a/l64a_r functions p [2003/06/05] standards/52972standards /bin/sh arithmetic not POSIX compliant o [2003/06/18] kern/53447 standards poll(2) semantics differ from susV3/POSIX o [2003/07/12] standards/54410standards one-true-awk not POSIX compliant (no exte o [2003/09/15] standards/56906standards Several math(3) functions fail to set err o [2004/01/01] standards/60772standards _Bool and bool should be unsigned o [2004/09/22] standards/72006standards floating point formating in non-C locales 10 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- f [1995/01/11] kern/105 standards Distributed libm (msun) has non-standard o [2000/09/24] bin/21519 standards sys/dir.h should be deprecated some more o [2001/01/16] bin/24390 standards Replacing old dir-symlinks when using /bi s [2001/01/24] standards/24590standards timezone function not compatible witn Sin s [2001/06/18] kern/28260 standards UIO_MAXIOV needs to be made public p [2001/11/20] standards/32126standards getopt(3) not Unix-98 conformant o [2002/02/27] misc/35381 standards incorrect floating-point display of large s [2002/03/19] standards/36076standards Implementation of POSIX fuser command o [2002/06/14] standards/39256standards [v]snprintf aren't POSIX-conformant for s o [2002/07/09] kern/40378 standards stdlib.h gives needless warnings with -an p [2002/08/12] standards/41576standards POSIX compliance of ln(1) o [2002/10/23] standards/44425standards getcwd() succeeds even if current dir has o [2002/12/09] standards/46119standards Priority problems for SCHED_OTHER using p o [2002/12/23] standards/46504standards Warnings in headers o [2003/06/22] standards/53613standards FreeBSD doesn't define EPROTO o [2003/07/24] standards/54809standards pcvt deficits o [2003/07/25] standards/54833standards more pcvt deficits o [2003/07/25] standards/54839standards pcvt deficits o [2003/07/31] standards/55112standards glob.h, glob_t's gl_pathc should be "size o [2003/09/05] standards/56476standards cd9660 unicode support simple hack o [2003/10/29] standards/58676standards grantpt(3) alters storage used by ptsname p [2003/12/26] standards/60597standards FreeBSD's /usr/include lacks of cpio.h s [2004/02/14] standards/62858standards malloc(0) not C99 compliant p [2004/02/21] standards/63173standards Patch to add getopt_long_only(3) to libc o [2004/03/29] kern/64875 standards [patch] add a system call: fdatasync() o [2004/05/07] standards/66357standards make POSIX conformance problem ('sh -e' & o [2004/05/11] standards/66531standards _gettemp uses a far smaller set of filena o [2004/08/22] standards/70813standards [PATCH] ls not Posix compliant o [2004/08/26] docs/70985 standards [patch] sh(1): incomplete documentation o o [2004/09/25] standards/72076standards [patch] German locales use old %d.%m.%y d o [2004/10/06] standards/72394standards [PATCH] syslog is not thread-safe 31 problems total. From owner-freebsd-standards@FreeBSD.ORG Wed Oct 20 23:29:39 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 903D216A4CE; Wed, 20 Oct 2004 23:29:39 +0000 (GMT) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.1/8.13.1) with ESMTP id i9KNTdkf048455; Wed, 20 Oct 2004 19:29:39 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.1/8.13.1/Submit) id i9KNTcen048454; Wed, 20 Oct 2004 19:29:38 -0400 (EDT) (envelope-from green) Date: Wed, 20 Oct 2004 19:29:38 -0400 From: Brian Fundakowski Feldman To: threads@FreeBSD.org, standards@FreeBSD.org Message-ID: <20041020232938.GJ1072@green.homeunix.org> References: <200410202322.i9KNMuE3092472@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410202322.i9KNMuE3092472@repoman.freebsd.org> User-Agent: Mutt/1.5.6i Subject: Re: cvs commit: ports/java/jdk14 Makefile ports/java/jdk14/files patch-vm::os_bsd.hpp X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2004 23:29:40 -0000 On Wed, Oct 20, 2004 at 11:22:56PM +0000, Brian Feldman wrote: > green 2004-10-20 23:22:56 UTC > > FreeBSD ports repository > > Modified files: > java/jdk14 Makefile > Added files: > java/jdk14/files patch-vm::os_bsd.hpp > Log: > The BSD patchset for the Sun JDK modeled its thread behavior mostly after > existing the Solaris base, and similarly to what happened with NSPR, made > a bad assumption on undefined behavior. This broke locking in various > places in Java, for example, causing the the debugging support to be > totally broken. It is worth someone who knows the Java codebase taking > a look to see what other things could have been broken by this on > FreeBSD 5.x+. > > The assumption is that pthread_mutex_trylock(3) on a default-type > mutex will fail with EBUSY. This assumption is wrong for our > libpthread, which returns EDEADLK if the owner thread is trying to > acquire the mutex again with trylock. The behavior of performing a > locking operation on a self-locked default-type mutex is explicitly > undefined for pthread_mutex_lock(3). > > The POSIX specification is still not very clear. It defines > pthread_mutex_trylock(3) in terms of pthread_mutex_lock(3) yet > does not say what the defined behavior should be for a self-locked > pthread_mutex_trylock(3) for any of the various mutex types, so it is > ambiguous whether the result is clearly undefined or clearly to return > EBUSY. > > It is a one line change whether or not to make libpthread return > EDEADLK in this case, where it seems that most implementations do not. > > Reference: http://www.opengroup.org/onlinepubs/009695399/functions/pthread_mutex_lock.html > > Revision Changes Path > 1.81 +1 -1 ports/java/jdk14/Makefile > 1.1 +13 -0 ports/java/jdk14/files/patch-vm::os_bsd.hpp (new) It would be reeeeeeally nice if we could decide whether to change this behavior before 5.3-RELEASE, since it's a single-liner and is continually biting people. My opinion is that POSIX "wants" you to return EBUSY if you're going to do any error checking at all in pthread_mutex_trylock(3). -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\