Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
hi,
Our project uses the java-profiler code, and the Java process has a Too many open files error. After using strace -k -e trace=openat -f java-pid, I feel that I may have found the reason. After I modified it slightly, I have verified that the problem can be solved. I don't know if I can contribute a little code to java-profiler.
[WARN] perf_event_open for TID 30704 failed: Too many open files
ulimit -n
256
lsof -p 30499|grep '/proc/30499/task'|wc -l
202
lsof -p 30499|grep '/proc/30499/task'|head
java 30499 root 23r DIR 0,3 0 61771716 /proc/30499/task
java 30499 root 24r DIR 0,3 0 61771716 /proc/30499/task
java 30499 root 51r DIR 0,3 0 61771716 /proc/30499/task
java 30499 root 52r DIR 0,3 0 61771716 /proc/30499/task
java 30499 root 53r DIR 0,3 0 61771716 /proc/30499/task
java 30499 root 54r DIR 0,3 0 61771716 /proc/30499/task
java 30499 root 55r DIR 0,3 0 61771716 /proc/30499/task
java 30499 root 56r DIR 0,3 0 61771716 /proc/30499/task
java 30499 root 57r DIR 0,3 0 61771716 /proc/30499/task
java 30499 root 58r DIR 0,3 0 61771716 /proc/30499/task