On 2/5/25 10:27, Ales Musil wrote:
> When the SB database is disconnected we cannot commit any of the
> MAC bindings. The 'struct mac_binding' remain in the hash map until
> SB is writable again. All mac_binding structures are leaked when
> controller exists before it manages to write them into SB. This
> doesn't cause any issues on its own because the controller is exiting
> anyway, but it can trigger test failure with following leak message:
> 
> Direct leak of 144 byte(s) in 2 object(s) allocated from:
>   0x4c8d13 in malloc (/workspace/ovn-tmp/controller/ovn-controller+0x4c8d13)
>   0x8a5848 in xmalloc__ /workspace/ovn-tmp/ovs/lib/util.c:141:15
>   0x8a5848 in xmalloc /workspace/ovn-tmp/ovs/lib/util.c:176:12
>   0x6577d5 in mac_binding_add /workspace/ovn-tmp/controller/mac-cache.c:167:14
>   0x5db85b in pinctrl_handle_put_mac_binding 
> /workspace/ovn-tmp/controller/pinctrl.c:4720:5
>   0x5a3002 in process_packet_in /workspace/ovn-tmp/controller/pinctrl.c
>   0x5a3002 in pinctrl_recv /workspace/ovn-tmp/controller/pinctrl.c:3872:9
>   0x5a3002 in pinctrl_handler /workspace/ovn-tmp/controller/pinctrl.c:3954:17
>   0x8781ec in ovsthread_wrapper /workspace/ovn-tmp/ovs/lib/ovs-thread.c:429:12
>   0x4c4ecc in asan_thread_start(void*) asan_interceptors.cpp.o

Nit: I'd remove the '/workspace/ovn-tmp/' parts of the paths to make
them shorter and easier to read.

But, regardless, the change looks correct to me.  Thanks!

Acked-by: Ilya Maximets <[email protected]>

BTW, we also seem to have the same issue for FDB hash map not being cleared
before destruction.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to