DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] PMD pcap driver: double free or corruption error
@ 2014-09-08 12:53 Nicolas Pernas Maradei
  0 siblings, 0 replies; only message in thread
From: Nicolas Pernas Maradei @ 2014-09-08 12:53 UTC (permalink / raw)
  To: dev

Hi,

I've been using the PMD pcap driver for a while now. It's very handy for 
testing and running DPDK on systems with no Intel NICs (like my laptop). 
Unfortunately I've found a small issue that's been bothering me a lot. 
It turns out that the PMD pcap driver opens the pcaps/interfaces only at 
init time and close them everytime the port is closed. So if you close 
the port two times in a row you'll get a "double free or corruption" 
error being thrown by libpcap.

You can easily reproduce the error with testpmd doing the following:

sudo  ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 3 
--vdev=eth_pcap0,rx_pcap=../netronome/client/examples/file.pcap,tx_pcap=out.pcap 
-- --port-topology=chained -i

.....

init (0) eth_pcap0
PMD: Initializing pmd_pcap for eth_pcap0
PMD: Creating pcap-backed ethdev on numa socket 0
EAL: Core 3 is ready (tid=e99fc700)
EAL: Core 2 is ready (tid=ea1fd700)
EAL: Core 1 is ready (tid=ea9fe700)
Interactive-mode selected
Configuring Port 0 (socket 0)
Port 0: 00:00:00:01:02:03
Checking link statuses...
Port 0 Link Up - speed 10000 Mbps - full-duplex
Done
testpmd> port stop all
Stopping ports...
Checking link statuses...
Port 0 Link Down
Done
testpmd> port start all
Port 0: 00:00:00:01:02:03
Checking link statuses...
Port 0 Link Up - speed 10000 Mbps - full-duplex
Done
testpmd> port stop all
Stopping ports...
*** Error in `./x86_64-native-linuxapp-gcc/app/testpmd': double free or 
corruption (!prev): 0x00000000015a9020 ***

I have a fix for it that I'm currently testing and will be submitting 
later on this week. Basically I'm storing the config the driver is 
started with (type of streams and pcap/interface names) and re-opening 
them everytime the user starts the port.

Thanks,
Nico.

-- 
Nicolás Pernas Maradei
Software Engineer
Emutex Ltd.
Callan Centre, National Technology Park, Limerick, Ireland
Phone: +353 (0)61 514496 Ext #872, Mobile: +353 (0)86 7907731
Web: www.emutex.com, Email: nico@emutex.com

This email may contain information, which is confidential and/or privileged. The information is intended solely for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents is prohibited. If you have received this electronic transmission in error, please notify the sender by telephone or return email and delete the material from your computer. Emutex Ltd is registered in Ireland, No 256238, at Callan Centre, National Technology Park, Limerick, Ireland.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-08 12:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-08 12:53 [dpdk-dev] PMD pcap driver: double free or corruption error Nicolas Pernas Maradei

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).