The customer observed the inconsistent ifHCOutOctets outputs observed when the customer did the snmp mib walk, especially they are running 'show interfaces' and 'show interfaces statistics' CLI commands simultaneously.
The customer found two of our MX204 behaving the same thing,
user@router> show snmp mib walk ifHCOutOctets | grep Octets.849
ifHCOutOctets.849 = 717774846
ifHCOutOctets.849 = 998643740
ifHCOutOctets.849 = 717775306
The customer did not see this issue for all other sub-interfaces/units with normal input output traffic, value increment normally.
Since the Junos OS kernel uses "shared" memory design for synchronized and asynchronized queries, the SNMP ifHCOutOctets statistic could be having the display issue in some corner cases.
The hidden CLI command - "set snmp no-interval-mib" is a way to change the mib2d sync queries to async queries, so all mib2d queries will be async and mitigate the ifHCOutOctets statistic display issue due to the kernel shared cache limitation when multiple threads try to access the cache simultaneously. However, it is just a mitigate way. In some corner case, there is a still ifHCOutOctets statistic display issue.
For example, the CLI show interface command is a sync request, if the CLI show interfaces command and mib2d async queries occurs simultaneously, and targets the same shared memory, the related interface or sub-interface ifHCOutOctets outputs might be affected in a short period of time. It can be self-recovered afterwards.
Cosd queries are also async requests, and the queries could affect the mib2d queries if occurring simultaneously.