dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [Bug 1234] iavf : crash observed during rte_eth_dev_stop
Date: Fri, 19 May 2023 11:59:22 +0000	[thread overview]
Message-ID: <bug-1234-3@http.bugs.dpdk.org/> (raw)

[-- Attachment #1: Type: text/plain, Size: 2066 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=1234

            Bug ID: 1234
           Summary: iavf : crash observed during rte_eth_dev_stop
           Product: DPDK
           Version: 21.11
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: Normal
         Component: ethdev
          Assignee: dev@dpdk.org
          Reporter: sahithi.singam@oracle.com
  Target Milestone: ---

We are using DPDK in our application which has two processes , first one will
be a primary DPDK process where as second one will be a secondary DPDK process. 
While our primary process calls all dpdk initialization routines like
rte_eal_init, dev_configure, rx/tx queue setup and dev_start routines, our
secondary process will invoke just rte_eal_init. 

In DPDK, rte_eth_dev->data->rx_queues and rte_eth_dev->data->tx_queues is a
shared data structure between both primary and secondary processes.  

In iavf pmd, each rxq(i.e above rx_queues) and txq (above tx_queues) holds a
pointer to the function ( eg. in rx_queues[index]->ops->release_mbufs) which
will be invoked during rte_eth_dev_stop. 

Call to iavf_set_rx_function modifies this function pointer i.e release_mbufs. 

This function pointer will be initially set to a address by primary process ->
rte_eth_dev_start() -> iavf_init_queues() -> iavf_set_rx_function().

Later this function pointer is updated by secondary process to its own address
-> 
rte_eal_init()) -> iavf_dev_init() -> iavf_set_rx_function() . This address
will be invalid in primary process address space. 

During application shutdown, we are invoking rte_eth_dev_stop from primary
process which invokes release_mbufs function . As the address stored in
release_mbufs function pointer now points to an invalid address , primary
process is crashing always.

Note:
This bug will also be observed in other PMDs like ice, ixgbe which uses similar
code/design.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 3975 bytes --]

                 reply	other threads:[~2023-05-19 11:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=bug-1234-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --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).