NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/49738: rc.subr leaks filedescriptors



>Number:         49738
>Category:       misc
>Synopsis:       rc.subr leaks filedescriptors
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 09 07:45:00 +0000 2015
>Originator:     mlelstv%serpens.de@localhost
>Release:        NetBSD 7.99.4
>Organization:
	
>Environment:
	
	
System: NetBSD pussyfoot 7.99.4 NetBSD 7.99.4 (PUSSYFOOT) #3: Sat Feb 21 14:53:08 CET 2015 mlelstv@pussyfoot:/home/netbsd-current/obj.amd64/home/netbsd-current/src/sys/arch/amd64/compile/PUSSYFOOT amd64
Architecture: x86_64
Machine: amd64
>Description:
When starting LVM at boot, it prints warnings like

 File descriptor 7 () leaked on lvm invocation. Parent PID 122:

This is because it is paranoid and checks for open filedescriptors
when started and emits warnings if any other than filedescriptor
0,1 or 2 are open.

Other filedescriptors however are used by our rc framework to enable
output postprocessing and these are passed to the individual rc scripts
which is a questionable thing to do.

The rc framework allows rc scripts that are not executed in a subshell
but sourced, it's probably impossible to sanitize the filedescriptors
for these scripts.

>How-To-Repeat:
Put lvm=YES in rc.conf and boot.

>Fix:
Either appease lvm to turn off the warnings or close filedescriptors
in rc.subr when calling into rc scripts.

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index