Currently, I run a Java program will call some C++ library, and I find that after some files have been deleted, there still some thread holds the fd such as
3515991655 0 lr-x------ 1 user group 64 Jul 29 10:52 /proc/81263/fd/658 -> /path/to/file.suffix\ (deleted)
I can use lsof
to find which process holds the FD(for reading purpose) and can find out the thread id, but I still didn't find out what code holds the FD.
my question: is there any way I can find out the stack which holds the open FD? so that I can find out the code leads the problem