From owner-freebsd-standards@FreeBSD.ORG Mon Jan 23 11:02:58 2006 Return-Path: X-Original-To: freebsd-standards@freebsd.org 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 1B1A216A41F for ; Mon, 23 Jan 2006 11:02:58 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FD6743D58 for ; Mon, 23 Jan 2006 11:02:45 +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.4/8.13.4) with ESMTP id k0NB2jFt086421 for ; Mon, 23 Jan 2006 11:02:45 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0NB2iXf086415 for freebsd-standards@freebsd.org; Mon, 23 Jan 2006 11:02:44 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 23 Jan 2006 11:02:44 GMT Message-Id: <200601231102.k0NB2iXf086415@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 Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2006 11:02:58 -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 o [2002/12/13] kern/46239 standards posix semaphore implementation errors o [2003/07/12] standards/54410standards one-true-awk not POSIX compliant (no exte o [2005/06/25] standards/82654standards C99 long double math functions are missin 4 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- 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 s [2002/03/19] standards/36076standards Implementation of POSIX fuser command s [2002/05/07] standards/37843standards manual for pthread_setschedparam(3) is wr o [2002/06/14] standards/39256standards snprintf/vsnprintf aren't POSIX-conforman 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 [2003/07/25] standards/54833standards [pcvt] more pcvt deficits o [2003/07/25] standards/54839standards [pcvt] 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 s [2004/02/14] standards/62858standards malloc(0) not C99 compliant s [2004/03/29] kern/64875 standards [libc] [patch] [feature request] add a sy 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(1) not Posix compliant o [2004/09/22] standards/72006standards floating point formating in non-C locales o [2005/03/20] standards/79055standards Add an IFS regression test for shells o [2005/03/20] standards/79056standards regex(3) regression tests o [2005/03/21] standards/79067standards /bin/sh should be more intelligent about a [2005/04/23] standards/80293standards sysconf() does not support well-defined u o [2005/05/20] standards/81287standards [PATCH]: fingerd(8) might send a line not o [2005/07/21] standards/83845standards [libm] [patch] add log2() and log2f() sup o [2005/08/18] standards/85080standards output of long double subnormals (with pr o [2005/12/24] standards/90871standards ACPI Not Work 29 problems total. From owner-freebsd-standards@FreeBSD.ORG Fri Jan 27 12:51:28 2006 Return-Path: X-Original-To: standards@FreeBSD.org 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 D7CCB16A420 for ; Fri, 27 Jan 2006 12:51:28 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE2F943D48 for ; Fri, 27 Jan 2006 12:51:27 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id k0RCpPXH052686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 27 Jan 2006 15:51:25 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id k0RCpPxh052685 for standards@FreeBSD.org; Fri, 27 Jan 2006 15:51:25 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Resent-From: glebius@FreeBSD.org Resent-Date: Fri, 27 Jan 2006 15:51:24 +0300 Resent-Message-ID: <20060127125124.GT83922@FreeBSD.org> Resent-To: standards@FreeBSD.org Received: from relay.bestcom.ru (relay.bestcom.ru [217.72.144.5]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id k0R9fZ0A049801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 27 Jan 2006 12:41:36 +0300 (MSK) (envelope-from owner-freebsd-arch@freebsd.org) Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by relay.bestcom.ru (8.13.1/8.12.9) with ESMTP id k0R9fSUS030880 for ; Fri, 27 Jan 2006 12:41:34 +0300 (MSK) (envelope-from owner-freebsd-arch@freebsd.org) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 3E0D514BA35 for ; Fri, 27 Jan 2006 09:36:49 +0000 (GMT) (envelope-from owner-freebsd-arch@freebsd.org) Received: by hub.freebsd.org (Postfix) id 91FF916A42B; Fri, 27 Jan 2006 09:36:48 +0000 (GMT) Delivered-To: glebius@freebsd.org Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 7813A16A42A; Fri, 27 Jan 2006 09:36:48 +0000 (GMT) (envelope-from owner-freebsd-arch@freebsd.org) X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13E7916A422; Fri, 27 Jan 2006 09:36:05 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A3DB43D46; Fri, 27 Jan 2006 09:36:04 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id k0R9a2CW049685 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 27 Jan 2006 12:36:03 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id k0R9a2DS049684; Fri, 27 Jan 2006 12:36:02 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 27 Jan 2006 12:36:02 +0300 From: Gleb Smirnoff To: arch@FreeBSD.org Message-ID: <20060127093602.GO83922@cell.sick.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="O8/n5iBOhiUtMkxf" Content-Disposition: inline User-Agent: Mutt/1.5.6i X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-arch@FreeBSD.org Errors-To: owner-freebsd-arch@FreeBSD.org X-Virus-Scanned: ClamAV 0.88/1252/Thu Jan 26 14:03:25 2006 on relay.bestcom.ru X-Virus-Status: Clean X-Spam-Status: hits=0.1 autolearn=ham X-Spam-Checker-Version: RBSpam 1.2.1 (relay.bestcom.ru) Cc: alfred@FreeBSD.org Subject: fix return code for pipe(2) syscall X-BeenThere: freebsd-standards@freebsd.org List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2006 12:51:29 -0000 --O8/n5iBOhiUtMkxf Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Colleagues, sometimes pipe(2) can return ENFILE, which has nothing to do with number of open files. It happens when we run out of kva. However, pipe(2) can also return correct ENFILE, when falloc() fails. The only way to distinguish between latter error and the former one is looking into the 'dmesg' output, right after failure. If your dmesg is later overwritten with some other logging, then you will loose this information, and you won't be able to tell why pipe(2) syscall yesterday returned ENFILE - did it hit descriptor limit or kva? Recently I've got some communication with people, who have problems with mpd port. They have experienced ENFILE from pipe(2). They have spent some time tuning descriptor limits and I spent some time trying to help them, until we looked into dmesg, and then into source, to discover alternative meaning of ENFILES. Any objection for the attached change? It should make return ENOMEM in case of kva outage? Yes, according to SUSv3 the only errors from pipe(2) are ENFILE and EMFILE. I think that blindly following standard in this case will lead to confusion (see above). And we already return EFAULT from pipe(2), which is not described in standard. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE --O8/n5iBOhiUtMkxf Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="sys_pipe.c.diff" Index: sys_pipe.c =================================================================== RCS file: /home/ncvs/src/sys/kern/sys_pipe.c,v retrieving revision 1.185 diff -u -r1.185 sys_pipe.c --- sys_pipe.c 16 Dec 2005 18:32:39 -0000 1.185 +++ sys_pipe.c 27 Jan 2006 09:15:56 -0000 @@ -357,10 +357,11 @@ NULL); /* Only the forward direction pipe is backed by default */ - if (pipe_create(rpipe, 1) || pipe_create(wpipe, 0)) { + if ((error = pipe_create(rpipe, 1)) != 0 || + (error = pipe_create(wpipe, 0)) != 0) { pipeclose(rpipe); pipeclose(wpipe); - return (ENFILE); + return (error); } rpipe->pipe_state |= PIPE_DIRECTOK; --O8/n5iBOhiUtMkxf Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ freebsd-arch@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" --O8/n5iBOhiUtMkxf--