Closed glazychev-art closed 8 months ago
Hello, thanks for the report. Please include information about the VPP version. Also, if possible perhaps including dump using vpp_get_stats
for the retrieved data.
I have not done any code investigation, but from quick glance, my assumption of what is happening here is that some interface got deleted during the update of stats entry data.
This commit is possibly related to this: https://github.com/FDio/vpp/commit/ff27c9f8ecb08ff0f5b98332975733e8bab125f1
I see two solutions to be explored:
updateStats
in the core
package and re-allocate the memory with interface stats data. This should avoid any future panics when access invalid data from stats segment.Thanks! We use this VPP version - https://github.com/FDio/vpp/tree/1765f014bc7fcc3b924019ec96350eb50bef629f
I'm not sure, but I think that the creation of the interface occurred at the time the statistics were received. It seems we didn't remove the interfaces at that point
Hello @ondrej-fabry,
Can't we just use
vecLen = uint32(len(data))
instead of
vecLen := *(*uint32)(vectorLen(dirVector))
?
https://github.com/FDio/govpp/blob/v0.8.0/adapter/statsclient/statseg_v2.go#L340-L341
@ondrej-fabry Any insight here?
Hello, We are facing a panic issue in the stats element:
Most likely, interfaces are created in parallel. Or probably
GetInterfaceStats
is called from different goroutines.Do you have any ideas how to fix this?