-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DDlog: OVN_Southbound.dl and OVN_Northbound.dl are not regenerated if northd/automake.mk is updated #15
Comments
dceara
changed the title
OVN_Southbound.dl and OVN_Northbound.dl are not regenerated if northd/automake.mk is updated
DDlog: OVN_Southbound.dl and OVN_Northbound.dl are not regenerated if northd/automake.mk is updated
Sep 26, 2019
This should be resolved once vmware/differential-datalog#393 is fixed. |
vmware/differential-datalog#393 has been fixed, but we still need to replace those CLI flags with config files in |
ovsrobot
pushed a commit
to ovsrobot/ovn
that referenced
this issue
Feb 16, 2021
In one of the scaled deployments, ovn-controller is asserting with the below stack trace **************** (gdb) bt #0 0x00007fa6aed4970f in raise () from /lib64/libc.so.6 ovn-org#1 0x00007fa6aed33b25 in abort () from /lib64/libc.so.6 ovn-org#2 0x000055d46594a714 in ovs_abort_valist (err_no=err_no@entry=0, format=format@entry=0x55d465a2a190 "%s: assertion %s failed in %s()", args=args@entry=0x7ffd24307ba0) at lib/util.c:419 ovn-org#3 0x000055d465952504 in vlog_abort_valist (module_=<optimized out>, message=0x55d465a2a190 "%s: assertion %s failed in %s()", args=args@entry=0x7ffd24307ba0) at lib/vlog.c:1249 ovn-org#4 0x000055d4659525aa in vlog_abort (module=module@entry=0x55d465ce6880 <this_module>, message=message@entry=0x55d465a2a190 "%s: assertion %s failed in %s()") at lib/vlog.c:1263 ovn-org#5 0x000055d46594a42b in ovs_assert_failure (where=where@entry=0x55d465a05529 "controller/ofctrl.c:1198", function=function@entry=0x55d465a05ca0 <__func__.33798> "flood_remove_flows_for_sb_uuid", condition=condition@entry=0x55d465a05a80 "ovs_list_is_empty(&f->list_node)") at lib/util.c:86 ovn-org#6 0x000055d465877aa2 in flood_remove_flows_for_sb_uuid (flow_table=flow_table@entry=0x55d46688d080, sb_uuid=sb_uuid@entry=0x55d53dbec538, flood_remove_nodes=flood_remove_nodes@entry=0x7ffd24307ed0) at controller/ofctrl.c:1205 ovn-org#7 0x000055d465877c2e in flood_remove_flows_for_sb_uuid (flow_table=flow_table@entry=0x55d46688d080, sb_uuid=sb_uuid@entry=0x55d546553898, flood_remove_nodes=flood_remove_nodes@entry=0x7ffd24307ed0) at controller/ofctrl.c:1230 ovn-org#8 0x000055d465877c2e in flood_remove_flows_for_sb_uuid (flow_table=flow_table@entry=0x55d46688d080, sb_uuid=sb_uuid@entry=0x55d55eafebf0, flood_remove_nodes=flood_remove_nodes@entry=0x7ffd24307ed0) at controller/ofctrl.c:1230 ovn-org#9 0x000055d465877dc2 in ofctrl_flood_remove_flows (flow_table=0x55d46688d080, flood_remove_nodes=flood_remove_nodes@entry=0x7ffd24307ed0) at controller/ofctrl.c:1250 ovn-org#10 0x000055d465872b24 in lflow_handle_changed_ref (ref_type=ref_type@entry=REF_TYPE_PORTGROUP, ref_name=ref_name@entry=0x55d49375a050 "5564_pg_6415729e_58ec_4b8b_bc99_2ceef5c44bac", l_ctx_in=l_ctx_in@entry=0x7ffd24307fd0, l_ctx_out=l_ctx_out@entry=0x7ffd24307f90, changed=changed@entry=0x7ffd24307f8f) at controller/lflow.c:612 ovn-org#11 0x000055d46588f2f8 in _flow_output_resource_ref_handler (node=<optimized out>, data=<optimized out>, ref_type=REF_TYPE_PORTGROUP) at controller/ovn-controller.c:2181 ovn-org#12 0x000055d4658a8163 in engine_compute (recompute_allowed=<optimized out>, node=<optimized out>) at lib/inc-proc-eng.c:306 ovn-org#13 engine_run_node (recompute_allowed=true, node=0x7ffd2430d4b0) at lib/inc-proc-eng.c:352 ovn-org#14 engine_run (recompute_allowed=recompute_allowed@entry=true) at lib/inc-proc-eng.c:377 ovn-org#15 0x000055d46586613d in main (argc=<optimized out>, argv=<optimized out>) at controller/ovn-controller.c:2794 *************** This assertion is seen when a port group gets updated and it is referenced by many logical flows (with conj actions). The function ofctrl_flood_remove_flows(), calls flood_remove_flows_for_sb_uuid() for each sb uuid in the hmap - flood_remove_nodes using HMAP_FOR_EACH (flood_remove_nodes). flood_remove_flows_for_sb_uuid() also takes the hmap 'flood_remove_nodes' as an argument and it inserts few items into it when it has to call itself recursively. When an item is inserted, its possible that the hmap may get expanded. And if this happens, the HMAP_FOR_EACH () skips few entries causing some of the desired flows not getting cleared. Later when ofctrl_add_or_append_flow() is called, there would be multiple 'struct sb_flow_ref' references for the same desired flow. And this causes the above assertion later when the same port group gets updated. This patch fixes this issue by cloning the hmap 'flood_remove_nodes' and using it to iterate the flood remove nodes. Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1928012 CC: Han Zhou <hzhou@ovn.org> CC: Dumitru Ceara <dceara@ovn.org> Signed-off-by: Numan Siddique <numans@ovn.org> Signed-off-by: 0-day Robot <robot@bytheb.org>
ovsrobot
pushed a commit
to ovsrobot/ovn
that referenced
this issue
Feb 24, 2022
Fix it by using shash_destroy_free_data() instead of shash_destroy(). Example of asan log of this memory leak: Direct leak of 232 byte(s) in 29 object(s) allocated from: #0 0x534b0f in malloc (/home/hanzhou/src/ovn/_build_as/controller/ovn-controller+0x534b0f) ovn-org#1 0x73bd4d in xmalloc__ /home/hanzhou/src/ovs/_build/../lib/util.c:137:15 ovn-org#2 0x73bd4d in xmalloc /home/hanzhou/src/ovs/_build/../lib/util.c:172:12 ovn-org#3 0x638c49 in parse_constant_set /home/hanzhou/src/ovn/_build_as/../lib/expr.c:971:14 ovn-org#4 0x64450d in expr_parse_primary /home/hanzhou/src/ovn/_build_as/../lib/expr.c:1390:44 ovn-org#5 0x63aefc in expr_parse_not /home/hanzhou/src/ovn/_build_as/../lib/expr.c:1479:16 ovn-org#6 0x63ac45 in expr_parse__ /home/hanzhou/src/ovn/_build_as/../lib/expr.c:1486:22 ovn-org#7 0x63b500 in expr_parse /home/hanzhou/src/ovn/_build_as/../lib/expr.c:1535:34 ovn-org#8 0x63b500 in expr_parse_string /home/hanzhou/src/ovn/_build_as/../lib/expr.c:1557:25 ovn-org#9 0x598a56 in convert_match_to_expr /home/hanzhou/src/ovn/_build_as/../controller/lflow.c:1240:22 ovn-org#10 0x591c07 in consider_logical_flow__ /home/hanzhou/src/ovn/_build_as/../controller/lflow.c:1407:16 ovn-org#11 0x58d641 in add_logical_flows /home/hanzhou/src/ovn/_build_as/../controller/lflow.c:393:9 ovn-org#12 0x58d641 in lflow_run /home/hanzhou/src/ovn/_build_as/../controller/lflow.c:2444:5 ovn-org#13 0x5f57a3 in en_lflow_output_run /home/hanzhou/src/ovn/_build_as/../controller/ovn-controller.c:2449:5 ovn-org#14 0x65bc04 in engine_recompute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:380:5 ovn-org#15 0x65b2a3 in engine_run_node /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:456:17 ovn-org#16 0x65b2a3 in engine_run /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:493:9 ovn-org#17 0x5ef9c1 in main /home/hanzhou/src/ovn/_build_as/../controller/ovn-controller.c ovn-org#18 0x7f82418691a1 in __libc_start_main (/lib64/libc.so.6+0x281a1) Reported-by: Numan Siddique <numans@ovn.org> Fixes: aa3e4e8 ("lflow: Track reference count of address sets when parsing lflows.") Signed-off-by: Han Zhou <hzhou@ovn.org> Signed-off-by: 0-day Robot <robot@bytheb.org>
hzhou8
added a commit
that referenced
this issue
Feb 24, 2022
Fix it by using shash_destroy_free_data() instead of shash_destroy(). Example of asan log of this memory leak: Direct leak of 232 byte(s) in 29 object(s) allocated from: #0 0x534b0f in malloc (/home/hanzhou/src/ovn/_build_as/controller/ovn-controller+0x534b0f) #1 0x73bd4d in xmalloc__ /home/hanzhou/src/ovs/_build/../lib/util.c:137:15 #2 0x73bd4d in xmalloc /home/hanzhou/src/ovs/_build/../lib/util.c:172:12 #3 0x638c49 in parse_constant_set /home/hanzhou/src/ovn/_build_as/../lib/expr.c:971:14 #4 0x64450d in expr_parse_primary /home/hanzhou/src/ovn/_build_as/../lib/expr.c:1390:44 #5 0x63aefc in expr_parse_not /home/hanzhou/src/ovn/_build_as/../lib/expr.c:1479:16 #6 0x63ac45 in expr_parse__ /home/hanzhou/src/ovn/_build_as/../lib/expr.c:1486:22 #7 0x63b500 in expr_parse /home/hanzhou/src/ovn/_build_as/../lib/expr.c:1535:34 #8 0x63b500 in expr_parse_string /home/hanzhou/src/ovn/_build_as/../lib/expr.c:1557:25 #9 0x598a56 in convert_match_to_expr /home/hanzhou/src/ovn/_build_as/../controller/lflow.c:1240:22 #10 0x591c07 in consider_logical_flow__ /home/hanzhou/src/ovn/_build_as/../controller/lflow.c:1407:16 #11 0x58d641 in add_logical_flows /home/hanzhou/src/ovn/_build_as/../controller/lflow.c:393:9 #12 0x58d641 in lflow_run /home/hanzhou/src/ovn/_build_as/../controller/lflow.c:2444:5 #13 0x5f57a3 in en_lflow_output_run /home/hanzhou/src/ovn/_build_as/../controller/ovn-controller.c:2449:5 #14 0x65bc04 in engine_recompute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:380:5 #15 0x65b2a3 in engine_run_node /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:456:17 #16 0x65b2a3 in engine_run /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:493:9 #17 0x5ef9c1 in main /home/hanzhou/src/ovn/_build_as/../controller/ovn-controller.c #18 0x7f82418691a1 in __libc_start_main (/lib64/libc.so.6+0x281a1) Reported-by: Numan Siddique <numans@ovn.org> Fixes: aa3e4e8 ("lflow: Track reference count of address sets when parsing lflows.") Signed-off-by: Han Zhou <hzhou@ovn.org>
LorenzoBianconi
added a commit
to LorenzoBianconi/ovn
that referenced
this issue
Apr 15, 2022
Avoid the following crash in ovn-trace due to a reject action infinite loop: AddressSanitizer:DEADLYSIGNAL ==569410==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc0a991bc4 (pc 0x000000415081 bp 0x7ffc0a993fa0 sp 0x7ffc0a991b30 T0) #0 0x415081 in trace_actions utilities/ovn-trace.c:2617 ovn-org#1 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#2 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#3 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 ovn-org#4 0x416fcf in trace_actions utilities/ovn-trace.c:2640 ovn-org#5 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#6 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#7 0x41788d in execute_next utilities/ovn-trace.c:2307 ovn-org#8 0x41788d in trace_actions utilities/ovn-trace.c:2644 ovn-org#9 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 ovn-org#10 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 ovn-org#11 0x419671 in execute_reject utilities/ovn-trace.c:2049 ovn-org#12 0x419671 in trace_actions utilities/ovn-trace.c:2860 ovn-org#13 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#14 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#15 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 ovn-org#16 0x416fcf in trace_actions utilities/ovn-trace.c:2640 ovn-org#17 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#18 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#19 0x41788d in execute_next utilities/ovn-trace.c:2307 ovn-org#20 0x41788d in trace_actions utilities/ovn-trace.c:2644 ovn-org#21 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 ovn-org#22 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 ovn-org#23 0x419671 in execute_reject utilities/ovn-trace.c:2049 ovn-org#24 0x419671 in trace_actions utilities/ovn-trace.c:2860 ovn-org#25 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#26 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#27 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 ovn-org#28 0x416fcf in trace_actions utilities/ovn-trace.c:2640 ovn-org#29 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#30 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#31 0x41788d in execute_next utilities/ovn-trace.c:2307 ovn-org#32 0x41788d in trace_actions utilities/ovn-trace.c:2644 ovn-org#33 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 ovn-org#34 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 ovn-org#35 0x419671 in execute_reject utilities/ovn-trace.c:2049 ovn-org#36 0x419671 in trace_actions utilities/ovn-trace.c:2860 ovn-org#37 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#38 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#39 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 ovn-org#40 0x416fcf in trace_actions utilities/ovn-trace.c:2640 ovn-org#41 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#42 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#43 0x41788d in execute_next utilities/ovn-trace.c:2307 .... The issue can be triggered with the following reproducer: $ovn-nbctl ls-add sw $ovn-nbctl lsp-add sw p1 $ovn-nbctl lsp-set-addresses p1 "00:00:00:00:00:02 192.168.0.2" $ovn-nbctl lsp-add sw p2 $ovn-nbctl lsp-set-addresses p2 "00:00:00:00:00:03 192.168.0.3" $ovn-nbctl pg-add pg1 p1 p2 $ovn-nbctl acl-add pg1 to-lport 2003 "inport==@pg1 && ip4 && ip4.src == 192.168.0.0/16 && udp && udp.dst == 9000" allow $ovn-nbctl acl-add pg1 to-lport 2001 "inport==@pg1" reject $ovn-trace 'inport == "p2" && eth.src == 00:00:00:00:00:03 && eth.dst == 00:00:00:00:00:02 && ip.ttl==42 && ip4.src == 192.168.0.3' Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2074537
ovsrobot
pushed a commit
to ovsrobot/ovn
that referenced
this issue
Apr 15, 2022
Avoid the following crash in ovn-trace due to a reject action infinite loop: AddressSanitizer:DEADLYSIGNAL ==569410==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc0a991bc4 (pc 0x000000415081 bp 0x7ffc0a993fa0 sp 0x7ffc0a991b30 T0) #0 0x415081 in trace_actions utilities/ovn-trace.c:2617 ovn-org#1 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#2 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#3 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 ovn-org#4 0x416fcf in trace_actions utilities/ovn-trace.c:2640 ovn-org#5 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#6 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#7 0x41788d in execute_next utilities/ovn-trace.c:2307 ovn-org#8 0x41788d in trace_actions utilities/ovn-trace.c:2644 ovn-org#9 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 ovn-org#10 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 ovn-org#11 0x419671 in execute_reject utilities/ovn-trace.c:2049 ovn-org#12 0x419671 in trace_actions utilities/ovn-trace.c:2860 ovn-org#13 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#14 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#15 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 ovn-org#16 0x416fcf in trace_actions utilities/ovn-trace.c:2640 ovn-org#17 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#18 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#19 0x41788d in execute_next utilities/ovn-trace.c:2307 ovn-org#20 0x41788d in trace_actions utilities/ovn-trace.c:2644 ovn-org#21 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 ovn-org#22 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 ovn-org#23 0x419671 in execute_reject utilities/ovn-trace.c:2049 ovn-org#24 0x419671 in trace_actions utilities/ovn-trace.c:2860 ovn-org#25 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#26 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#27 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 ovn-org#28 0x416fcf in trace_actions utilities/ovn-trace.c:2640 ovn-org#29 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#30 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#31 0x41788d in execute_next utilities/ovn-trace.c:2307 ovn-org#32 0x41788d in trace_actions utilities/ovn-trace.c:2644 ovn-org#33 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 ovn-org#34 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 ovn-org#35 0x419671 in execute_reject utilities/ovn-trace.c:2049 ovn-org#36 0x419671 in trace_actions utilities/ovn-trace.c:2860 ovn-org#37 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#38 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#39 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 ovn-org#40 0x416fcf in trace_actions utilities/ovn-trace.c:2640 ovn-org#41 0x41d878 in trace_actions utilities/ovn-trace.c:2622 ovn-org#42 0x41d878 in trace__ utilities/ovn-trace.c:3007 ovn-org#43 0x41788d in execute_next utilities/ovn-trace.c:2307 .... The issue can be triggered with the following reproducer: $ovn-nbctl ls-add sw $ovn-nbctl lsp-add sw p1 $ovn-nbctl lsp-set-addresses p1 "00:00:00:00:00:02 192.168.0.2" $ovn-nbctl lsp-add sw p2 $ovn-nbctl lsp-set-addresses p2 "00:00:00:00:00:03 192.168.0.3" $ovn-nbctl pg-add pg1 p1 p2 $ovn-nbctl acl-add pg1 to-lport 2003 "inport==@pg1 && ip4 && ip4.src == 192.168.0.0/16 && udp && udp.dst == 9000" allow $ovn-nbctl acl-add pg1 to-lport 2001 "inport==@pg1" reject $ovn-trace 'inport == "p2" && eth.src == 00:00:00:00:00:03 && eth.dst == 00:00:00:00:00:02 && ip.ttl==42 && ip4.src == 192.168.0.3' Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2074537 Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: 0-day Robot <robot@bytheb.org>
putnopvut
pushed a commit
that referenced
this issue
May 10, 2022
Avoid the following crash in ovn-trace due to a reject action infinite loop: AddressSanitizer:DEADLYSIGNAL ==569410==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc0a991bc4 (pc 0x000000415081 bp 0x7ffc0a993fa0 sp 0x7ffc0a991b30 T0) #0 0x415081 in trace_actions utilities/ovn-trace.c:2617 #1 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #2 0x41d878 in trace__ utilities/ovn-trace.c:3007 #3 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #4 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #5 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #6 0x41d878 in trace__ utilities/ovn-trace.c:3007 #7 0x41788d in execute_next utilities/ovn-trace.c:2307 #8 0x41788d in trace_actions utilities/ovn-trace.c:2644 #9 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 #10 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 #11 0x419671 in execute_reject utilities/ovn-trace.c:2049 #12 0x419671 in trace_actions utilities/ovn-trace.c:2860 #13 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #14 0x41d878 in trace__ utilities/ovn-trace.c:3007 #15 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #16 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #17 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #18 0x41d878 in trace__ utilities/ovn-trace.c:3007 #19 0x41788d in execute_next utilities/ovn-trace.c:2307 #20 0x41788d in trace_actions utilities/ovn-trace.c:2644 #21 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 #22 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 #23 0x419671 in execute_reject utilities/ovn-trace.c:2049 #24 0x419671 in trace_actions utilities/ovn-trace.c:2860 #25 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #26 0x41d878 in trace__ utilities/ovn-trace.c:3007 #27 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #28 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #29 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #30 0x41d878 in trace__ utilities/ovn-trace.c:3007 #31 0x41788d in execute_next utilities/ovn-trace.c:2307 #32 0x41788d in trace_actions utilities/ovn-trace.c:2644 #33 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 #34 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 #35 0x419671 in execute_reject utilities/ovn-trace.c:2049 #36 0x419671 in trace_actions utilities/ovn-trace.c:2860 #37 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #38 0x41d878 in trace__ utilities/ovn-trace.c:3007 #39 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #40 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #41 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #42 0x41d878 in trace__ utilities/ovn-trace.c:3007 #43 0x41788d in execute_next utilities/ovn-trace.c:2307 .... The issue can be triggered with the following reproducer: $ovn-nbctl ls-add sw $ovn-nbctl lsp-add sw p1 $ovn-nbctl lsp-set-addresses p1 "00:00:00:00:00:02 192.168.0.2" $ovn-nbctl lsp-add sw p2 $ovn-nbctl lsp-set-addresses p2 "00:00:00:00:00:03 192.168.0.3" $ovn-nbctl pg-add pg1 p1 p2 $ovn-nbctl acl-add pg1 to-lport 2003 "inport==@pg1 && ip4 && ip4.src == 192.168.0.0/16 && udp && udp.dst == 9000" allow $ovn-nbctl acl-add pg1 to-lport 2001 "inport==@pg1" reject $ovn-trace 'inport == "p2" && eth.src == 00:00:00:00:00:03 && eth.dst == 00:00:00:00:00:02 && ip.ttl==42 && ip4.src == 192.168.0.3' Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2074537 Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Mark Michelson <mmichels@redhat.com>
putnopvut
pushed a commit
that referenced
this issue
May 10, 2022
Avoid the following crash in ovn-trace due to a reject action infinite loop: AddressSanitizer:DEADLYSIGNAL ==569410==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc0a991bc4 (pc 0x000000415081 bp 0x7ffc0a993fa0 sp 0x7ffc0a991b30 T0) #0 0x415081 in trace_actions utilities/ovn-trace.c:2617 #1 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #2 0x41d878 in trace__ utilities/ovn-trace.c:3007 #3 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #4 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #5 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #6 0x41d878 in trace__ utilities/ovn-trace.c:3007 #7 0x41788d in execute_next utilities/ovn-trace.c:2307 #8 0x41788d in trace_actions utilities/ovn-trace.c:2644 #9 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 #10 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 #11 0x419671 in execute_reject utilities/ovn-trace.c:2049 #12 0x419671 in trace_actions utilities/ovn-trace.c:2860 #13 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #14 0x41d878 in trace__ utilities/ovn-trace.c:3007 #15 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #16 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #17 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #18 0x41d878 in trace__ utilities/ovn-trace.c:3007 #19 0x41788d in execute_next utilities/ovn-trace.c:2307 #20 0x41788d in trace_actions utilities/ovn-trace.c:2644 #21 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 #22 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 #23 0x419671 in execute_reject utilities/ovn-trace.c:2049 #24 0x419671 in trace_actions utilities/ovn-trace.c:2860 #25 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #26 0x41d878 in trace__ utilities/ovn-trace.c:3007 #27 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #28 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #29 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #30 0x41d878 in trace__ utilities/ovn-trace.c:3007 #31 0x41788d in execute_next utilities/ovn-trace.c:2307 #32 0x41788d in trace_actions utilities/ovn-trace.c:2644 #33 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 #34 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 #35 0x419671 in execute_reject utilities/ovn-trace.c:2049 #36 0x419671 in trace_actions utilities/ovn-trace.c:2860 #37 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #38 0x41d878 in trace__ utilities/ovn-trace.c:3007 #39 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #40 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #41 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #42 0x41d878 in trace__ utilities/ovn-trace.c:3007 #43 0x41788d in execute_next utilities/ovn-trace.c:2307 .... The issue can be triggered with the following reproducer: $ovn-nbctl ls-add sw $ovn-nbctl lsp-add sw p1 $ovn-nbctl lsp-set-addresses p1 "00:00:00:00:00:02 192.168.0.2" $ovn-nbctl lsp-add sw p2 $ovn-nbctl lsp-set-addresses p2 "00:00:00:00:00:03 192.168.0.3" $ovn-nbctl pg-add pg1 p1 p2 $ovn-nbctl acl-add pg1 to-lport 2003 "inport==@pg1 && ip4 && ip4.src == 192.168.0.0/16 && udp && udp.dst == 9000" allow $ovn-nbctl acl-add pg1 to-lport 2001 "inport==@pg1" reject $ovn-trace 'inport == "p2" && eth.src == 00:00:00:00:00:03 && eth.dst == 00:00:00:00:00:02 && ip.ttl==42 && ip4.src == 192.168.0.3' Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2074537 Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Mark Michelson <mmichels@redhat.com>
putnopvut
pushed a commit
that referenced
this issue
May 10, 2022
Avoid the following crash in ovn-trace due to a reject action infinite loop: AddressSanitizer:DEADLYSIGNAL ==569410==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc0a991bc4 (pc 0x000000415081 bp 0x7ffc0a993fa0 sp 0x7ffc0a991b30 T0) #0 0x415081 in trace_actions utilities/ovn-trace.c:2617 #1 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #2 0x41d878 in trace__ utilities/ovn-trace.c:3007 #3 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #4 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #5 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #6 0x41d878 in trace__ utilities/ovn-trace.c:3007 #7 0x41788d in execute_next utilities/ovn-trace.c:2307 #8 0x41788d in trace_actions utilities/ovn-trace.c:2644 #9 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 #10 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 #11 0x419671 in execute_reject utilities/ovn-trace.c:2049 #12 0x419671 in trace_actions utilities/ovn-trace.c:2860 #13 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #14 0x41d878 in trace__ utilities/ovn-trace.c:3007 #15 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #16 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #17 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #18 0x41d878 in trace__ utilities/ovn-trace.c:3007 #19 0x41788d in execute_next utilities/ovn-trace.c:2307 #20 0x41788d in trace_actions utilities/ovn-trace.c:2644 #21 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 #22 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 #23 0x419671 in execute_reject utilities/ovn-trace.c:2049 #24 0x419671 in trace_actions utilities/ovn-trace.c:2860 #25 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #26 0x41d878 in trace__ utilities/ovn-trace.c:3007 #27 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #28 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #29 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #30 0x41d878 in trace__ utilities/ovn-trace.c:3007 #31 0x41788d in execute_next utilities/ovn-trace.c:2307 #32 0x41788d in trace_actions utilities/ovn-trace.c:2644 #33 0x41a7c0 in trace_actions utilities/ovn-trace.c:2622 #34 0x41a7c0 in execute_sctp4_abort utilities/ovn-trace.c:1985 #35 0x419671 in execute_reject utilities/ovn-trace.c:2049 #36 0x419671 in trace_actions utilities/ovn-trace.c:2860 #37 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #38 0x41d878 in trace__ utilities/ovn-trace.c:3007 #39 0x41e3a8 in execute_output utilities/ovn-trace.c:1700 #40 0x416fcf in trace_actions utilities/ovn-trace.c:2640 #41 0x41d878 in trace_actions utilities/ovn-trace.c:2622 #42 0x41d878 in trace__ utilities/ovn-trace.c:3007 #43 0x41788d in execute_next utilities/ovn-trace.c:2307 .... The issue can be triggered with the following reproducer: $ovn-nbctl ls-add sw $ovn-nbctl lsp-add sw p1 $ovn-nbctl lsp-set-addresses p1 "00:00:00:00:00:02 192.168.0.2" $ovn-nbctl lsp-add sw p2 $ovn-nbctl lsp-set-addresses p2 "00:00:00:00:00:03 192.168.0.3" $ovn-nbctl pg-add pg1 p1 p2 $ovn-nbctl acl-add pg1 to-lport 2003 "inport==@pg1 && ip4 && ip4.src == 192.168.0.0/16 && udp && udp.dst == 9000" allow $ovn-nbctl acl-add pg1 to-lport 2001 "inport==@pg1" reject $ovn-trace 'inport == "p2" && eth.src == 00:00:00:00:00:03 && eth.dst == 00:00:00:00:00:02 && ip.ttl==42 && ip4.src == 192.168.0.3' Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2074537 Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Acked-by: Mark Michelson <mmichels@redhat.com> Signed-off-by: Mark Michelson <mmichels@redhat.com>
ovsrobot
pushed a commit
to ovsrobot/ovn
that referenced
this issue
Aug 19, 2022
Fix the problem introduced by commit e52c245, reported by ASAN for test case: "options:activation-strategy for logical port" ==1480622==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61100000c7d0 at pc 0x0000004fbd91 bp 0x7ffec4244630 sp 0x7ffec4243de0 READ of size 168 at 0x61100000c7d0 thread T0 #0 0x4fbd90 in __interceptor_memcpy.part.0 (/home/hanzhou/src/ovn/_build_as/controller/ovn-controller+0x4fbd90) ovn-org#1 0x73457f in ofpbuf_put /home/hanzhou/src/ovs/_build/../lib/ofpbuf.c:431:5 ovn-org#2 0x73457f in ofpbuf_put /home/hanzhou/src/ovs/_build/../lib/ofpbuf.c:424:1 ovn-org#3 0x72ba29 in ofpprop_put /home/hanzhou/src/ovs/_build/../lib/ofp-prop.c:294:5 ovn-org#4 0x7046e7 in encode_CONTROLLER /home/hanzhou/src/ovs/_build/../lib/ofp-actions.c:914:13 ovn-org#5 0x7046e7 in encode_ofpact /home/hanzhou/src/ovs/_build/../lib/ofp-actions.c:8890:9 ovn-org#6 0x705878 in ofpacts_put_openflow_instructions /home/hanzhou/src/ovs/_build/../lib/ofp-actions.c:8943:17 ovn-org#7 0x716287 in ofputil_encode_flow_mod /home/hanzhou/src/ovs/_build/../lib/ofp-flow.c:426:9 ovn-org#8 0x5c5978 in encode_flow_mod /home/hanzhou/src/ovn/_build_as/../controller/ofctrl.c:1893:12 ovn-org#9 0x5c5978 in add_flow_mod /home/hanzhou/src/ovn/_build_as/../controller/ofctrl.c:1912:26 ovn-org#10 0x5c5978 in installed_flow_add /home/hanzhou/src/ovn/_build_as/../controller/ofctrl.c:2254:5 ovn-org#11 0x5bfd62 in update_installed_flows_by_track /home/hanzhou/src/ovn/_build_as/../controller/ofctrl.c:2484:17 ovn-org#12 0x5bc5b9 in ofctrl_put /home/hanzhou/src/ovn/_build_as/../controller/ofctrl.c:2715:13 ovn-org#13 0x600e97 in main /home/hanzhou/src/ovn/_build_as/../controller/ovn-controller.c:4186:25 ovn-org#14 0x7f7ae80ce1a1 in __libc_start_main (/lib64/libc.so.6+0x281a1) ovn-org#15 0x49432d in _start (/home/hanzhou/src/ovn/_build_as/controller/ovn-controller+0x49432d) Fixes: e52c245 ("physical.c: Fix bug of wrong use in vm migration") Signed-off-by: Han Zhou <hzhou@ovn.org> Signed-off-by: 0-day Robot <robot@bytheb.org>
hzhou8
added a commit
to hzhou8/ovn
that referenced
this issue
Jun 29, 2023
…eletion. When multiple LSP deletions are handled in incremental processing, if it hits a LSP that can't be incrementally processed after incrementally processing some LSP deletions, it falls back to recompute without destroying the ovn_port objects that are already handled in the handler, resulting in memory leaks. See example below, which is detected by the new test case added by this patch when running with address sanitizer. ======================= Indirect leak of 936 byte(s) in 3 object(s) allocated from: #0 0x55bce7 in calloc (/home/hanzhou/src/ovn/_build_as/northd/ovn-northd+0x55bce7) #1 0x773f4e in xcalloc__ /home/hanzhou/src/ovs/_build/../lib/util.c:121:31 #2 0x773f4e in xzalloc__ /home/hanzhou/src/ovs/_build/../lib/util.c:131:12 #3 0x773f4e in xzalloc /home/hanzhou/src/ovs/_build/../lib/util.c:165:12 #4 0x60106c in en_northd_run /home/hanzhou/src/ovn/_build_as/../northd/en-northd.c:137:5 ovn-org#5 0x61c6a8 in engine_recompute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:415:5 ovn-org#6 0x61bee0 in engine_compute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:454:17 ovn-org#7 0x61bee0 in engine_run_node /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:503:14 ovn-org#8 0x61bee0 in engine_run /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:528:9 ovn-org#9 0x605e23 in inc_proc_northd_run /home/hanzhou/src/ovn/_build_as/../northd/inc-proc-northd.c:317:9 ovn-org#10 0x5fe43b in main /home/hanzhou/src/ovn/_build_as/../northd/ovn-northd.c:934:33 ovn-org#11 0x7f473933c1a1 in __libc_start_main (/lib64/libc.so.6+0x281a1) Indirect leak of 204 byte(s) in 3 object(s) allocated from: #0 0x55bea8 in realloc (/home/hanzhou/src/ovn/_build_as/northd/ovn-northd+0x55bea8) #1 0x773c7d in xrealloc__ /home/hanzhou/src/ovs/_build/../lib/util.c:147:9 #2 0x773c7d in xrealloc /home/hanzhou/src/ovs/_build/../lib/util.c:179:12 #3 0x614bd4 in extract_addresses /home/hanzhou/src/ovn/_build_as/../lib/ovn-util.c:228:12 #4 0x614bd4 in extract_lsp_addresses /home/hanzhou/src/ovn/_build_as/../lib/ovn-util.c:243:20 ovn-org#5 0x5c8d90 in parse_lsp_addrs /home/hanzhou/src/ovn/_build_as/../northd/northd.c:2468:21 ovn-org#6 0x5b2ebf in join_logical_ports /home/hanzhou/src/ovn/_build_as/../northd/northd.c:2594:13 ovn-org#7 0x5b2ebf in build_ports /home/hanzhou/src/ovn/_build_as/../northd/northd.c:4711:5 ovn-org#8 0x5b2ebf in ovnnb_db_run /home/hanzhou/src/ovn/_build_as/../northd/northd.c:17376:5 ovn-org#9 0x60106c in en_northd_run /home/hanzhou/src/ovn/_build_as/../northd/en-northd.c:137:5 ovn-org#10 0x61c6a8 in engine_recompute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:415:5 ovn-org#11 0x61bee0 in engine_compute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:454:17 ovn-org#12 0x61bee0 in engine_run_node /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:503:14 ovn-org#13 0x61bee0 in engine_run /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:528:9 ovn-org#14 0x605e23 in inc_proc_northd_run /home/hanzhou/src/ovn/_build_as/../northd/inc-proc-northd.c:317:9 ovn-org#15 0x5fe43b in main /home/hanzhou/src/ovn/_build_as/../northd/ovn-northd.c:934:33 ovn-org#16 0x7f473933c1a1 in __libc_start_main (/lib64/libc.so.6+0x281a1) ... Fixes: b337750 ("northd: Incremental processing of VIF changes in 'northd' node.") Reported-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Han Zhou <hzhou@ovn.org>
ovsrobot
pushed a commit
to ovsrobot/ovn
that referenced
this issue
Jun 29, 2023
…eletion. When multiple LSP deletions are handled in incremental processing, if it hits a LSP that can't be incrementally processed after incrementally processing some LSP deletions, it falls back to recompute without destroying the ovn_port objects that are already handled in the handler, resulting in memory leaks. See example below, which is detected by the new test case added by this patch when running with address sanitizer. ======================= Indirect leak of 936 byte(s) in 3 object(s) allocated from: #0 0x55bce7 in calloc (/home/hanzhou/src/ovn/_build_as/northd/ovn-northd+0x55bce7) ovn-org#1 0x773f4e in xcalloc__ /home/hanzhou/src/ovs/_build/../lib/util.c:121:31 ovn-org#2 0x773f4e in xzalloc__ /home/hanzhou/src/ovs/_build/../lib/util.c:131:12 ovn-org#3 0x773f4e in xzalloc /home/hanzhou/src/ovs/_build/../lib/util.c:165:12 ovn-org#4 0x60106c in en_northd_run /home/hanzhou/src/ovn/_build_as/../northd/en-northd.c:137:5 ovn-org#5 0x61c6a8 in engine_recompute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:415:5 ovn-org#6 0x61bee0 in engine_compute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:454:17 ovn-org#7 0x61bee0 in engine_run_node /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:503:14 ovn-org#8 0x61bee0 in engine_run /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:528:9 ovn-org#9 0x605e23 in inc_proc_northd_run /home/hanzhou/src/ovn/_build_as/../northd/inc-proc-northd.c:317:9 ovn-org#10 0x5fe43b in main /home/hanzhou/src/ovn/_build_as/../northd/ovn-northd.c:934:33 ovn-org#11 0x7f473933c1a1 in __libc_start_main (/lib64/libc.so.6+0x281a1) Indirect leak of 204 byte(s) in 3 object(s) allocated from: #0 0x55bea8 in realloc (/home/hanzhou/src/ovn/_build_as/northd/ovn-northd+0x55bea8) ovn-org#1 0x773c7d in xrealloc__ /home/hanzhou/src/ovs/_build/../lib/util.c:147:9 ovn-org#2 0x773c7d in xrealloc /home/hanzhou/src/ovs/_build/../lib/util.c:179:12 ovn-org#3 0x614bd4 in extract_addresses /home/hanzhou/src/ovn/_build_as/../lib/ovn-util.c:228:12 ovn-org#4 0x614bd4 in extract_lsp_addresses /home/hanzhou/src/ovn/_build_as/../lib/ovn-util.c:243:20 ovn-org#5 0x5c8d90 in parse_lsp_addrs /home/hanzhou/src/ovn/_build_as/../northd/northd.c:2468:21 ovn-org#6 0x5b2ebf in join_logical_ports /home/hanzhou/src/ovn/_build_as/../northd/northd.c:2594:13 ovn-org#7 0x5b2ebf in build_ports /home/hanzhou/src/ovn/_build_as/../northd/northd.c:4711:5 ovn-org#8 0x5b2ebf in ovnnb_db_run /home/hanzhou/src/ovn/_build_as/../northd/northd.c:17376:5 ovn-org#9 0x60106c in en_northd_run /home/hanzhou/src/ovn/_build_as/../northd/en-northd.c:137:5 ovn-org#10 0x61c6a8 in engine_recompute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:415:5 ovn-org#11 0x61bee0 in engine_compute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:454:17 ovn-org#12 0x61bee0 in engine_run_node /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:503:14 ovn-org#13 0x61bee0 in engine_run /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:528:9 ovn-org#14 0x605e23 in inc_proc_northd_run /home/hanzhou/src/ovn/_build_as/../northd/inc-proc-northd.c:317:9 ovn-org#15 0x5fe43b in main /home/hanzhou/src/ovn/_build_as/../northd/ovn-northd.c:934:33 ovn-org#16 0x7f473933c1a1 in __libc_start_main (/lib64/libc.so.6+0x281a1) ... Fixes: b337750 ("northd: Incremental processing of VIF changes in 'northd' node.") Reported-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Han Zhou <hzhou@ovn.org> Signed-off-by: 0-day Robot <robot@bytheb.org>
hzhou8
added a commit
that referenced
this issue
Jun 30, 2023
…eletion. When multiple LSP deletions are handled in incremental processing, if it hits a LSP that can't be incrementally processed after incrementally processing some LSP deletions, it falls back to recompute without destroying the ovn_port objects that are already handled in the handler, resulting in memory leaks. See example below, which is detected by the new test case added by this patch when running with address sanitizer. ======================= Indirect leak of 936 byte(s) in 3 object(s) allocated from: #0 0x55bce7 in calloc (/home/hanzhou/src/ovn/_build_as/northd/ovn-northd+0x55bce7) #1 0x773f4e in xcalloc__ /home/hanzhou/src/ovs/_build/../lib/util.c:121:31 #2 0x773f4e in xzalloc__ /home/hanzhou/src/ovs/_build/../lib/util.c:131:12 #3 0x773f4e in xzalloc /home/hanzhou/src/ovs/_build/../lib/util.c:165:12 #4 0x60106c in en_northd_run /home/hanzhou/src/ovn/_build_as/../northd/en-northd.c:137:5 #5 0x61c6a8 in engine_recompute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:415:5 #6 0x61bee0 in engine_compute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:454:17 #7 0x61bee0 in engine_run_node /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:503:14 #8 0x61bee0 in engine_run /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:528:9 #9 0x605e23 in inc_proc_northd_run /home/hanzhou/src/ovn/_build_as/../northd/inc-proc-northd.c:317:9 #10 0x5fe43b in main /home/hanzhou/src/ovn/_build_as/../northd/ovn-northd.c:934:33 #11 0x7f473933c1a1 in __libc_start_main (/lib64/libc.so.6+0x281a1) Indirect leak of 204 byte(s) in 3 object(s) allocated from: #0 0x55bea8 in realloc (/home/hanzhou/src/ovn/_build_as/northd/ovn-northd+0x55bea8) #1 0x773c7d in xrealloc__ /home/hanzhou/src/ovs/_build/../lib/util.c:147:9 #2 0x773c7d in xrealloc /home/hanzhou/src/ovs/_build/../lib/util.c:179:12 #3 0x614bd4 in extract_addresses /home/hanzhou/src/ovn/_build_as/../lib/ovn-util.c:228:12 #4 0x614bd4 in extract_lsp_addresses /home/hanzhou/src/ovn/_build_as/../lib/ovn-util.c:243:20 #5 0x5c8d90 in parse_lsp_addrs /home/hanzhou/src/ovn/_build_as/../northd/northd.c:2468:21 #6 0x5b2ebf in join_logical_ports /home/hanzhou/src/ovn/_build_as/../northd/northd.c:2594:13 #7 0x5b2ebf in build_ports /home/hanzhou/src/ovn/_build_as/../northd/northd.c:4711:5 #8 0x5b2ebf in ovnnb_db_run /home/hanzhou/src/ovn/_build_as/../northd/northd.c:17376:5 #9 0x60106c in en_northd_run /home/hanzhou/src/ovn/_build_as/../northd/en-northd.c:137:5 #10 0x61c6a8 in engine_recompute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:415:5 #11 0x61bee0 in engine_compute /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:454:17 #12 0x61bee0 in engine_run_node /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:503:14 #13 0x61bee0 in engine_run /home/hanzhou/src/ovn/_build_as/../lib/inc-proc-eng.c:528:9 #14 0x605e23 in inc_proc_northd_run /home/hanzhou/src/ovn/_build_as/../northd/inc-proc-northd.c:317:9 #15 0x5fe43b in main /home/hanzhou/src/ovn/_build_as/../northd/ovn-northd.c:934:33 #16 0x7f473933c1a1 in __libc_start_main (/lib64/libc.so.6+0x281a1) ... Fixes: b337750 ("northd: Incremental processing of VIF changes in 'northd' node.") Reported-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Han Zhou <hzhou@ovn.org> Acked-by: Dumitru Ceara <dceara@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example, when adding a new output table to the
ovsdb2ddlog
command in the makefile, the target is not automatically re-executed soOVN_Northbound.dl
andOVN_Southbound.dl
are not updated. The current workaround is totouch ovn-sb.vsschema
andtouch ovn-nb.vsschema
.The text was updated successfully, but these errors were encountered: