Bug 6 - dpdk-pdump leads to ovs-vswitchd crash
Summary: dpdk-pdump leads to ovs-vswitchd crash
Status: RESOLVED INVALID
Alias: None
Product: DPDK
Classification: Unclassified
Component: other (show other bugs)
Version: 17.11
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Vipin Varghese
URL:
Depends on:
Blocks:
 
Reported: 2018-01-04 07:19 CET by wangzhike
Modified: 2021-11-23 09:15 CET (History)
5 users (show)



Attachments

Description wangzhike 2018-01-04 07:19:35 CET
I am using dpdk17.11 and latest openvswitch (pre-2.9). When I tries to dump the packets on dpdk port, the ovs-vswitchd crash.

The command is as follows:
/usr/bin/dpdk-pdump -d librte_pmd_pcap.so -- --pdump port=0,queue=*,rx-dev=/tmp/pkts1.pcap,tx-dev=/tmp/pkts1.pcap --server-socket-path=/var/run/openvswitch

It can be reproduced 100%. it was broken even on 17.05. 

It works on dpdk 16.11.

Br,
Wang Zhike
Comment 1 Vipin Varghese 2018-01-23 17:21:53 CET
hi,

I have seen similar issue when running in shared library mode. The solution that worked for me is to pass same shared PMD as primary.

Example- 
Primary: -d librte_pmd_ixgbe.so -d librte_pmd_i40e.so
Secondary (PDUMP): -d librte_pmd_ixgbe.so -d librte_pmd_i40e.so

Missing to pass the same drivers causes crash. A quick fix was to check either before or in rte_eth_dev_attch the device count.

Possible Fix:
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -376,6 +376,12 @@ rte_eth_dev_attach(const char *devargs, uint16_t *port_id)
               goto err;
       }

+       if (current <= 0) {
+               RTE_LOG(ERR, EAL, "No port found for device (%s)\n", name);
+               ret = -EINVAL;
+               goto err;
+       }
+
       /* parse devargs, then retrieve device name and args */
       if (rte_eal_parse_devargs_str(devargs, &name, &args))
               goto err;
Comment 2 Qian 2018-02-08 03:53:34 CET
@Vipin, could you submit the patch? thanks.
Comment 3 Ajit Khaparde 2020-09-16 23:39:36 CEST
Vipin, is this still an issue? Thanks
Comment 4 Vipin Varghese 2020-09-17 09:57:31 CEST
Hi Ajith,

I think you have mistakenly updated with me as assignee. The right owner is `Wang Zhike`. So humbly requesting for doing the needful.
Comment 5 Ajit Khaparde 2020-09-17 10:20:17 CEST
Vipin, I asked you because you said you saw a similar issue. Will check with Wang as well. Thanks
Comment 6 Vipin Varghese 2020-09-17 11:10:57 CEST
Ajitm sure no issues. The suggestion was shared on DPDK 17.11. I have not notices any issues from 18.11 LTS onwards.
Comment 7 Vipin Varghese 2020-09-17 11:11:11 CEST
Ajitm sure no issues. The suggestion was shared on DPDK 17.11. I have not notices any issues from 18.11 LTS onwards.
Comment 8 David Marchand 2021-11-23 09:15:56 CET
This problem saw no activity for more than a year and is probably a configuration issue.

Besides, note that OVS dropped pdump support in favor of its own packet capture mechanism.

So closing this bz.
Feel free to reopen if you think there is still an issue.

Note You need to log in before you can comment on or make changes to this bug.