Bug #7185
IP DCEs leak from halted non-global zones
100%
Description
Steps to reproduce:
1.) Boot a zone.
2.) Establish a connection over localhost (my first leak had 127.0.0.1, but this one seemed to be over v6).
3.) While connection to itself is established, halt the zone.
4.) "reboot -d" and the subsequent dump will have a leak of at least one DCE.
Stacks look like this:
dce_cache leak: 1 buffer, 152 bytes
ADDR BUFADDR TIMESTAMP THREAD
CACHE LASTLOG CONTENTS
ffffff025a8da898 ffffff025a83ebb8 49f5eeb4e8 ffffff027d6b1440
ffffff025a8ae348 ffffff024bdab2c0 0
kmem_cache_alloc_debug+0x2e0
kmem_cache_alloc+0x320
dce_lookup_and_add_v4+0xe9
ip_set_destination_v4+0x392
ip_attr_connect+0x109
conn_connect+0x122
tcp_set_destination+0x70
tcp_connect_ipv4+0x11f
tcp_do_connect+0x505
tcp_connect+0xc9
so_connect+0xfe
socket_connect+0x3c
connect+0xb1
dce_cache leak: 1 buffer, 152 bytes
ADDR BUFADDR TIMESTAMP THREAD
CACHE LASTLOG CONTENTS
ffffff025a8da7c0 ffffff025a83ec68 42da3c1fb9 ffffff027cc6c3c0
ffffff025a8ae348 ffffff024e7d0080 0
kmem_cache_alloc_debug+0x2e0
kmem_cache_alloc+0x320
dce_lookup_and_add_v6+0x171
ip_set_destination_v6+0x549
ip_attr_connect+0x172
conn_connect+0x122
tcp_set_destination+0x70
tcp_connect_ipv6+0x1a9
tcp_do_connect+0x542
tcp_connect+0xc9
so_connect+0xfe
socket_connect+0x3c
connect+0xb1
It's not clear yet if CLOSED connections also leak, but I think this is likely a bug in the netstack-teardown code that forgets to clean up ip_xmit_attr DCE holds.