Re: Memory blackhole in 11. Possibly libc.so.7?

From: John Baldwin <jhb_at_freebsd.org>
Date: Thu, 29 May 2014 09:08:10 -0400
On Thursday, May 29, 2014 5:41:03 am Beeblebrox wrote:
> uname: FreeBSD 11.0-CURRENT #0 r266393M: Sun May 18 13:04:00 2014 amd64
> I'm also loading the Radeon_kms modules
> 
> Upon system startup, memory profile is clean. I get locked memory (mem_wire)
> usage as:
> 9%	before Radeon*.ko modules loaded
> 12%	when slim is started (loads Radeon*.ko modules)
> 14%	after I login through slim
> These are quite normal. However, after some usage (I don't know what
> exactly) mem_free drops significantly and causes display problems (Radeon
> has issues when memory falls very low, if I remember correctly).
> 
> Upon observing low level of mem_free, I went to single user (shutdown now),
> also kldunload any modules not compiled into kernel (using custom built
> kernel). Final kldstat:
> Id Refs Address            Size     Name
>  1   99 0xffffffff80200000 941c18   kernel
>  2    1 0xffffffff80b42000 b0f0     linprocfs.ko
>  3    2 0xffffffff80b4e000 45ba0    linux.ko
>  4    1 0xffffffff80b94000 2a38     linsysfs.ko
>  5    1 0xffffffff80b97000 243fc8   zfs.ko
>  6    1 0xffffffff80ddb000 2940     acl_nfs4.ko
>  7    2 0xffffffff80dde000 5d10     opensolaris.ko
>  8    1 0xffffffff80de4000 40a50    snd_hda.ko
>  9    2 0xffffffff80e25000 756a0    sound.ko
> 10    1 0xffffffff80e9b000 7550     umass.ko
> 11    5 0xffffffff80ea3000 3f7b0    usb.ko
> 13    1 0xffffffff80f32000 19758    ext2fs.ko
> 14    1 0xffffffff80f4c000 d050     ehci.ko
> 15    1 0xffffffff80f5a000 a3f0     ohci.ko
> 16    1 0xffffffff81011000 1adb     ums.ko
> 17    1 0xffffffff81013000 951      pflog.ko
> 18    1 0xffffffff81014000 27641    pf.ko
> 19    1 0xffffffff8103c000 108ffc   radeonkms.ko
> 20    1 0xffffffff81145000 3fd39    drm2.ko
> 21    2 0xffffffff81185000 ae68     agp.ko
> 22    4 0xffffffff81190000 1776     iicbus.ko
> 23    1 0xffffffff81192000 d1a      iic.ko
> 24    1 0xffffffff81193000 167d     iicbb.ko
> 25    4 0xffffffff81195000 1bde     firmware.ko
> 26    1 0xffffffff81197000 ac6      radeonkmsfw_RS780_pfp.ko
> 27    1 0xffffffff81198000 55c6     radeonkmsfw_RS780_me.ko
> 28    1 0xffffffff8119e000 dc6      radeonkmsfw_R600_rlc.ko
> 31    1 0xffffffff811d6000 9118     netgraph.ko
> 32    1 0xffffffff811e0000 160a     ng_ether.ko
> 
> But look at memory (70%), even though there are absolutely no processes
> running. SYSTEM MEMORY INFORMATION:
> mem_wire:        2735349760 (   2608MB) [ 70%] Wired: disabled for paging
> out
> mem_active:  +      8638464 (      8MB) [  0%] Active: recently referenced
> mem_inactive:+    137596928 (    131MB) [  3%] Inactive: recently not
> referenced
> mem_cache:   +     34885632 (     33MB) [  0%] Cached: almost avail. for
> allocation
> mem_free:    +    970948608 (    925MB) [ 24%] Free: fully available for
> allocation
> mem_gap_vm:  +       413696 (      0MB) [  0%] Memory gap: UNKNOWN
> -------------- ------------ ----------- ------
> mem_all:     =   3887833088 (   3707MB) [100%] Total real memory managed
> mem_gap_sys: +    123482112 (    117MB)        Memory gap: Kernel?!
> -------------- ------------ -----------
> mem_phys:    =   4011315200 (   3825MB)        Total real memory available
> mem_gap_hw:  +    283652096 (    270MB)        Memory gap: Segment
> Mappings?!
> -------------- ------------ -----------
> mem_hw:      =   4294967296 (   4096MB)        Total real memory installed
> 
> SYSTEM MEMORY SUMMARY:
> mem_used:        3151536128 (   3005MB) [ 73%] Logically used memory
> mem_avail:   +   1143431168 (   1090MB) [ 26%] Logically available memory
> -------------- ------------ ----------- ------
> mem_total:   =   4294967296 (   4096MB) [100%] Logically total memory
> 
> I don't know if the lsof dump in single user mode will be of any help, but
> it seems like lib/libc.so.7 has something to do with it:


Why do you think libc.so.7 has anything to do with this?  wired memory is
usually only allocated in the kernel, so if anything you are looking at some
sort of memory leak in a driver (maybe the radeon driver?)

-- 
John Baldwin
Received on Thu May 29 2014 - 11:51:01 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:49 UTC