From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2B31D42B48; Fri, 19 May 2023 13:59:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B89C14161A; Fri, 19 May 2023 13:59:24 +0200 (CEST) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id 9CBF141148 for ; Fri, 19 May 2023 13:59:23 +0200 (CEST) Received: by inbox.dpdk.org (Postfix, from userid 33) id 6E7D142B49; Fri, 19 May 2023 13:59:23 +0200 (CEST) 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 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: ethdev X-Bugzilla-Version: 21.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: sahithi.singam@oracle.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: multipart/alternative; boundary=16844975630.e5CB.4176352 Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --16844975630.e5CB.4176352 Date: Fri, 19 May 2023 13:59:23 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All https://bugs.dpdk.org/show_bug.cgi?id=3D1234 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 wi= ll be a primary DPDK process where as second one will be a secondary DPDK proc= ess.=20 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.=20 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.=20=20 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.=20 Call to iavf_set_rx_function modifies this function pointer i.e release_mbu= fs.=20 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 addr= ess ->=20 rte_eal_init()) -> iavf_dev_init() -> iavf_set_rx_function() . This address will be invalid in primary process address space.=20 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 sim= ilar code/design. --=20 You are receiving this mail because: You are the assignee for the bug.= --16844975630.e5CB.4176352 Date: Fri, 19 May 2023 13:59:23 +0200 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All
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 applicati=
on which has two processes , first one will
be a primary DPDK process where as second one will be a secondary DPDK proc=
ess.=20
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.=20

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.=20=20

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.=20

Call to iavf_set_rx_function modifies this function pointer i.e release_mbu=
fs.=20

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 addr=
ess
->=20
rte_eal_init()) -> iavf_dev_init() -> iavf_set_rx_function() . This a=
ddress
will be invalid in primary process address space.=20

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 sim=
ilar
code/design.
          


You are receiving this mail because:
  • You are the assignee for the bug.
=20=20=20=20=20=20=20=20=20=20
= --16844975630.e5CB.4176352--