Skip to content
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

Memory leak detected in ovn-controller #3856

Closed
zhangzujian opened this issue Mar 22, 2024 · 0 comments · Fixed by #3873
Closed

Memory leak detected in ovn-controller #3856

zhangzujian opened this issue Mar 22, 2024 · 0 comments · Fixed by #3873

Comments

@zhangzujian
Copy link
Member

zhangzujian commented Mar 22, 2024

Bug Report

Expected Behavior

Actual Behavior

Memory leak detected in ovn-controller.
kubectl-ko-log/kube-ovn-worker/ovn/ovn-controller.valgrind.log.67100
==00:00:05:52.763 67100== 1 bytes in 1 blocks are possibly lost in loss record 3 of 3,106
==00:00:05:52.763 67100==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==00:00:05:52.763 67100==    by 0x4A3DC48: xmalloc__ (util.c:140)
==00:00:05:52.763 67100==    by 0x4A3DCA8: xmemdup (util.c:188)
==00:00:05:52.763 67100==    by 0x13D7F8: ovn_flow_init (ofctrl.c:1624)
==00:00:05:52.763 67100==    by 0x13D7F8: desired_flow_alloc (ofctrl.c:1649)
==00:00:05:52.763 67100==    by 0x140E5D: ofctrl_check_and_add_flow_metered (ofctrl.c:1230)
==00:00:05:52.763 67100==    by 0x140FF2: ofctrl_add_flow_metered (ofctrl.c:1272)
==00:00:05:52.763 67100==    by 0x14101B: ofctrl_add_flow (ofctrl.c:1260)
==00:00:05:52.763 67100==    by 0x160C62: put_local_common_flows (physical.c:925)
==00:00:05:52.763 67100==    by 0x162079: consider_port_binding (physical.c:1452)
==00:00:05:52.763 67100==    by 0x164636: physical_run (physical.c:2288)
==00:00:05:52.763 67100==    by 0x15B19E: en_pflow_output_run (ovn-controller.c:3736)
==00:00:05:52.763 67100==    by 0x494ED12: engine_recompute (inc-proc-eng.c:415)
==00:00:05:52.763 67100== 
==00:00:05:52.763 67100== 1 bytes in 1 blocks are possibly lost in loss record 4 of 3,106
==00:00:05:52.763 67100==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==00:00:05:52.763 67100==    by 0x4A3DC48: xmalloc__ (util.c:140)
==00:00:05:52.763 67100==    by 0x4A3DCA8: xmemdup (util.c:188)
==00:00:05:52.763 67100==    by 0x13D7F8: ovn_flow_init (ofctrl.c:1624)
==00:00:05:52.763 67100==    by 0x13D7F8: desired_flow_alloc (ofctrl.c:1649)
==00:00:05:52.763 67100==    by 0x140E5D: ofctrl_check_and_add_flow_metered (ofctrl.c:1230)
==00:00:05:52.763 67100==    by 0x140FF2: ofctrl_add_flow_metered (ofctrl.c:1272)
==00:00:05:52.763 67100==    by 0x14101B: ofctrl_add_flow (ofctrl.c:1260)
==00:00:05:52.763 67100==    by 0x15FFB4: add_default_drop_flow (physical.c:872)
==00:00:05:52.763 67100==    by 0x164BB2: physical_run (physical.c:2419)
==00:00:05:52.763 67100==    by 0x15B19E: en_pflow_output_run (ovn-controller.c:3736)
==00:00:05:52.763 67100==    by 0x494ED12: engine_recompute (inc-proc-eng.c:415)
==00:00:05:52.763 67100==    by 0x494F27F: engine_run_node (inc-proc-eng.c:491)
==00:00:05:52.763 67100==    by 0x494F27F: engine_run (inc-proc-eng.c:528)
==00:00:05:52.763 67100== 
==00:00:05:52.763 67100== 1 bytes in 1 blocks are possibly lost in loss record 5 of 3,106
==00:00:05:52.763 67100==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==00:00:05:52.763 67100==    by 0x4A3DC48: xmalloc__ (util.c:140)
==00:00:05:52.763 67100==    by 0x4A3DCA8: xmemdup (util.c:188)
==00:00:05:52.763 67100==    by 0x13D7F8: ovn_flow_init (ofctrl.c:1624)
==00:00:05:52.763 67100==    by 0x13D7F8: desired_flow_alloc (ofctrl.c:1649)
==00:00:05:52.763 67100==    by 0x140E5D: ofctrl_check_and_add_flow_metered (ofctrl.c:1230)
==00:00:05:52.763 67100==    by 0x140FF2: ofctrl_add_flow_metered (ofctrl.c:1272)
==00:00:05:52.763 67100==    by 0x14101B: ofctrl_add_flow (ofctrl.c:1260)
==00:00:05:52.763 67100==    by 0x15FFB4: add_default_drop_flow (physical.c:872)
==00:00:05:52.763 67100==    by 0x164E1A: physical_run (physical.c:2496)
==00:00:05:52.763 67100==    by 0x15B19E: en_pflow_output_run (ovn-controller.c:3736)
==00:00:05:52.763 67100==    by 0x494ED12: engine_recompute (inc-proc-eng.c:415)
==00:00:05:52.763 67100==    by 0x494F27F: engine_run_node (inc-proc-eng.c:491)
==00:00:05:52.763 67100==    by 0x494F27F: engine_run (inc-proc-eng.c:528)
==00:00:05:52.763 67100== 
==00:00:05:52.763 67100== 1 bytes in 1 blocks are possibly lost in loss record 6 of 3,106
==00:00:05:52.763 67100==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==00:00:05:52.763 67100==    by 0x4A3DC48: xmalloc__ (util.c:140)
==00:00:05:52.763 67100==    by 0x4A3DCA8: xmemdup (util.c:188)
==00:00:05:52.763 67100==    by 0x13D7F8: ovn_flow_init (ofctrl.c:1624)
==00:00:05:52.763 67100==    by 0x13D7F8: desired_flow_alloc (ofctrl.c:1649)
==00:00:05:52.763 67100==    by 0x140E5D: ofctrl_check_and_add_flow_metered (ofctrl.c:1230)
==00:00:05:52.763 67100==    by 0x140FF2: ofctrl_add_flow_metered (ofctrl.c:1272)
==00:00:05:52.763 67100==    by 0x14101B: ofctrl_add_flow (ofctrl.c:1260)
==00:00:05:52.763 67100==    by 0x15FFB4: add_default_drop_flow (physical.c:872)
==00:00:05:52.763 67100==    by 0x164EFD: physical_run (physical.c:2529)
==00:00:05:52.763 67100==    by 0x15B19E: en_pflow_output_run (ovn-controller.c:3736)
==00:00:05:52.763 67100==    by 0x494ED12: engine_recompute (inc-proc-eng.c:415)
==00:00:05:52.763 67100==    by 0x494F27F: engine_run_node (inc-proc-eng.c:491)
==00:00:05:52.763 67100==    by 0x494F27F: engine_run (inc-proc-eng.c:528)
==00:00:05:52.763 67100== 
==00:00:05:52.763 67100== 1 bytes in 1 blocks are possibly lost in loss record 7 of 3,106
==00:00:05:52.763 67100==    at 0x4848899: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==00:00:05:52.763 67100==    by 0x4A3DC48: xmalloc__ (util.c:140)
==00:00:05:52.763 67100==    by 0x4A3DCA8: xmemdup (util.c:188)
==00:00:05:52.763 67100==    by 0x13D7F8: ovn_flow_init (ofctrl.c:1624)
==00:00:05:52.763 67100==    by 0x13D7F8: desired_flow_alloc (ofctrl.c:1649)
==00:00:05:52.763 67100==    by 0x140E5D: ofctrl_check_and_add_flow_metered (ofctrl.c:1230)
==00:00:05:52.763 67100==    by 0x140FF2: ofctrl_add_flow_metered (ofctrl.c:1272)
==00:00:05:52.763 67100==    by 0x14101B: ofctrl_add_flow (ofctrl.c:1260)
==00:00:05:52.763 67100==    by 0x160C62: put_local_common_flows (physical.c:925)
==00:00:05:52.763 67100==    by 0x161C9C: consider_port_binding (physical.c:1637)
==00:00:05:52.763 67100==    by 0x163E37: physical_eval_port_binding (physical.c:2163)
==00:00:05:52.763 67100==    by 0x1640DC: physical_handle_flows_for_lport (physical.c:2224)
==00:00:05:52.763 67100==    by 0x15AEDA: pflow_output_sb_port_binding_handler (ovn-controller.c:3819)
==00:00:05:52.763 67100== 
...

valgrind-report.txt

Steps to Reproduce the Problem

Additional Info

  • Kubernetes version:

    Output of kubectl version:

    (paste your output here)
    
  • kube-ovn version:

    (paste your output here)
    
  • operation-system/kernel version:

    Output of awk -F '=' '/PRETTY_NAME/ { print $2 }' /etc/os-release:
    Output of uname -r:

    (paste your output here)
    
@zhangzujian zhangzujian added bug Something isn't working ci and removed bug Something isn't working ci labels Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant