|Subject:||Leaking descriptors when processes disappear during proc file being read|
It seems there is a bug in C code in read_file. If read() call returns -1 then file this function returns NULL, but descriptor is not closed. When Proc::ProcessTable reads file in /proc for particular process and that process disappears during that read then read returns -1 (ESRCH), and file descriptor is NOT closed. This actually proved fatal on busy server in long running process.