From eugen@grosbein.pp.ru  Sat Feb 11 20:33:28 2012
Return-Path: <eugen@grosbein.pp.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 09ACC1065672
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 11 Feb 2012 20:33:28 +0000 (UTC)
	(envelope-from eugen@grosbein.pp.ru)
Received: from grosbein.pp.ru (grosbein.pp.ru [89.189.172.146])
	by mx1.freebsd.org (Postfix) with ESMTP id 5EB1F8FC0A
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 11 Feb 2012 20:33:26 +0000 (UTC)
Received: from grosbein.pp.ru (localhost [127.0.0.1])
	by grosbein.pp.ru (8.14.5/8.14.5) with ESMTP id q1BJ5FCP003099
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 12 Feb 2012 02:05:15 +0700 (NOVT)
	(envelope-from eugen@grosbein.pp.ru)
Received: (from eugen@localhost)
	by grosbein.pp.ru (8.14.5/8.14.5/Submit) id q1BJ5F37003098;
	Sun, 12 Feb 2012 02:05:15 +0700 (NOVT)
	(envelope-from eugen)
Message-Id: <201202111905.q1BJ5F37003098@grosbein.pp.ru>
Date: Sun, 12 Feb 2012 02:05:15 +0700 (NOVT)
From: Eugene Grosbein <eugen@grosbein.net>
Reply-To: Eugene Grosbein <eugen@grosbein.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] icecast-2.3.2 may leak memory and take extra CPU time
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         165003
>Category:       ports
>Synopsis:       [patch] audio/icecast2 2.3.2 may leak memory and take extra CPU time
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sunpoet
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 11 20:40:08 UTC 2012
>Closed-Date:    Fri Apr 27 11:09:50 UTC 2012
>Last-Modified:  Fri Apr 27 11:10:10 UTC 2012
>Originator:     Eugene Grosbein
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
RDTC JSC
>Environment:
System: FreeBSD grosbein.pp.ru 8.2-STABLE FreeBSD 8.2-STABLE #14: Mon Jan 16 21:33:53 NOVT 2012 root@grosbein.pp.ru:/usr/local/obj/usr/local/src/sys/DADV amd64

>Description:

	icecast2-2.3.2_7,1 built from ports tree may leak memory.
	When it leaks, its size grows and CPU time grows enormously too.
	After it reaches 2Gb for i386 system, it is killed with a signal.

>How-To-Repeat:

	Run busy icecast2 server.

>Fix:

	The following 2 years old patch was taken from
http://old.nabble.com/Memory-leak-on-Icecast-2.3.2---Debian---td26691536.html

	It eliminates the problem fixing memory leak.

--- src/stats.c.orig	2012-02-11 22:28:24.000000000 +0400
+++ src/stats.c	2012-02-11 22:29:17.000000000 +0400
@@ -973,7 +973,11 @@
                 if (event->source)
                 {
                     if (show_mount && strcmp (event->source, show_mount) != 0)
+            	      {
+            	        xmlFree (value);
+            	        xmlFree (name);
                         break;
+                      }
                     srcnode = _find_xml_node(event->source, &src_nodes, node);
                 }
                 else
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sunpoet 
Responsible-Changed-By: arved 
Responsible-Changed-When: Mon Feb 27 13:55:08 UTC 2012 
Responsible-Changed-Why:  
This is actually about icecast2, over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165003 

From: Eugene Grosbein <egrosbein@rdtc.ru>
To: bug-followup@FreeBSD.ORG
Cc:  
Subject: Re: ports/165003: [patch] audio/icecast2 2.3.2 may leak memory and
 take extra CPU time
Date: Mon, 23 Apr 2012 21:40:28 +0700

 Hi!
 
 Maintainer timeout has occured long time ago for this PR.
 Please commit the patch, it works just fine for our pretty busy icecast2 servers,
 about 2Gbit/s of generated traffic, in production.
 
 Eugene Grosbein
State-Changed-From-To: open->closed 
State-Changed-By: sunpoet 
State-Changed-When: Fri Apr 27 11:09:48 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=165003 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/165003: commit references a PR
Date: Fri, 27 Apr 2012 11:09:48 +0000 (UTC)

 sunpoet     2012-04-27 11:09:33 UTC
 
   FreeBSD ports repository
 
   Modified files:
     audio/icecast2       Makefile 
   Added files:
     audio/icecast2/files patch-src-stats.c 
   Log:
   - Fix memory leak
   - Bump PORTREVISION for package change
   
   PR:             ports/165003
   Submitted by:   Eugene Grosbein <eugen@grosbein.net>
   Obtained from:  http://old.nabble.com/Memory-leak-on-Icecast-2.3.2---Debian---td26691536.html
   
   Revision  Changes    Path
   1.71      +1 -1      ports/audio/icecast2/Makefile
   1.1       +14 -0     ports/audio/icecast2/files/patch-src-stats.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
