Bug 207006

Summary: jasper: Memory Leak
Product: [Fedora] Fedora Reporter: Derek Atkins <warlord>
Component: jasperAssignee: Rex Dieter <rdieter>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 5CC: extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-18 20:20:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to fix memory leak none

Description Derek Atkins 2006-09-18 18:50:20 UTC
Description of problem:

there's a significant memory leak in the jasper library.

Version-Release number of selected component (if applicable):

jasper-1.701.0-12.fc5

How reproducible:

100%

Steps to Reproduce:
1. Run an application that uses the jasper library
2. See the size of the application continue to increase over time
3. Check google and see that the mem-leak patches haven't been applied.
  
Actual results:

My application (gyachi in this case) keeps increasing in size when I
send/receive webcam streams.  If it's just sitting there doing nothing then it
doesn't do anything.

Expected results:

Application memory use should stabilize, not constantantly increase.

Additional info:

See the attached patch for the correction.

Comment 1 Derek Atkins 2006-09-18 18:50:20 UTC
Created attachment 136569 [details]
Patch to fix memory leak

Comment 2 Rex Dieter 2006-09-18 19:04:48 UTC
This bit of the patch doesn't seem related to a memory leak:
-	tmpnam(obj->pathname);
+	mkstemp(obj->pathname);
(though it's probably better security-wise)

This looks more relevant:
...
+	jas_matrix_destroy(src_mgr->data);

> 3. Check google and see that the mem-leak patches haven't been applied.

Please, specific references (I can't find anything immediately searching on
"jasper memory leak" or "jasper mem-leak patches"

Comment 3 Derek Atkins 2006-09-18 19:08:07 UTC
Two references to the memory leak:

http://ayttm.sourceforge.net/files.shtml   (where I got the patch)
http://gyachi.sourceforge.net/download.shtml  (page down to JasPer)

Unfortunately the SRPM link on the second page doesn't work anymore so I
couldn't pull that patch.

Comment 4 Rex Dieter 2006-09-18 20:16:05 UTC
Reported upstream:
http://tech.groups.yahoo.com/group/jasper-discussion/message/1466

Comment 5 Rex Dieter 2006-09-18 20:20:36 UTC
%changelog
* Mon Sep 18 2006 Rex Dieter <rexdieter[AT]users.sf.net> 1.701.0-14
- memory leak (#207006)

build only for devel/fc6 branch, for now.  Pending peer/upstream review of
patch, patched builds will be issued for all other branches.