liuweireign / dpkt

Automatically exported from code.google.com/p/dpkt
Other
0 stars 0 forks source link

analyzing packet causes memory leak #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open packet with dpkt.pcap.Reader
2. push it into dpkt.ethernet.Ethernet
3. watch Memory be consumed.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
dpkt 1.7, Centos 5.5

Please provide any additional information below.

Original issue reported on code.google.com by kyle.creyts@gmail.com on 20 Jan 2011 at 4:26

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
issue was fixed in August.

Original comment by kyle.creyts@gmail.com on 25 Jan 2011 at 10:56

GoogleCodeExporter commented 9 years ago
What was actually fixed? Python is an interpreted language, and until 2.5, only 
grew in its memory usage (no free'ing of GC'd memory). Let me know if we should 
close this out...

Original comment by dugsong on 25 Jan 2011 at 11:13

GoogleCodeExporter commented 9 years ago
Go ahead and close it.
Without the fix, python would get stuck in an infinite loop where it would 
repeatedly append self.SRE(self.data) to l, and this would cause python's mem 
use to grow to fill all available memory, both physical and swap.
Memory leak was not the proper term.

diff with fix:
1c1
< # $Id: gre.py 30 2007-01-27 03:10:09Z dugsong $
---
> # $Id: gre.py 75 2010-08-03 14:42:19Z jon.oberheide $
73a74
>                 self.data = self.data[len(sre):]
78,79d78
<             skip = sum(map(len, self.sre))
<             self.data = self.data[skip:]

Original comment by kyle.creyts@gmail.com on 25 Jan 2011 at 11:40

GoogleCodeExporter commented 9 years ago
Issue still exists....
Python ver 2.6
Dpkt ver 1.7

Original comment by rrpo...@gmail.com on 3 Nov 2011 at 4:12