-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Hi,
i am rewriting autotests from python2.7 to python3+ and have a problem with reading pcap files.
scenario:
- I write pcap in file using tcpdump and stop tcpdump
- I read that pcap by rdpcap (in that step all fine)
- I write new pcap (with same name and overwrite previous pcap) and stop tcpdump
- I try to read new pcap by rdpcap. In that time CPU and memory loading increases to 100%, but there are no errors, program is still working. It seems like it’s in an endless loop.
In this step (in parallel with autotests) i tried to open same pcap manually from python interpreter (same Virtual machine, same python version, same path and pcap file) and read pcap without any problem. But in autotests it reproduces in 100% cases. With python 2.7 and old version scapy same code works stable. What i did wrong? Can you help me?
i've got trace using pdb:
(Pdb) !path
'/tmp/104/test_clear_bgp_data_about_neighbors/br1547080.pcap'
(Pdb) next
> /home/nfware/autotest/automated_tests/aw.py(165)download_and_read_pcap_file()
-> return rdpcap(path)
(Pdb) step
--Call--
> /home/nfware/.local/lib/python3.6/site-packages/scapy/utils.py(829)rdpcap()
-> @conf.commands.register
(Pdb) next
> /home/nfware/.local/lib/python3.6/site-packages/scapy/utils.py(836)rdpcap()
-> with PcapReader(filename) as fdesc:
(Pdb) next
> /home/nfware/.local/lib/python3.6/site-packages/scapy/utils.py(837)rdpcap()
-> return fdesc.read_all(count=count)
(Pdb) next
at this step CPU loading increases to 100%
more detailed trace and pcap in attachment.
scapy (2.4.3rc1)
python 3.6.7
Thanks for help
pcap_and_trace.zip
Metadata
Metadata
Assignees
Labels
No labels