Bug 244866 - memory leak in hald-addon-hid-ups (again)
memory leak in hald-addon-hid-ups (again)
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: David Zeuthen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-19 11:41 EDT by Ulrich Drepper
Modified: 2013-03-05 22:51 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-09 02:08:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ulrich Drepper 2007-06-19 11:41:28 EDT
Description of problem:
I reported a similar (or the same?) problem before.  At that time it was fixed
as far as I could see but now hald-addon-hid-ups is leaking memory again.  Here
are the diffs of the /proc/PIC/smaps output for 7 minutes of time:

@@ -14,11 +14,11 @@
-Rss:              97860 kB
+Rss:              97868 kB
 Shared_Clean:         0 kB
 Shared_Dirty:         0 kB
 Private_Clean:        0 kB
-Private_Dirty:    97860 kB
+Private_Dirty:    97868 kB

... one minute later ...

-Rss:              97868 kB
+Rss:              97880 kB
 Shared_Clean:         0 kB
 Shared_Dirty:         0 kB
 Private_Clean:        0 kB
-Private_Dirty:    97868 kB
+Private_Dirty:    97880 kB

... one minute later ...

-Rss:              97880 kB
+Rss:              97888 kB
 Shared_Clean:         0 kB
 Shared_Dirty:         0 kB
 Private_Clean:        0 kB
-Private_Dirty:    97880 kB
+Private_Dirty:    97888 kB

... one minute later ...

-Rss:              97888 kB
+Rss:              97896 kB
 Shared_Clean:         0 kB
 Shared_Dirty:         0 kB
 Private_Clean:        0 kB
-Private_Dirty:    97888 kB
+Private_Dirty:    97896 kB

... one minute later ...

-Rss:              97896 kB
+Rss:              97904 kB
 Shared_Clean:         0 kB
 Shared_Dirty:         0 kB
 Private_Clean:        0 kB
-Private_Dirty:    97896 kB
+Private_Dirty:    97904 kB

... one minute later ...

-Rss:              97904 kB
+Rss:              97908 kB
 Shared_Clean:         0 kB
 Shared_Dirty:         0 kB
 Private_Clean:        0 kB
-Private_Dirty:    97904 kB
+Private_Dirty:    97908 kB


As you can see, within 6 minutes the code is leaking 48k.


Last time the issue was a leak related to messages of unclean power (i.e., the
UPS reported events).  This might still be the case.



Version-Release number of selected component (if applicable):
hal-0.5.9-8.fc7.x86_64

How reproducible:
always

Steps to Reproduce:
1.start hal which finds a UPS
2.
3.
  
Actual results:
see above

Expected results:
no leak, reasonable memory usage < 1M

Additional info:

One interesting bit: the machine is up for 44 days.  I cannot find a reference
to hal being updated or restarted in the logs.  But the total memory consumption
number indicates that with the current leak rate this can only have gone on for
about 9 days.
Comment 1 David Zeuthen 2007-06-21 15:23:19 EDT
Any chance you can try the patch here?

 http://lists.freedesktop.org/archives/hal/2007-June/008835.html

Thanks.
Comment 2 Ulrich Drepper 2007-06-21 15:56:42 EDT
(In reply to comment #1)
> Any chance you can try the patch here?
> 
>  http://lists.freedesktop.org/archives/hal/2007-June/008835.html

It helps to reduce the memory leak from 8kB/minute to 4kB/minute.  But the leak
is not completely stopped.


-Rss:                 32 kB
+Rss:                 36 kB
 Shared_Clean:         0 kB
 Shared_Dirty:         0 kB
 Private_Clean:        0 kB
-Private_Dirty:       32 kB
+Private_Dirty:       36 kB
Comment 3 tung.nguyen 2007-08-15 16:32:07 EDT
I'm wondering when there is a fix for this bug. I sent a patch to David about a
month ago but no response. 
Comment 4 Dennis Schafroth 2007-08-26 14:45:49 EDT
A fix would be nice. Just found a "hald-addon-hid-ups" using 490 MB.. 

Comment 5 tung.nguyen 2008-03-14 11:30:22 EDT
The latest on Fedora 8, hal-0.5.10-1.fc8.2, still has a small leak.
Comment 6 Bug Zapper 2008-05-14 09:11:48 EDT
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Ulrich Drepper 2008-05-14 10:13:31 EDT
Present in F8:

root      3071  0.0  6.7 829872 275016 ?       S    Feb04   0:52
hald-addon-hid-ups: listening on /dev/hiddev0

800M in 100 days.  That's still 8M a day.
Comment 8 Robin 2008-10-27 13:34:18 EDT
I had this bring down my old F7 machine last week and found that it is affecting my F8 machine at work.  15.3% of 8 gig ram over almost 24 days.


I am not using apcupsd but I do have an APC UPS plugged into my work (F8) system.

On my F7 system, I found that it climbed drastically while formatting a 1.5T drive with two partitions.  The percentage of memory used went up and as the percentage of memory went up, SCSI errors started to show up in dmesg.  

I am going to test further and maybe even try to format the drive on my work machine and see what happens.

From the F8 machine.

top - 11:29:17 up 23 days, 20:37,  3 users,  load average: 2.35, 2.65, 2.53
Tasks: 180 total,   4 running, 176 sleeping,   0 stopped,   0 zombie
Cpu(s):  6.2%us,  1.7%sy, 92.0%ni,  0.0%id,  0.0%wa,  0.2%hi,  0.0%si,  0.0%st
Mem:   8200268k total,  8018200k used,   182068k free,   639644k buffers
Swap:  8385888k total,      120k used,  8385768k free,  3844356k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 5041 root      20   0 1265m 1.2g  620 S    0 15.4   4:49.41 hald-addon-hid-
32446 rlaing    20   0 1264m 653m  28m S   13  8.2   1774:26 firefox

Restarting hald works well and dropped the load on the system as well.

I am passing this information onto our IT staff to check our other systems and see if it shows up across all versions we are running.

Note, I did see this on an Ubuntu thread as well so it is an upstream issue.

As the bug can actually bring a machine down, the severity of the problem should be raised.
Comment 9 John Poelstra 2008-10-27 18:07:28 EDT
Any chance this problem has been observed in rawhide?  

Note, all Fedora 8 bugs will be closed EOL one month after GA of F10.... naturally you can change the version for this bug as applicable.
Comment 10 Bug Zapper 2008-11-26 02:21:06 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 11 Bug Zapper 2009-01-09 02:08:33 EST
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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