From: Martin Weiser <martin.weiser@allegro-packets.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] net/ixgbe: ixgbe_dev_link_update_share() leaks memory and memory mappings due to not cleaning up pthreads
Date: Thu, 9 Apr 2020 12:31:51 +0200 [thread overview]
Message-ID: <57989cfc-21ea-c6ef-cb92-d0e430dd8a50@allegro-packets.com> (raw)
Hi,
we recently discovered that our application was not able to create new
threads or perform mmaps after some time.
With some digging we identified the function
ixgbe_dev_link_update_share() to be the reason for this behavior.
In the patch "net/ixgbe: fix blocking system events"
(819d0d1d57f17aa40321648e99a50b49adc7bdf6) a thread is introduced to run
ixgbe_dev_setup_link_thread_handler().
Unfortunately this thread is not detached and just joined (the very last
one spawned that is) through ixgbe_dev_cancel_link_thread() upon
interface start/stop.
When an application repeatedly calls e.g. rte_eth_link_get_nowait() on
an ixgbe interface with no link this causes a lot of pthreads never to
be cleaned up.
Since each thread holds a mmap to the stack this can quite quickly
exhaust the allowed number of memory mappings for the process.
Best regards,
Martin Weiser
next reply other threads:[~2020-04-09 10:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 10:31 Martin Weiser [this message]
[not found] <35d734a2-34c4-3cc8-6e3e-58a17a7bb9da@allegro-packets.com>
2020-04-09 12:06 ` Martin Weiser
2020-04-09 12:33 ` Martin Weiser
2020-04-09 15:31 ` Ananyev, Konstantin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57989cfc-21ea-c6ef-cb92-d0e430dd8a50@allegro-packets.com \
--to=martin.weiser@allegro-packets.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).