Page MenuHomeVyOS Platform

DHCP/netplug: Memory overusage with configurations with many interfaces
Confirmed, HighPublicBUG

Description

The issue

The netplug helper script is designed to ensure proper DHCP client functionality when an interface status changes: vyos-netplug-dhcp-client.

However, the script contains a logical flow that can cause indefinite memory growth during commits. Specifically, it waits for a commit to finish: Lines 42-43.

This endless loop keeps the script in memory until the commit completes. If multiple interfaces trigger the helper simultaneously, memory usage by the script grows excessively, preventing other processes from functioning. Eventually, the system grinds to a halt, and the OOM killer may terminate critical processes - including configd, given its size. This leaves all helpers stuck in memory indefinitely, rendering the system unusable.

How to reproduce

  1. Ensure the test interface is UP and properly configured.
  2. Create a large number of interfaces:
configure
set interface eth0 address '192.0.2.1/24'
for vid in $(seq 1 1000); do set interfaces ethernet eth0 vif $vid address 10.$((vid/256)).$((vid%256)).1/24; done
commit
  1. As interfaces begin initializing, helpers will launch before the commit completes, causing the system to freeze within seconds.

Suggested solution

Running and retaining multiple helper processes is clearly unsustainable. If dhclient cannot handle interface flapping without external helpers, a single centralized process should manage events for all interfaces - not multiple instances.

The most straightforward and logical approach is to:

  • Start a dedicated daemon to handle interface events.
  • Send events to the daemon’s queue from netplug helpers, rather than spawning persistent processes.

Details

Version
2025.11.24-0021-rolling, 1.5-stream-Q3, 1.4.3
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

zsdc changed the task status from Open to Confirmed.
zsdc triaged this task as High priority.