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

From: Beeblebrox <zaphod_at_berentweb.com>
Date: Thu, 29 May 2014 02:41:03 -0700 (PDT)
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:
COMMAND    PID USER   FD   TYPE         DEVICE           SIZE/OFF   NODE
NAME
kernel       0 root  cwd   VDIR 123,1479344360                 30      4 /
kernel       0 root  rtd   VDIR 123,1479344360                 30      4 /
init         1 root  cwd   VDIR 123,1479344360                 30      4 /
init         1 root  rtd   VDIR 123,1479344360                 30      4 /
init         1 root  txt   VREG 123,1479344360             946272   9945
/sbin/init
ng_queue  2186 root  cwd   VDIR 123,1479344360                 30      4 /
ng_queue  2186 root  rtd   VDIR 123,1479344360                 30      4 /
sh       10935 root  cwd   VDIR 114,1970143416                148     13
/home/user
sh       10935 root  rtd   VDIR 123,1479344360                 30      4 /
sh       10935 root  txt   VREG 123,1479344360             145616   9796
/bin/sh
sh       10935 root  txt   VREG 123,1479344360             118360   9731
/libexec/ld-elf.so.1
sh       10935 root  txt   VREG 123,1479344360             163328   9700
/lib/libedit.so.7
sh       10935 root  txt   VREG 123,1479344360             326264   9666
/lib/libncurses.so.8
sh       10935 root  txt   VREG 123,1479344360            1597040   9648
/lib/libc.so.7
sh       10935 root    0u  VCHR            0,4          0t4591427      4
/dev/console
sh       10935 root    1u  VCHR            0,4          0t4591427      4
/dev/console
sh       10935 root    2u  VCHR            0,4          0t4591427      4
/dev/console
sh       10935 root   10u  VCHR            0,4                0t0      4
/dev/console
lsof     11083 root  cwd   VDIR 114,1970143416                148     13
/home/user
lsof     11083 root  rtd   VDIR 123,1479344360                 30      4 /
lsof     11083 root  txt   VREG 221,2875719755             125688 225394
/usr/local/sbin/lsof
lsof     11083 root  txt   VREG 123,1479344360             118360   9731
/libexec/ld-elf.so.1
lsof     11083 root  txt   VREG 123,1479344360              35192   9662
/lib/libkvm.so.6
lsof     11083 root  txt   VREG 123,1479344360            1597040   9648
/lib/libc.so.7
lsof     11083 root    0u  VCHR            0,4          0t4591427      4
/dev/console
lsof     11083 root    1w  VREG 114,1970143416                  0 173483
/home
lsof     11083 root    2u  VCHR            0,4          0t4591427      4
/dev/console
lsof     11083 root    3r  VCHR           0,15                0t0     15
/dev/mem
lsof     11083 root    4r  VCHR           0,16 0xfffff80005e235f0     16
/dev/kmem




-----
FreeBSD-11-current_amd64_root-on-zfs_RadeonKMS
--
View this message in context: http://freebsd.1045724.n5.nabble.com/Memory-blackhole-in-11-Possibly-libc-so-7-tp5916161.html
Sent from the freebsd-current mailing list archive at Nabble.com.
Received on Thu May 29 2014 - 07:41:05 UTC

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