From owner-freebsd-net@FreeBSD.ORG Sat May 17 09:20:03 2008 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA6951065676 for ; Sat, 17 May 2008 09:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A88F48FC19 for ; Sat, 17 May 2008 09:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m4H9K3RQ081330 for ; Sat, 17 May 2008 09:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m4H9K39h081328; Sat, 17 May 2008 09:20:03 GMT (envelope-from gnats) Date: Sat, 17 May 2008 09:20:03 GMT Message-Id: <200805170920.m4H9K39h081328@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Alexander Motin Cc: Subject: Re: kern/123741: [netgraph] [panic] kernel panic due to netgraph mpd X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Motin List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2008 09:20:03 -0000 The following reply was made to PR kern/123741; it has been noted by GNATS. From: Alexander Motin To: bug-followup@FreeBSD.org, mimielliot@gmail.com Cc: Subject: Re: kern/123741: [netgraph] [panic] kernel panic due to netgraph mpd Date: Sat, 17 May 2008 11:15:52 +0300 This is a multi-part message in MIME format. --------------070906020506060104050902 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit It looks like crash due to unchecked netgraph data items exhaustion. Attached patch should fix this crash, but problem may remain in some other symptoms. It would be good to investigate the reason of this exhaustion. It could be or just high netgraph load or some resource leak. -- Alexander Motin --------------070906020506060104050902 Content-Type: text/plain; name="ng_socket.c.enomem.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ng_socket.c.enomem.patch" --- ng_socket.c.prev 2008-03-11 23:58:48.000000000 +0200 +++ ng_socket.c 2008-05-17 10:36:46.000000000 +0300 @@ -732,7 +732,8 @@ ng_connect_data(struct sockaddr *nam, st sap = (struct sockaddr_ng *) nam; /* The item will hold the node reference. */ - item = ng_package_data(NULL, NG_WAITOK); + if ((item = ng_package_data(NULL, NG_WAITOK)) == NULL) + return (ENOMEM); if ((error = ng_address_path(NULL, item, sap->sg_data, 0))) return (error); /* item is freed on failure */ --------------070906020506060104050902--