-
Bug
-
Resolution: Done
-
Critical
-
None
-
None
We're hitting the following null pointer exception in production:
2024-12-09 12:50:56,472 [thread=rhsm-subscriptions-task-processor-0-C-1] [ERROR] [org.candlepin.subscriptions.tally.TallySnapshotController] - Error collecting existing usage snapshots java.lang.NullPointerException: Cannot invoke "String.compareTo(String)" because the return value of "com.google.common.collect.PeekingIterator.peek()" is null at org.candlepin.subscriptions.tally.InventorySwatchDataCollator.trackActiveHypervisor(InventorySwatchDataCollator.java:192) at org.candlepin.subscriptions.tally.InventorySwatchDataCollator.collateData(InventorySwatchDataCollator.java:154) at org.candlepin.subscriptions.tally.InventoryAccountUsageCollector.reconcileSystemDataWithHbi(InventoryAccountUsageCollector.java:134) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:359) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
This is the root cause of the exceptions that we can see using the splunk query
index=rh_rhsm namespace=rhsm-prod "Error collecting existing usage snapshots"
. However, in splunk, the exception stack trace is hidden which needs to be investigated by SWATCH-3134.
This can be reproduced locally by loading the hbi and swatch data and running the tally snapshots.