Bug 560 - excessive numbers of open file handles kept open
Summary: excessive numbers of open file handles kept open
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: core (show other bugs)
Version: 19.11
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Thomas Monjalon
URL:
Depends on:
Blocks:
 
Reported: 2020-10-19 19:08 CEST by Stephen Hemminger
Modified: 2021-03-09 05:27 CET (History)
2 users (show)



Attachments

Description Stephen Hemminger 2020-10-19 19:08:52 CEST
The DPDK memory management of huge pages leaves many open file handles which may break applications because of running out file descriptors or use of legacy API's like select that can only handle 1024 fds.

The root cause is in the hugepage segment handling code.

Example.
# lsof -p PID | grep -c rtemap 
1494

Each fd there is counted twice, once as an fd, and once as an mmap.
So in this case 747 file rtemap files are left open.
Comment 1 Thomas Monjalon 2021-02-16 14:27:23 CET
Please could you give steps to reproduce?
Comment 2 Stephen Hemminger 2021-02-22 18:12:18 CET
Running with 1024 2M hugepages will cause 1024 open file handles.
You would need a simple DPDK application that calls rte_eal_init() and then print out the next open file handle.

The problem is worse after application has started and stopped several times, and memory has become fragmented.

I would argue that this deserves a release note, if the core memory management has to leave files open for shutdown.
Comment 3 Ajit Khaparde 2021-03-09 05:27:47 CET
Thomas, Do you need any more info? Do you think this can be fixed? Else we could document it like Stephen suggested. Thanks

Note You need to log in before you can comment on or make changes to this bug.