泄漏文件描述符


13

如果文件描述符泄漏是什么意思

 File descriptor 6 (socket:[901758]) leaked on lvextend invocation. Parent PID 10035: /bin/zsh
 File descriptor 9 (/dev/pts/1) leaked on lvextend invocation. Parent PID 10035: /bin/zsh
 File descriptor 11 (/dev/pts/1) leaked on lvextend invocation. Parent PID 10035: /bin/zsh
 File descriptor 12 (/dev/pts/1) leaked on lvextend invocation. Parent PID 10035: /bin/zsh
 File descriptor 15 (/dev/pts/7) leaked on lvextend invocation. Parent PID 10035: /bin/zsh
 File descriptor 17 (/dev/pts/7) leaked on lvextend invocation. Parent PID 10035: /bin/zsh
 File descriptor 18 (/dev/pts/7) leaked on lvextend invocation. Parent PID 10035: /bin/zsh
   Extending logical volume usr to 30.00 GiB
   Logical volume usr successfully resized

这是什么意思?

Answers:


6

这些是在设备上打开的文件描述符(您正在调整大小)。

lvm(8)说:

On invocation, lvm requires that only the standard file descriptors stdin, stdout
and stderr are available. If others are found, they get closed and messages
are issued warning about the leak.

3
不,不是。这些是传递给lvm命令的打开文件描述符。由于某些原因,有人决定在这里提供帮助。
Simon Richter

6
对于正在寻找如何抑制此消息的任何人 This warning can be suppressed by setting the environment variable LVM_SUPPRESS_FD_WARNINGS
edoput '16

我不明白为什么答案不正确。通常,文件系统传递给lvm命令,而不是文件...
MUY比利时

如edoput所说:export LVM_SUPPRESS_FD_WARNINGS=1
user3804598
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.