From owner-freebsd-current@FreeBSD.ORG Thu May 29 13:51:01 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98F5A1FE for ; Thu, 29 May 2014 13:51:01 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F5C22BC6 for ; Thu, 29 May 2014 13:51:01 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DC775B97B; Thu, 29 May 2014 09:50:59 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Subject: Re: Memory blackhole in 11. Possibly libc.so.7? Date: Thu, 29 May 2014 09:08:10 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <1401356463384-5916161.post@n5.nabble.com> In-Reply-To: <1401356463384-5916161.post@n5.nabble.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201405290908.10274.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 29 May 2014 09:51:00 -0400 (EDT) Cc: Beeblebrox X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 13:51:01 -0000 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