doc: add PMD known issue

Message ID 20230420061429.140113-1-mingjinx.ye@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series doc: add PMD known issue |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Mingjin Ye April 20, 2023, 6:14 a.m. UTC
  Add a known issue: ASLR feature causes core dump.

Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
---
 doc/guides/nics/ixgbe.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
  

Comments

Stephen Hemminger April 20, 2023, 2:59 p.m. UTC | #1
On Thu, 20 Apr 2023 06:14:29 +0000
Mingjin Ye <mingjinx.ye@intel.com> wrote:

> Add a known issue: ASLR feature causes core dump.
> 
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> ---

Please provide back trace.
This should be fixable.
Fixing a bug is always better than documenting it.
  
Bruce Richardson April 20, 2023, 3:22 p.m. UTC | #2
On Thu, Apr 20, 2023 at 06:14:29AM +0000, Mingjin Ye wrote:
> Add a known issue: ASLR feature causes core dump.
> 
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> ---
>  doc/guides/nics/ixgbe.rst | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
> index b1d77ab7ab..c346e377e2 100644
> --- a/doc/guides/nics/ixgbe.rst
> +++ b/doc/guides/nics/ixgbe.rst
> @@ -461,3 +461,18 @@ show bypass config
>  Show the bypass configuration for a bypass enabled NIC using the lowest port on the NIC::
>  
>     testpmd> show bypass config (port_id)
> +
> +ASLR feature causes core dump
> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Core dump may occur when we start secondary processes on the vf port.
> +Mainstream Linux distributions have the ASLR feature enabled by default,
> +and the text segment of the process's memory space is randomized.
> +The secondary process calls the function address shared by the primary
> +process, resulting in a core dump.
> +
> +   .. Note::
> +
> +	  Support for ASLR features varies by distribution. Redhat and
> +	  Centos series distributions work fine. Ubuntu distributions
> +	  will core dump, other Linux distributions are unknown.
> -- 

I disagree about this description of the bug. ASLR is not the problem;
instead driver is just not multi-process aware and uses the same pointers
in both primary and secondary processes. You will hit this issue even
without ASLR if primary and secondary processes use different static
binaries. Therefore, IMHO, title should be that the VF driver is not
multi-process safe, rather than pinning the blame on ASLR.

/Bruce
  

Patch

diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index b1d77ab7ab..c346e377e2 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -461,3 +461,18 @@  show bypass config
 Show the bypass configuration for a bypass enabled NIC using the lowest port on the NIC::
 
    testpmd> show bypass config (port_id)
+
+ASLR feature causes core dump
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Core dump may occur when we start secondary processes on the vf port.
+Mainstream Linux distributions have the ASLR feature enabled by default,
+and the text segment of the process's memory space is randomized.
+The secondary process calls the function address shared by the primary
+process, resulting in a core dump.
+
+   .. Note::
+
+	  Support for ASLR features varies by distribution. Redhat and
+	  Centos series distributions work fine. Ubuntu distributions
+	  will core dump, other Linux distributions are unknown.