Project

General

Profile

Bug #4721

writing NT_FDINFO leaks vnode

Added by Robert Mustacchi over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
High
Category:
kernel
Start date:
2014-04-02
Due date:
% Done:

100%

Estimated time:
Difficulty:
Hard
Tags:

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.

History

#1

Updated by Robert Mustacchi over 5 years ago

  • Status changed from In Progress to Resolved
#2

Updated by Electric Monk over 5 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>

Also available in: Atom PDF