Bug #4721
writing NT_FDINFO leaks vnode
100%
Description
Dave put together a script that traced hold and rele for kernel stacks. Dave and Bryan initially found that the number of stacks that looked suspicious, importantly the number of times we entered do_core() seemed to correspond to the number of leaks that were found. While investigating the code paths, we uncovered the portion of code that corresponds to writing out the NT_FDINFO. Importantly, the addition of this code to dump out the NT_FDINFO causes us to take a hold on the root directory for the process, which in this case is the zone root. Unfortunately, this code path never releases that hold, except in one of its failure cases. The fix here is to add the missing calls to VN_RELE. With this in place, we were able to produce a platform build that had the proper fix in place and we passed the test.
Updated by Electric Monk almost 7 years ago
git commit 4b835deeb9507998d1e01b7be950b7ddb0d2564f
Author: Robert Mustacchi <rm@joyent.com> 4721 writing NT_FDINFO leaks vnode Reviewed by: Marcel Telka <marcel@telka.sk> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Dan McDonald <danmcd@omniti.com>