ligato / vpp-agent

⚡️ Control plane management agent for FD.io's VPP
https://docs.ligato.io/
Apache License 2.0
247 stars 127 forks source link

why (*InterfaceVppHandler).DumpInterfaces fail? #1934

Open ChenYahui2019 opened 1 year ago

ChenYahui2019 commented 1 year ago

I developed a new plugin that calls (*InterfaceVppHandler).DumpInterfaces per second.

After a while, the errors started. The error message is: dumping memif socket details failed: all channel IDs are in use

VPP version: v22.10 vpp-agent version: v3.5.0

# vppctl show memif
sockets
  id  listener    filename
  0   no          /run/vpp/memif.sock

# ls /run/vpp/
api.sock  cli.sock  snort.sock  stats.sock
pemoticak commented 1 year ago

Hello @ChenYahui2019, upon VERY brief inspection from my side the cause of the all channel IDs are in use error is that all channels in GoVPP channel pool get used up. It is hard to tell exactly why that happens as I do not know how your plugin works, but I know a bug related to GoVPP channel pool exhausting all channel IDs was fixed in GoVPP. Not sure if that bug is indeed the cause of your problem, but if it is, then your issue should get fixed once vpp-agent is updated to use GoVPP 0.8.0

ChenYahui2019 commented 1 year ago

Thx for your reply.

I create a ifHandler using below:

p.ifHandler = ifvppcalls.CompatibleInterfaceVppHandler(p.VPP, p.Log)

then, call below API every second to get traffic statistics:

p.ifHandler.DumpInterfaces(context.TODO())
pemoticak commented 1 year ago

GoVPP got updated to 0.8.0 in commit f4fe5e7. If you decide to test your plugin with vpp-agent build that contains this commit, please let me know if it fixed your issue. Thanks.