[ovs-git] [openvswitch/ovs] 22db48: ofproto-dpif-xlate: Fix leak in learn action.

djoreilly noreply at github.com
Mon Mar 1 20:18:37 UTC 2021


  Branch: refs/heads/branch-2.7
  Home:   https://github.com/openvswitch/ovs
  Commit: 22db4862707ac1a227af1fdafcf5c43b53faff28
      https://github.com/openvswitch/ovs/commit/22db4862707ac1a227af1fdafcf5c43b53faff28
  Author: Darragh O'Reilly <doreilly at suse.com>
  Date:   2021-03-01 (Mon, 01 Mar 2021)

  Changed paths:
    M ofproto/ofproto-dpif-xlate.c

  Log Message:
  -----------
  ofproto-dpif-xlate: Fix leak in learn action.

This is a backport of commit 1bddcb5dc (ofproto-dpif-xlate: Fix
bug that may leak ofproto_flow_mod) from branch-2.8. That commit
won't cherry-pick cleanly onto branch-2.7 as the addition of the
learn limit in 2.8 changed xlate_learn_action() a lot.

Neutron ml2/ovs uses a learn action to learn from tunnels and the
leak can grow to tens of GB after several months.

Valgrind after 10K up calls:

575,680 bytes in 8,995 blocks are definitely lost in loss record 373 of 373
malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
xmalloc (util.c:112)
miniflow_alloc (flow.c:2500)
minimatch_init (match.c:1387)
rule_criteria_init (ofproto.c:4060)
modify_flow_init_strict (ofproto.c:5431)
ofproto_flow_mod_init (ofproto.c:7432)
ofproto_flow_mod_init_for_learn (ofproto.c:4988)
xlate_learn_action (ofproto-dpif-xlate.c:4417)
do_xlate_actions (ofproto-dpif-xlate.c:5359)
xlate_recursively (ofproto-dpif-xlate.c:3453)
xlate_table_action (ofproto-dpif-xlate.c:3520)
xlate_ofpact_resubmit (ofproto-dpif-xlate.c:3810)
do_xlate_actions (ofproto-dpif-xlate.c:5248)
xlate_recursively (ofproto-dpif-xlate.c:3453)
xlate_table_action (ofproto-dpif-xlate.c:3520)
xlate_ofpact_resubmit (ofproto-dpif-xlate.c:3810)
do_xlate_actions (ofproto-dpif-xlate.c:5248)
xlate_actions (ofproto-dpif-xlate.c:5962)
upcall_xlate (ofproto-dpif-upcall.c:1132)
process_upcall (ofproto-dpif-upcall.c:1269)
recv_upcalls.isra.20 (ofproto-dpif-upcall.c:824)
udpif_upcall_handler (ofproto-dpif-upcall.c:746)
ovsthread_wrapper (ovs-thread.c:348)
start_thread (pthread_create.c:333)
clone (clone.S:109

Signed-off-by: Darragh O'Reilly <doreilly at suse.com>
Acked-by: Greg Rose <gvrose8192 at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>




More information about the git mailing list