kern/164763: [vimage] Memory leak in VNET
Bjoern A. Zeeb
bz at FreeBSD.org
Thu May 22 15:16:52 UTC 2014
On 22 May 2014, at 15:10 , Hiroo Ono (小野寛生) <hiroo.ono+freebsd at gmail.com> wrote:
> The following reply was made to PR kern/164763; it has been noted by GNATS.
> From: =?UTF-8?B?SGlyb28gT25vICjlsI/ph47lr5vnlJ8p?= <hiroo.ono+freebsd at gmail.com>
> To: bug-followup at FreeBSD.org
> Subject: Re: kern/164763: [vimage] Memory leak in VNET
> Date: Fri, 23 May 2014 00:02:36 +0900
> I tracked this issue down a little.
> I put some printf's and found that this occurs in the function
> vnet_destroy() in sys/net/vnet.c.
> The memory leak seems to happen when vnet_sysuninit() is called.
> So, something needs to be done before or inside vnet_sysuninit(), but
> I do not know
> what to do.
> The messages I saw on head and stable/10 around 2014-04-30 are:
> Freed UMA keg (udp_inpcb) was not empty (135 items). Lost 9 pages of memory.
> Freed UMA keg (udpcb) was not empty (250 items). Lost 1 pages of memory.
> Freed UMA keg (tcp_inpcb) was not empty (75 items). Lost 5 pages of memory.
> Freed UMA keg (tcpcb) was not empty (15 items). Lost 3 pages of memory.
The fixes for UDP have been in a perforce branch for two years and need updating and merging into HEAD.
TCP was and is the only thing that could not be completely freed (back two years ago) synchronously and thus would continue to leak. It’s not not fixable and probably with some tw changes lately got better (or maybe they didn’t happen).
Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983
More information about the freebsd-bugs