With =sys-kernel/gentoo-sources-2.6.34-r1 important memory increase was observed with attached kernel configuration. After few hours, the whole system started to swap. According to atop, no important memory consumption was observed with user processes and closing the processes with biggest RAM consumption did not help significantly. Then I switched to =sys-kernel/gentoo-sources-2.6.34-r11 and enabled several debugging aids in configuration (kmemleak). The kernel behaved in same way and reported several lines to syslog like (during 16 hours, three days from previous reboot): Oct 31 00:02:03 myhost kernel: [67582.792294] kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Oct 31 09:32:48 myhost kernel: [105428.012364] kmemleak: 4 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Oct 31 09:59:13 myhost kernel: [107013.447909] kmemleak: 40 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Oct 31 12:52:37 myhost kernel: [117417.171942] kmemleak: 11 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Oct 31 14:31:35 myhost kernel: [123354.749291] kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Oct 31 15:12:12 myhost kernel: [125792.367558] kmemleak: 20 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Oct 31 15:23:19 myhost kernel: [126459.364451] kmemleak: 3 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Reproducible: Always Steps to Reproduce: 1. Boot 2. Work as usual 3. Check the RAM usage Actual Results: Memory consumption increases continually (not caused by programs, not cached). System started swapping After 15 hours from reboot and quite extensive usge (firefox, thunderbird), I have this from meminfo MemTotal: 2019740 kB MemFree: 122600 kB Buffers: 153684 kB Cached: 378304 kB SwapCached: 96692 kB Active: 897352 kB Inactive: 622380 kB Active(anon): 690260 kB Inactive(anon): 317576 kB Active(file): 207092 kB Inactive(file): 304804 kB Unevictable: 64584 kB Mlocked: 64584 kB SwapTotal: 2048252 kB SwapFree: 1251620 kB Dirty: 216 kB Writeback: 0 kB AnonPages: 998808 kB Mapped: 97288 kB Shmem: 17600 kB Slab: 222784 kB SReclaimable: 64540 kB SUnreclaim: 158244 kB KernelStack: 2816 kB PageTables: 39352 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 3058120 kB Committed_AS: 3352532 kB VmallocTotal: 34359738367 kB VmallocUsed: 113064 kB VmallocChunk: 34359604732 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 1034944 kB DirectMap2M: 1028096 kB Please note nonzero swap size, that (with approximately same way of usage) is not present when I use ubuntu (with dualboot). Also if I close themost memory consuming processes (identified by atop), the swap size stays the same. Expected Results: Not to increase the swap during normal operation. If there was a reason for high memory consumption, decrease the swap occupancy when most memory consuming processes are killed.
Created attachment 252745 [details] My /proc/config.gz
Created attachment 252747 [details] Output of sysctl -a
Created attachment 252749 [details] Output of lsmod
So, what were the contents of /sys/kernel/debug/kmemleak?
Created attachment 253217 [details] /sys/kernel/debug/kmemleak Here is the output.
Greetings, I'm afraid that I can't help you with most of those memory leaks because they are caused by the closed source nvidia module. [1] The following patch should help you with the two memory leaks that appear in the top of /sys/kernel/debug/kmemleak: https://patchwork.kernel.org/patch/246641/ Test it out and we can backport it for you :) You can also find it in >= 2.6.37 kernels. [1]: Basically, the memleaks with nv_acpi_method() in them. I think you can file a bug report to Nvidia regarding them, or just switch to the open source driver.
Bleh, I think I misfired! Reading on this https://bugzilla.kernel.org/show_bug.cgi?id=15807, I think that moving to 2.6.35 is gonna cure your acpi_processor_register_performance() memleaks (the first two in the kmemleak file)
Please test with the latest gentoo-sources-2.6.35 which is r12 right now, and let us know if it helps.
(In reply to comment #8) > Please test with the latest gentoo-sources-2.6.35 which is r12 right now, and > let us know if it helps. > Hello, I had some problems with nvidia modules compilation with 2.6.36. On your advice, I tried 2.6.35-gentoo-r12 which runs fine. I will let it running for two days to see what happens.
That was quick, I have 8 new kernel memleak problems reported, please check the attachment.
Created attachment 254247 [details] /sys/kernel/debug/kmemleak with kernel 2.6.35-gentoo-r12
So, any ideas? Should I test it against vanilla or try another sources version? I mean will that help somehow gentoo/kernel team?
(In reply to comment #12) > So, any ideas? Should I test it against vanilla or try another sources version? > I mean will that help somehow gentoo/kernel team? > Yo! I'd like you to try the latest vanilla mailine release (2.6.37-rc2). If that doesn't work you'll have to report this upstream, but I'm optimistic.
Created attachment 254615 [details] another /sys/kernel/debug/kmemleak with kernel 2.6.35-gentoo-r12 Another memleak output (just for illustration).
In reply to comment #13) > (In reply to comment #12) > > So, any ideas? Should I test it against vanilla or try another sources version? > > I mean will that help somehow gentoo/kernel team? > > > > Yo! > I'd like you to try the latest vanilla mailine release (2.6.37-rc2). > If that doesn't work you'll have to report this upstream, but I'm optimistic. > Okay, going on with compilation. For the moment, these are most recent memleak reports: Nov 14 09:13:17 mymachine kernel: : [31880.003286] kmemleak: 2 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 14 13:29:53 mymachine kernel: : [34394.934716] kmemleak: 8 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 15 19:48:11 mymachine kernel: : [97962.394034] kmemleak: 9 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 15 23:38:19 mymachine kernel: : [101124.258570] kmemleak: 9 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 15 23:48:49 mymachine kernel: : [101754.536246] kmemleak: 6 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 16 20:21:24 mymachine kernel: : [136194.069895] kmemleak: 7 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 16 20:31:54 mymachine kernel: : [136824.596508] kmemleak: 59 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 16 20:43:04 mymachine kernel: : [137494.244408] kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 16 20:53:38 mymachine kernel: : [138128.496333] kmemleak: 4 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 16 21:20:45 mymachine kernel: : [139365.557197] kmemleak: 9 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 16 22:05:08 mymachine kernel: : [142027.971207] kmemleak: 2 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 16 22:26:15 mymachine kernel: : [143294.787649] kmemleak: 4 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 17 00:16:36 mymachine kernel: : [149916.188882] kmemleak: 2 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 17 11:33:53 mymachine kernel: : [190553.421071] kmemleak: 11 new suspected memory leaks (see /sys/kernel/debug/kmemleak) see the memleak file in the attachement. Also, it came to my mind that there might be some relation with other error messages that I have in syslog (despite they seemed to me unrelated): Nov 17 11:41:40 mymachine cpufreqd: cpufreqd_set_profile : Couldn't set profile Performance High set for cpu0 (2001000-2001000-performance) Nov 17 11:41:40 mymachine cpufreqd: cpufreqd_loop : Cannot set policy, Rule unchanged (CPU Too Hot). Nov 17 11:41:40 mymachine logger: ACPI event unhandled: processor CPU1 00000080 00000004 Nov 17 11:41:46 mymachine logger: ACPI event unhandled: processor CPU0 00000080 00000000 Nov 17 11:41:46 mymachine logger: ACPI event unhandled: processor CPU1 00000080 00000000
Created attachment 254891 [details] sys_kernel_debug-kmemleak for 2.6.37-rc2 vanilla It seems there is no change in my problems, see: Nov 18 08:30:43 mymachine kernel: : [ 2.345962] kmemleak: Kernel memory leak detector initialized Nov 18 08:30:43 mymachine kernel: : [ 2.345982] kmemleak: Automatic memory scanning thread started Nov 18 08:41:48 mymachine kernel: : [ 2.865132] kmemleak: Kernel memory leak detector initialized Nov 18 08:41:48 mymachine kernel: : [ 2.865152] kmemleak: Automatic memory scanning thread started Nov 18 08:42:13 mymachine kernel: : [ 65.899554] kmemleak: 2 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 18 08:52:17 mymachine kernel: : [ 669.971895] kmemleak: 3 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 19 00:53:08 mymachine kernel: : [58320.501591] kmemleak: 18 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 19 01:26:18 mymachine kernel: : [60310.770974] kmemleak: 1 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 19 11:11:30 mymachine kernel: : [95422.673101] kmemleak: 6 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Nov 20 09:20:13 mymachine kernel: : [ 2.352532] kmemleak: Kernel memory leak detector initialized Nov 20 09:20:13 mymachine kernel: : [ 2.352551] kmemleak: Automatic memory scanning thread started Nov 20 09:28:04 mymachine kernel: : [ 2.358600] kmemleak: Kernel memory leak detector initialized Nov 20 09:28:04 mymachine kernel: : [ 2.358620] kmemleak: Automatic memory scanning thread started Nov 20 09:38:46 mymachine kernel: : [ 685.703072] kmemleak: 9 new suspected memory leaks (see /sys/kernel/debug/kmemleak) Shell I report this to kernel bugzilla?
(In reply to comment #16) > Created an attachment (id=254891) [details] > sys_kernel_debug-kmemleak for 2.6.37-rc2 vanilla > > It seems there is no change in my problems, see: > > Nov 18 08:30:43 mymachine kernel: : [ 2.345962] kmemleak: Kernel memory leak > detector initialized > Nov 18 08:30:43 mymachine kernel: : [ 2.345982] kmemleak: Automatic memory > scanning thread started > Nov 18 08:41:48 mymachine kernel: : [ 2.865132] kmemleak: Kernel memory leak > detector initialized > Nov 18 08:41:48 mymachine kernel: : [ 2.865152] kmemleak: Automatic memory > scanning thread started > Nov 18 08:42:13 mymachine kernel: : [ 65.899554] kmemleak: 2 new suspected > memory leaks (see /sys/kernel/debug/kmemleak) > Nov 18 08:52:17 mymachine kernel: : [ 669.971895] kmemleak: 3 new suspected > memory leaks (see /sys/kernel/debug/kmemleak) > Nov 19 00:53:08 mymachine kernel: : [58320.501591] kmemleak: 18 new suspected > memory leaks (see /sys/kernel/debug/kmemleak) > Nov 19 01:26:18 mymachine kernel: : [60310.770974] kmemleak: 1 new suspected > memory leaks (see /sys/kernel/debug/kmemleak) > Nov 19 11:11:30 mymachine kernel: : [95422.673101] kmemleak: 6 new suspected > memory leaks (see /sys/kernel/debug/kmemleak) > Nov 20 09:20:13 mymachine kernel: : [ 2.352532] kmemleak: Kernel memory leak > detector initialized > Nov 20 09:20:13 mymachine kernel: : [ 2.352551] kmemleak: Automatic memory > scanning thread started > Nov 20 09:28:04 mymachine kernel: : [ 2.358600] kmemleak: Kernel memory leak > detector initialized > Nov 20 09:28:04 mymachine kernel: : [ 2.358620] kmemleak: Automatic memory > scanning thread started > Nov 20 09:38:46 mymachine kernel: : [ 685.703072] kmemleak: 9 new suspected > memory leaks (see /sys/kernel/debug/kmemleak) > > Shell I report this to kernel bugzilla? > Yeah, you better report this to kernel bugzilla. Please post here the URL of your bug report afterwards :)
> Yeah, you better report this to kernel bugzilla. > Please post here the URL of your bug report afterwards :) > Reported https://bugzilla.kernel.org/show_bug.cgi?id=23352
(In reply to comment #18) > > Yeah, you better report this to kernel bugzilla. > > Please post here the URL of your bug report afterwards :) > > > > Reported https://bugzilla.kernel.org/show_bug.cgi?id=23352 > Thank you!