Bug 214204

Summary: hald-addon-hid-ups probably leaks memory big time
Product: [Fedora] Fedora Reporter: Ulrich Drepper <drepper>
Component: halAssignee: David Zeuthen <davidz>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: mclasen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.5.8.1-6.fc6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-02-13 20:30:55 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:
Bug Depends On:    
Bug Blocks: 214211    

Description Ulrich Drepper 2006-11-06 15:33:32 UTC
Description of problem:
After a bit more than one week uptime the hald-addon-hid-ups process has 48M of
RSS.  47M are the heap:

00605000-03323000 rw-p 00605000 00:00 0                                  [heap]

This got to be a memory leak.  Otherwise the whole think needs to be rewritten.
 We cannot have this code in RHEL5, it would mean no machine would survive more
than a couple of weeks without rebooting.



Version-Release number of selected component (if applicable):
hal-0.5.8.1-4.fc6.x86_64

How reproducible:
well...

Steps to Reproduce:
1.and machine including hal
2.wait a week
3.
  
Actual results:
40+M heap

Expected results:
tiny heap corresponding to the minute bits of work this program does

Additional info:

Comment 1 David Zeuthen 2006-11-06 16:17:03 UTC
This is certainly a bug. I'll investigate it.

Comment 3 David Zeuthen 2006-12-12 21:08:31 UTC
Pretty sure I found the leak; please test RPMS / SRPMS here

 http://people.freedesktop.org/~david/halleak1/

Thanks!

Comment 4 David Zeuthen 2006-12-12 22:58:05 UTC
Here's a new set of RPM's to test please

 http://people.freedesktop.org/~david/halleak2/

It's weird; I don't see the leak unless I plug out the UPS resulting in hal
properties updates. Do you get any output from 'lshal --monitor' even when the
UPS is fully charged? Thanks.

Comment 5 Ulrich Drepper 2006-12-12 23:15:26 UTC
To document this here as well:

With the patch from comment #3 we're still leaking, but less (2k/min).  The UPS
reports changing maximum load


Start monitoring devicelist:
-------------------------------------------------
usb_device_51d_2_AS0533110240_if0_hiddev property battery.remaining_time = 1800
(0x708)
usb_device_51d_2_AS0533110240_if0_hiddev property battery.remaining_time = 1740
(0x6cc)
usb_device_51d_2_AS0533110240_if0_hiddev property battery.remaining_time = 1800
(0x708)
usb_device_51d_2_AS0533110240_if0_hiddev property battery.remaining_time = 1740
(0x6cc)


This is most likely the trigger of the problem.

Comment 6 David Zeuthen 2006-12-13 21:35:47 UTC
OK, here we go again

 http://people.freedesktop.org/~david/halleak3/

This fixes all the leaks for me. Please try it out, hopefully it's right this
time. Thanks!

Comment 7 Ulrich Drepper 2006-12-13 22:51:25 UTC
Testing the version from comment #6 shows no more leaks.

Comment 8 David Zeuthen 2006-12-13 22:55:29 UTC
Fixed in hal-0.5.8.1-6.fc6. Pushing this to FC6 updates.

Comment 9 Fedora Update System 2006-12-18 22:49:10 UTC
hal-0.5.8.1-6.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 10 Fedora Update System 2007-01-02 19:31:07 UTC
hal-0.5.8.1-6.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 11 Ulrich Drepper 2007-02-13 20:30:55 UTC
Seems indeed to be fixed.