Bug 214204 - hald-addon-hid-ups probably leaks memory big time
hald-addon-hid-ups probably leaks memory big time
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
:
Depends On:
Blocks: 214211
  Show dependency treegraph
 
Reported: 2006-11-06 10:33 EST by Ulrich Drepper
Modified: 2013-03-05 22:47 EST (History)
1 user (show)

See Also:
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 15:30:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ulrich Drepper 2006-11-06 10:33:32 EST
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 11:17:03 EST
This is certainly a bug. I'll investigate it.
Comment 3 David Zeuthen 2006-12-12 16:08:31 EST
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 17:58:05 EST
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 18:15:26 EST
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 16:35:47 EST
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 17:51:25 EST
Testing the version from comment #6 shows no more leaks.
Comment 8 David Zeuthen 2006-12-13 17:55:29 EST
Fixed in hal-0.5.8.1-6.fc6. Pushing this to FC6 updates.
Comment 9 Fedora Update System 2006-12-18 17:49:10 EST
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 14:31:07 EST
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 15:30:55 EST
Seems indeed to be fixed.

Note You need to log in before you can comment on or make changes to this bug.