Skip to contentSkip to conversation

doc: add PMD known issue

PATCH In review Mingjin Ye 4 participants 10 messages Apr 20, 2023 – May 18, 2023

lore
Share & tools
lore

Mingjin Ye

author
#0 lore raw

PATCH 1/1 doc: add PMD known issue

Add a known issue: ASLR feature causes core dump.

---
 doc/guides/nics/ixgbe.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
doc/guides/nics/ixgbe.rst +15 -0
index b1d77ab7ab..c346e377e2 100644
@@ -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.
Signature · 1 line
2.25.1
#2 lore raw
In reply to Mingjin Ye
Quoted 21 lines · Mingjin Ye

Add a known issue: ASLR feature causes core dump.

---
 doc/guides/nics/ixgbe.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
doc/guides/nics/ixgbe.rst +5 -0
index b1d77ab7ab..c346e377e2 100644
@@ -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.

doc/guides/nics/ixgbe.rst show bypass config · line 478

Quoted 10 lines
doc/guides/nics/ixgbe.rst +10 -0
+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

author
#3 lore raw

PATCH v2 1/1 doc: add PMD known issue

In reply to Mingjin Ye

Add a known issue: The ixgbe_vf driver is not multi-process safe.

---
v2: Modify issue description reason.

---
 doc/guides/nics/ixgbe.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
doc/guides/nics/ixgbe.rst +15 -0
index b1d77ab7ab..9fb3c39bf4 100644
@@ -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)
+
+VF driver is not multi-process safe
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+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 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.
Signature · 1 line
2.25.1
#4 lore raw
Quoted 29 lines

-----Original Message-----
From: Mingjin Ye <[email protected]>
Sent: Saturday, May 6, 2023 6:03 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Wu, Wenjun1 <[email protected]>
Subject: [PATCH v2] doc: add PMD known issue

Add a known issue: The ixgbe_vf driver is not multi-process safe.

---
v2: Modify issue description reason.

---
 doc/guides/nics/ixgbe.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
doc/guides/nics/ixgbe.rst index renamed from doc/guides/nics/ixgbe.rst +0 -0

b1d77ab7ab..9fb3c39bf4 100644

doc/guides/nics/ixgbe.rst +0 -0
@@ -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)

doc/guides/nics/ixgbe.rst show bypass config · line 472

Quoted 9 lines
doc/guides/nics/ixgbe.rst +9 -0
+
+VF driver is not multi-process safe
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+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 memory space is randomized.
+The secondary process calls the function address shared by the primary
+process, resulting in a core dump.

Which function did we encounter the issue with? Is this a bug in the PMD? In a multi-process scenario, we should not assume that the addresses of functions are identical across different processes. Additionally, this issue should not be related ASLR because the primary and secondary processes could be two different applications but still share the same DPDK library.

Quoted 8 lines
doc/guides/nics/ixgbe.rst +6 -1
+
+   .. 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.
--

2.25.1

author
#5 lore raw

PATCH v3 1/1 doc: comment VF does not support multi-process

In reply to Mingjin Ye

Announcing that multi-process is not supported

---
v2: Modify issue description reason.
---
V3: Modify description.

---
 doc/guides/nics/ixgbe.rst | 6 ++++++
 1 file changed, 6 insertions(+)
doc/guides/nics/ixgbe.rst +6 -0
index b1d77ab7ab..816d614c33 100644
@@ -461,3 +461,9 @@ 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)
+
+VF driver does not support multi-process
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The VF driver does not support multi-process. And some function pointers
+in the case of multi-process are not set correctly.
Signature · 1 line
2.25.1
#6 lore raw

Re: [PATCH v3] doc: comment VF does not support multi-process

Quoted 16 lines · On Tue, 16 May 2023 10:22:05 +0000 Mingjin Ye <[email protected]> wrote:

Announcing that multi-process is not supported

---
v2: Modify issue description reason.
---
V3: Modify description.

---
 doc/guides/nics/ixgbe.rst | 6 ++++++
 1 file changed, 6 insertions(+)
doc/guides/nics/ixgbe.rst +0 -0
index b1d77ab7ab..816d614c33 100644

doc/guides/nics/ixgbe.rst show bypass config · line 469

Quoted 9 lines
doc/guides/nics/ixgbe.rst +6 -0
@@ -461,3 +461,9 @@ 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)  
+
+VF driver does not support multi-process
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The VF driver does not support multi-process. And some function pointers
+in the case of multi-process are not set correctly.

This is best done by updating doc/guides/nic/features/ixgbe_vf.ini

That is enough. Don't need to add note in ixgbe.rst.

#7 lore raw

RE: [PATCH v3] doc: comment VF does not support multi-process

Quoted 42 lines

-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: 2023年5月16日 23:18
To: Ye, MingjinX <[email protected]>
Cc: [email protected]; Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Wu, Wenjun1 <[email protected]>
Subject: Re: [PATCH v3] doc: comment VF does not support multi-process

Quoted 19 lines · On Tue, 16 May 2023 10:22:05 +0000 Mingjin Ye <[email protected]> wrote:

Announcing that multi-process is not supported

---
v2: Modify issue description reason.
---
V3: Modify description.

---
 doc/guides/nics/ixgbe.rst | 6 ++++++
 1 file changed, 6 insertions(+)
doc/guides/nics/ixgbe.rst +0 -0
index b1d77ab7ab..816d614c33 100644
@@ -461,3 +461,9 @@ 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)

doc/guides/nics/ixgbe.rst show bypass config

Quoted 6 lines
doc/guides/nics/ixgbe.rst +6 -0
+
+VF driver does not support multi-process
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The VF driver does not support multi-process. And some function
+pointers in the case of multi-process are not set correctly.

This is best done by updating doc/guides/nic/features/ixgbe_vf.ini

Quoted 1 line

That is enough. Don't need to add note in ixgbe.rst.

I will send the v4 version as soon as possible with a better solution.

author
#8 lore raw

PATCH v4 1/1 doc: update ixgbe VF features list

In reply to Mingjin Ye

The ixgbe VF driver is not multi-process aware. Some function pointers are not set correctly in multi-process situations.

Remove the multiprocess aware feature from the features list.

---
v2: Modify issue description reason.
---
V3: Modify description.
---
V4: Removed the multiprocess aware feature.

---
 doc/guides/nics/features/ixgbe_vf.ini | 1 -
 1 file changed, 1 deletion(-)
doc/guides/nics/features/ixgbe_vf.ini +0 -1
index e14325045c..299ccd4b61 100644
@@ -32,7 +32,6 @@ Tx descriptor status = Y
 Basic stats          = Y
 Extended stats       = Y
 Registers dump       = Y
-Multiprocess aware   = Y
 FreeBSD              = Y
 Linux                = Y
 Windows              = Y
Signature · 1 line
2.25.1
Acked-by on v4 1/1 Applied
#9 lore raw

RE: [PATCH v4] doc: update ixgbe VF features list

Quoted 11 lines

-----Original Message-----
From: Mingjin Ye <[email protected]>
Sent: Wednesday, May 17, 2023 6:04 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; [email protected]; Zhou, YidingX <[email protected]>; Ye, MingjinX <[email protected]>; Wu, Wenjun1 <[email protected]>
Subject: [PATCH v4] doc: update ixgbe VF features list

Quoted 6 lines

The ixgbe VF driver is not multi-process aware. Some function pointers are not set correctly in multi-process situations.

Remove the multiprocess aware feature from the features list.

Applied to dpdk-next-net-intel.

Thanks
Qi