I our company we have a lot of ui-tests which are run on virtual/real devices. After running for some time tests randomly crashing, which I think is the result of file descriptor exceeding: I used
ls /proc/${PID}/fd | wc -l
and lsof -p ${PID}
but it did not help a lot - most of the rows in lsof looks like:
30015 u0_a104 678 sock 859560 socket:[859560]
30015 u0_a104 679 0000 0,8 4539 anon_inode:[eventpoll]
30015 u0_a104 680 0000 0,8 4539 anon_inode:[eventfd]
30015 u0_a104 681 0000 0,8 4539 anon_inode:[eventfd]
30015 u0_a104 682 0000 0,8 4539 anon_inode:[eventpoll]
30015 u0_a104 683 0000 0,8 4539 anon_inode:[eventfd]
30015 u0_a104 684 0000 0,8 4539 anon_inode:[eventpoll]
30015 u0_a104 685 0000 0,8 4539 anon_inode:[eventfd]
So my question is: is there any android/java/linux instruments/utils to find the source of leakage?
P.S. System.gc() did not help