Skip to content

Scapy 2.4.2 uses too much memory when sending packets #1897

@aligh993

Description

@aligh993

Brief description

Scapy 2.4.2 uses too much memory (or misuses memory!) when sending packets. It can easily be verified when you are sending packets in sequence inside a loop. In my testing, sending 1000 packet in Scapy consumes about 1GB of memory. The problem persists in Scapy 2.4.1 and 2.4.2, but Scapy 2.4.0 works fine.

Environment

  • Scapy version: 2.4.2
  • Python version: 3.7.0
  • Operating System: Windows 10

How to reproduce

you can test it by:

from scapy.all import *

for i in range(1000):
	sr1(IP(dst="172.17.41.146")/TCP(), timeout=0.01, verbose=0)

(code edited by gpotter2, to reproduce the issue more accurately)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions