We hit a strange issue on one of customers servers, where Java encounters "Too many files",

Checking the descriptors via lsof produces a large list of "sock" descriptors with "can't identify protocol".

I suspect it happens due to sockets that opened for too much time, but as our thread dump contains a lot of them, I have no clear idea who exactly the culprit.

Is there any good method to detect which threads exactly open these sockets?

Thanks.