From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Oct 18 15:00:01 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 655D72B4 for ; Thu, 18 Oct 2012 15:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id 3AC928FC0A for ; Thu, 18 Oct 2012 15:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9IF01oT077413 for ; Thu, 18 Oct 2012 15:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9IF01Hn077406; Thu, 18 Oct 2012 15:00:01 GMT (envelope-from gnats) Resent-Date: Thu, 18 Oct 2012 15:00:01 GMT Resent-Message-Id: <201210181500.q9IF01Hn077406@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Loic Pefferkorn Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6020297 for ; Thu, 18 Oct 2012 14:58:53 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id B8E328FC08 for ; Thu, 18 Oct 2012 14:58:53 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9IEwrsa004966 for ; Thu, 18 Oct 2012 14:58:53 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q9IEwrcG004965; Thu, 18 Oct 2012 14:58:53 GMT (envelope-from nobody) Message-Id: <201210181458.q9IEwrcG004965@red.freebsd.org> Date: Thu, 18 Oct 2012 14:58:53 GMT From: Loic Pefferkorn To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/172856: [patch] security/munge: munged is uninterruptible and consumes cpu X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 15:00:01 -0000 >Number: 172856 >Category: ports >Synopsis: [patch] security/munge: munged is uninterruptible and consumes cpu >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Oct 18 15:00:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Loic Pefferkorn >Release: 8.2 >Organization: >Environment: FreeBSD bsd9-current 9.0-BETA2 FreeBSD 9.0-BETA2 #2 r223142M: Tue Aug 30 12:02:39 CEST 2011 root@bsd9-current:/usr/obj/usr/src/sys/lpn amd64 >Description: Bug already known upstream: http://code.google.com/p/munge/issues/detail?id=18 "munged should consume negligible cpu when idle, and gracefully terminate upon receipt of a SIGTERM. Instead, munged consumes an entire cpu and must be forcibly terminated with a SIGKILL." Patch below is the upstream patch to fix this issue, and a least if works for me. Regards, Loic >How-To-Repeat: # /usr/local/bin/sudo -u daemon /usr/local/sbin/munged -F --key-file=/usr/local/etc/munge/munge.key Process is then uninterruptible and cannot be killed with SIGKILL. >Fix: Applying upstream patch. Patch attached with submission follows: diff -ruN munge.orig/Makefile munge/Makefile --- munge.orig/Makefile 2012-10-18 16:39:17.000000000 +0200 +++ munge/Makefile 2012-10-18 16:41:12.000000000 +0200 @@ -7,6 +7,7 @@ PORTNAME= munge PORTVERSION= 0.5.10 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= GOOGLE_CODE diff -ruN munge.orig/files/patch-src-munged-xgetgrent.c munge/files/patch-src-munged-xgetgrent.c --- munge.orig/files/patch-src-munged-xgetgrent.c 1970-01-01 01:00:00.000000000 +0100 +++ munge/files/patch-src-munged-xgetgrent.c 2012-10-18 16:43:51.000000000 +0200 @@ -0,0 +1,11 @@ +--- src/munged/xgetgrent.c.orig 2012-10-18 16:42:46.000000000 +0200 ++++ src/munged/xgetgrent.c 2012-10-18 16:43:17.000000000 +0200 +@@ -194,7 +194,7 @@ + + #if HAVE_GETGRENT_R_GNU + rv = getgrent_r (gr, buf, buflen, &gr_ptr); +- if (rv == ENOENT) { ++ if (((rv == ENOENT) || (rv == 0)) && (gr_ptr == NULL)) { + got_eof = 1; + } + else if (rv != 0) { >Release-Note: >Audit-Trail: >Unformatted: