[ovs-dev] Memory leak in 1.4 branch
Zoltan Kiss
zoltan.kiss at citrix.com
Fri Apr 12 22:48:15 UTC 2013
Hi,
I think I've found a memory leak in 1.4 branch. When a userspace rule
sends a packet to the controller, execute_controller_action is called
with clone=true, so send_packet_in_action doesn't free the buffer, and
noone else does that later as well.
It's easy to reproduce with DVSC, you have to install a rule which sends
everything to the controller:
ovs-ofctl add-flow xenbr0 priority=65535,actions=controller
And then trigger it e.g. with MouseZahn:
mz -B [mgmt IP] -d 100m eth0 -t udp sp=3000,dp=1024-65535,iplen=1400
The memory consumption grows steadily. Here is a proposed solution,
please review it. I will reformat it later as a proper patch:
diff -r d44b4f830fd2 ofproto/ofproto-dpif.c
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -2570,6 +2570,8 @@ handle_flow_miss(struct ofproto_dpif *of
: xmemdup(subfacet->actions, subfacet->actions_len));
execute->actions_len = subfacet->actions_len;
execute->packet = packet;
+ } else {
+ ofpbuf_delete(packet);
}
}
Regards,
Zoltan Kiss
More information about the dev
mailing list