Ticket #1263 (closed defect: fixed)

Opened 11 years ago

Last modified 2 years ago

hald memory leak

Reported by: mail@… Owned by: mickey
Priority: high Milestone:
Component: Distro Version: current svn head
Severity: normal Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:


When I leave my system running for a while, I see the memory usage of 'hald'
climbing. Currently from 'top':


1013 haldaemo 15 0 18680 16m 1372 S 0.0 13.0 0:02.52 hald

root@fic-gta01:~# uptime

21:06:40 up 15:55, 2 users, load average: 0.03, 0.03, 0.00

however in the past I have seen its virtual memory usage over 60MB.

Package version is: hal - 0.5.9-r5 - Hardware Abstraction Layer

My system is slightly non-standard - I have my root on the sd card, and for
several months I have updated it with 'ipkg upgrade' from my locally-built tree
(MokoMakefile?, monotone.openembedded.org, autorev) rather than doing a clean
re-install. I would appreciate it if someone with a 'clean' system could check
to see if they see the same hald behaviour after the system has been running for
a few days.

Change History

comment:1 Changed 11 years ago by reddog@…

Also not a complete standard install, and maybe some days old:

dropbear invoked oom-killer: gfp_mask=0x1201d2, order=0, oomkilladj=0
[<c002dbec>] (dump_stack+0x0/0x14) from [<c0073d78>] (oom_kill_process+0x58/0xec)
[<c0073d20>] (oom_kill_process+0x0/0xec) from [<c00742b4>]

r7:000001c5 r6:c7d120c0 r5:c0363038 r4:c680d3e0

[<c00740fc>] (out_of_memory+0x0/0x218) from [<c00766ac>] (alloc_pages+0x26c/0x2f0)
[<c0076440>] (alloc_pages+0x0/0x2f0) from [<c00789c0>]
[<c00788ac>] (do_page_cache_readahead+0x0/0x268) from [<c0078ff8>]
[<c0078f88>] (do_page_cache_readahead+0x0/0x80) from [<c0073128>]

r7:c767dac0 r6:c69a4000 r5:00000000 r4:00000000

[<c0072f54>] (filemap_fault+0x0/0x454) from [<c007eafc>] (do_fault+0x74/0x42c)
[<c007ea88>] (do_fault+0x0/0x42c) from [<c007fcb0>] (handle_mm_fault+0x304/0x728)
[<c007f9ac>] (handle_mm_fault+0x0/0x728) from [<c00300b4>]
[<c002ffb4>] (do_page_fault+0x0/0x23c) from [<c00302a4>]
[<c0030284>] (do_translation_fault+0x0/0x80) from [<c00281ec>]

r5:be88a9b8 r4:ffffffff

[<c00281d4>] (do_PrefetchAbort+0x0/0x1c) from [<c0028ec0>]
Exception stack(0xc69a5fb0 to 0xc69a5ff8)
5fa0: 00000000 be88a92c be88a8ac 00000000
5fc0: be88a9ac be88a9b8 00000000 be88a92c be88a8ac 00000001 00000004 00000001
5fe0: be88a92c be88a8a0 00010434 00010434 00000010 ffffffff
DMA per-cpu:
CPU 0: Hot: hi: 42, btch: 7 usd: 38 Cold: hi: 14, btch: 3 usd: 13
Active:28622 inactive:148 dirty:0 writeback:0 unstable:0

free:404 slab:1086 mapped:0 pagetables:151 bounce:0

DMA free:1616kB min:1440kB low:1800kB high:2160kB active:114488kB inactive:592kB
present:130048kB pages_scanned:211264 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0
DMA: 30*4kB 7*8kB 2*16kB 0*32kB 0*64kB 1*128kB 1*256kB 0*512kB 1*1024kB 0*2048kB
0*4096kB = 1616kB
Swap cache: add 0, delete 0, find 0/0, race 0+0
Free swap = 0kB
Total swap = 0kB
Free swap: 0kB
32768 pages of RAM
585 free pages
1631 reserved pages
1086 slab pages
123 pages shared
0 pages swap cached
Out of memory: kill process 1093 (hald) score 453 or a child
Killed process 1094 (hald-runner)

comment:2 Changed 11 years ago by roh

  • Owner changed from mickey@… to mickeyl

comment:3 Changed 11 years ago by sillern

I have a clean 2008.8 image, with some opkg update/upgrade from zeckes stuff, and I'm experiencing this issue.

hald is occupying 48.1% of the memory according to "top".

What can I do to debug this issue and give more info?

comment:4 Changed 11 years ago by zecke

Use something like exmap to take a look at the memory usage. Maybe even break in malloc and see what it is doing.

Assumption: Due the LED triggers we can fire a lot of uevents and parse the battery data a lot. I would start looking there... or even patch the kernel to change battery signal changed bits...

Also look which version of hald we have and then take a look at the changelog to see if a leak was fixed upstream.

comment:5 Changed 11 years ago by zecke

I just git-cloned hal and there are a couple of leak fixes done in 2008. We should attempt a hald upgrade.

comment:7 Changed 11 years ago by zecke

And the result of search for leak in git-log since the release of 0.5.9


string handling in C is... :)

comment:8 Changed 11 years ago by zecke

  • Status changed from new to in_testing

Okay, I have put hald 0.5.11 into org.openmoko.asu.dev and org.openmoko.asu.testing. connmand is still able to find our network device, no other regression testing was done.

comment:9 Changed 11 years ago by roh

  • Owner changed from mickeyl to mickey

comment:10 Changed 11 years ago by graeme

These changes are in OM.dev branch now!

comment:11 Changed 11 years ago by zecke

  • Component changed from Applications & Dependencies to Distro

comment:12 Changed 11 years ago by zecke

  • Status changed from in_testing to closed
  • Resolution set to fixed

Consider that as resolved.

comment:13 Changed 2 years ago by Chassmetly

Buy Soloxine No Rx Needed <a href=http://cial1.xyz/map.php>Buying Cialis Online</a> Propecia Afectivo For Sale Finasteride <a href=http://viag1.xyz/cheap-viagra-pill.php>Cheap Viagra Pill</a> Cytotec 200mcg Remarkit <a href=http://kama1.xyz/buy-kamagra-gel.php>Buy Kamagra Gel</a> Kamagra 100mg Test Viagra Cialis Y Levitra <a href=http://cial5mg.xyz/cialis-usa.php>Cialis Usa</a> Belize Drug Stores Cialis Brand Name Usa Price <a href=http://cial5mg.xyz/cialis-40mg.php>Cialis 40mg</a> Buy Propecia Pills Macrobid Best Website <a href=http://kama1.xyz/buy-generic-kamagra-online.php>Buy Generic Kamagra Online</a> Le Viagra En Ligne Generic For Cephalexin <a href=http://zol1.xyz/zoloft-generic-name.php>Zoloft Generic Name</a> Best National Pharmacy Canadian Pharmacy In Florida <a href=http://viag1.xyz/viagra-price.php>Viagra Price</a> Cephalexin And Journal Propecia Finasteride 1mg <a href=http://zol1.xyz/zoloft-pills.php>Zoloft Pills</a> Propecia Valoracion Usato Levitra 10 Mg <a href=http://viag1.xyz/buy-cheap-viagra-200mg.php>Buy Cheap Viagra 200mg</a> Canadian Pharmacy Brand Viagra Propecia Generico En Espana <a href=http://zoloft.ccrpdc.com/buy-zoloft-online.php>Buy Zoloft Online</a> Online Acticin Buy Now Levitra Avis Doctissimo <a href=http://cial5mg.xyz/cialis-pills.php>Cialis Pills</a> Cialis Precio En Farmacia Pilule Viagra Acheter <a href=http://nolvadex.ccrpdc.com/buy-nolvadex-cheap.php>Buy Nolvadex Cheap</a> Riesgos De Propecia Propecia Finasteride Generic <a href=http://zol1.xyz/generic-zoloft-cheapest.php>Generic Zoloft Cheapest</a> Propecia For Sale Without Prescription Propecia Finasteride Dosage <a href=http://strattera.ccrpdc.com/order-strattera-online.php>Order Strattera Online</a> Canada Meds No Perscriptions Ed Pills Comparison <a href=http://kama1.xyz/buy-cheap-kamagra-site.php>Buy Cheap Kamagra Site</a> Cheap Canadian Meds Amoxicillin Causes Diarrhea <a href=http://cial1.xyz/purchase-cheap-cialis.php>Purchase Cheap Cialis</a> Xenical Orlistat 120 Mg Prix Cialis Authentique Prix <a href=http://cial5mg.xyz/how-to-buy-cialis.php>How To Buy Cialis</a> Medicament Viagra Cialis Indicazioni <a href=http://viag1.xyz/generic-viagra-100mg.php>Generic Viagra 100mg</a> Levitra Medicament Belgique Macrobid No Prior Script <a href=http://zol1.xyz/map.php>Zoloft Online Usa</a> Risiken Bei Levitra Isotretinoin amnesteem skin health medicine on line <a href=http://cial1.xyz/cialis-online-buy.php>Cialis Online Buy</a> Photo Propecia Finasteride Nolvadex Posologie <a href=http://kama1.xyz/buy-kamagra-oral-jelly.php>Buy Kamagra Oral Jelly</a> Viagra Pріт‘ Nett I Sverige Keflex Ginko <a href=http://zol1.xyz/generic-for-zoloft.php>Generic For Zoloft</a> 20mg Cialis Dosage Viagra Bilbao <a href=http://cial1.xyz/tadalafil-tablets.php>Tadalafil Tablets</a> Pharmacies That Ship To The Us Amoxicillin 875 <a href=http://cial5mg.xyz/buy-cialis-online.php>Buy Cialis Online</a> Amoxicillin Outdated 247 Drug Shop <a href=http://kama1.xyz/order-cheap-kamagra.php>Order Cheap Kamagra</a> Non Commander Baclofen <a href=http://cial1.xyz/buy-cialis-cheap.php>Buy Cialis Cheap</a> Get Zentel Buy Ventolin On Line <a href=http://cial1.xyz/cialis-cheap.php>Cialis Cheap</a> Precio Cialis 5 Mg En Farmacia Cytotec 200 Microgrammes Comprime Secable <a href=http://kama1.xyz/kamagra-online-pharmacy.php>Kamagra Online Pharmacy</a> Amoxicillin Yeast Infections Zithromax And Birth Control <a href=http://viag1.xyz/viagra-pill.php>Viagra Pill</a> Cialis Uso Diario Viagra Zoll <a href=http://clomid.ccrpdc.com/by-cheap-clomiphene.php>By Cheap Clomiphene</a> Comments Buy Lasix Without Prescription Best Prices For 60mg. Orlistat <a href=http://cial5mg.xyz/cialis-online-prices.php>Cialis Online Prices</a> Cialis Diabetes Cialis Originale Prezzo In Farmacia <a href=http://cial1.xyz/cialis-online-usa.php>Cialis Online Usa</a> Buy Citalaprom Online No Prescription

Note: See TracTickets for help on using tickets.