VPP add verifications to not allow the user to configure low values for main-heap-size.
To reproduce the bug
set system option kernel memory default-hugepage-size '2M' set system option kernel memory hugepage-size 2M hugepage-count '2048' set vpp settings interface eth1 driver 'dpdk' set vpp settings memory default-hugepage-size '2M' set vpp settings unix poll-sleep-usec '222' set vpp settings memory main-heap-size 53M commit set vpp settings memory main-heap-size 52M commit
commit fails:
vyos@r14# set vpp settings memory main-heap-size 52M [edit] vyos@r14# commit [ vpp ] An error occurred: [Errno 2] Cannot connect to VPP API. VPP service will be restarted with the previous configuration [[vpp]] failed Commit failed
Logs
Aug 06 17:43:19 r14 vpp[29620]: received signal SIGABRT, PC 0x7fae2cf79eec Aug 06 17:43:19 r14 vpp[29620]: Code: 89 c5 f7 dd 3d 00 f0 ff ff b8 00 00 00 00 0f 47 c5 e9 7a ff Aug 06 17:43:19 r14 vpp[29620]: #0 0x00007fae2cf79eec pthread_key_delete + 0x14c Aug 06 17:43:19 r14 vpp[29620]: from /lib/x86_64-linux-gnu/libc.so.6 Aug 06 17:43:19 r14 vpp[29620]: #1 0x00007fae2cf2afb2 gsignal + 0x12 Aug 06 17:43:19 r14 vpp[29620]: from /lib/x86_64-linux-gnu/libc.so.6 Aug 06 17:43:19 r14 vpp[29620]: #2 0x00007fae2cf15472 abort + 0xd3 Aug 06 17:43:19 r14 vpp[29620]: from /lib/x86_64-linux-gnu/libc.so.6 Aug 06 17:43:19 r14 vpp[29620]: #3 0x000055c77bee9e33 os_panic + 0x13 Aug 06 17:43:19 r14 vpp[29620]: from /usr/bin/vpp Aug 06 17:43:19 r14 vpp[29620]: #4 0x00007fae2d125605 clib_mem_heap_realloc_aligned + 0x1e5 Aug 06 17:43:19 r14 vpp[29620]: from /lib/x86_64-linux-gnu/libvppinfra.so.24.10.0 Aug 06 17:43:19 r14 vpp[29620]: #5 0x00007fae2d15e9fd _vec_realloc_internal + 0x8d Aug 06 17:43:19 r14 vpp[29620]: from /lib/x86_64-linux-gnu/libvppinfra.so.24.10.0 Aug 06 17:43:19 r14 vpp[29620]: #6 0x00007fae2d2d3fc5 vl_msg_api_config + 0x2c5 Aug 06 17:43:19 r14 vpp[29620]: from /lib/x86_64-linux-gnu/libvlibapi.so.24.10.0 Aug 06 17:43:19 r14 vpp[29620]: #7 0x00007fae2da7ce48 format_bier_bift_id + 0x3378 Aug 06 17:43:19 r14 vpp[29620]: from /lib/x86_64-linux-gnu/libvnet.so.24.10.0 Aug 06 17:43:19 r14 vpp[29620]: #8 0x00007fae2d1ab62f vlib_call_init_exit_functions + 0x8f Aug 06 17:43:19 r14 vpp[29620]: from /lib/x86_64-linux-gnu/libvlib.so.24.10.0 Aug 06 17:43:19 r14 vpp[29620]: #9 0x00007fae2e51bba3 vat_builtin_main_init + 0x3c3 Aug 06 17:43:19 r14 vpp[29620]: from /lib/x86_64-linux-gnu/libvlibmemory.so.24.10.0 Aug 06 17:43:19 r14 vpp[29620]: #10 0x00007fae2d1af526 vlib_log_init + 0x886 Aug 06 17:43:19 r14 vpp[29620]: from /lib/x86_64-linux-gnu/libvlib.so.24.10.0 Aug 06 17:43:19 r14 vpp[29620]: #11 0x00007fae2d1692bc clib_calljmp + 0x18 Aug 06 17:43:19 r14 vpp[29620]: from /lib/x86_64-linux-gnu/libvppinfra.so.24.10.0 Aug 06 17:43:19 r14 systemd[1]: vpp.service: Main process exited, code=killed, status=6/ABRT Aug 06 17:43:19 r14 systemd[1]: vpp.service: Failed with result 'signal'. Aug 06 17:43:19 r14 systemd[1]: vpp.service: Triggering OnFailure= dependencies. Aug 06 17:43:19 r14 systemd[1]: Starting Restart VPP on failure... Aug 06 17:43:19 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:20 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:20 r14 python3[29623]: Traceback (most recent call last): Aug 06 17:43:20 r14 python3[29623]: File "/usr/libexec/vyos/reset_section.py", line 116, in <module> Aug 06 17:43:20 r14 python3[29623]: session.commit() Aug 06 17:43:20 r14 python3[29623]: File "/usr/lib/python3/dist-packages/vyos/configsession.py", line 305, in commit Aug 06 17:43:20 r14 python3[29623]: out = self.__run_command([COMMIT]) Aug 06 17:43:20 r14 python3[29623]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Aug 06 17:43:20 r14 python3[29623]: File "/usr/lib/python3/dist-packages/vyos/configsession.py", line 235, in __run_command Aug 06 17:43:20 r14 python3[29623]: raise ConfigSessionError(output) Aug 06 17:43:20 r14 python3[29623]: vyos.configsession.ConfigSessionError: Configuration system temporarily locked due to another commit in progress Aug 06 17:43:20 r14 systemd[1]: vpp-failure-handler.service: Main process exited, code=exited, status=1/FAILURE Aug 06 17:43:20 r14 systemd[1]: opt-vyatta-config-tmp-new_config_29623.mount: Deactivated successfully. Aug 06 17:43:20 r14 systemd[1]: vpp-failure-handler.service: Failed with result 'exit-code'. Aug 06 17:43:20 r14 systemd[1]: Failed to start Restart VPP on failure. Aug 06 17:43:20 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:21 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:21 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:22 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:22 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:23 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:23 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:24 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:24 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:25 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:25 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:26 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:26 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:27 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:27 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:28 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:28 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused Aug 06 17:43:29 r14 python3[7237]: VPP API connection timeout: [Errno 111] Connection refused
The minimal value that we should allow is 96M or 128M