Bug 244866

Summary: memory leak in hald-addon-hid-ups (again)
Product: [Fedora] Fedora Reporter: Ulrich Drepper <drepper>
Component: halAssignee: David Zeuthen <davidz>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 8CC: james, mclasen, poelstra, robin.laing, triage
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: 2009-01-09 07:08:33 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:

Description Ulrich Drepper 2007-06-19 15:41:28 UTC
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 19:23:19 UTC
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 19:56:42 UTC
(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 20:32:07 UTC
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 18:45:49 UTC
A fix would be nice. Just found a "hald-addon-hid-ups" using 490 MB.. 



Comment 5 tung.nguyen 2008-03-14 15:30:22 UTC
The latest on Fedora 8, hal-0.5.10-1.fc8.2, still has a small leak.

Comment 6 Bug Zapper 2008-05-14 13:11:48 UTC
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 14:13:31 UTC
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 17:34:18 UTC
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 22:07:28 UTC
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 07:21:06 UTC
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 07:08:33 UTC
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.