With ChartJSON, it was valid to have mixed units within a story/metric combo. This is not explicitly disallowed in the HistogramSet format, but causes malformed data to be generated when adding reserved diagnostics.
The issue is that the automatic summary generation ends up producing a summary for each unit type, which then causes uploading to fail due to there being duplicate summaries for the same metric.
The root cause of this appears to be the unit check in histogram.canAddHistogram()[1], which causes the mixed unit summaries to not be merged together during the merging process [2].
Since this is a pretty rare edge case, the temporary solution is to make sure any data that uploads in the HistogramSet format doesn't mix units. However, it would be good to either fix this issue or explicitly document that all histograms with the same "name" field must use the same units.
[1] https://cs.chromium.org/chromium/src/third_party/catapult/tracing/tracing/value/histogram.html?l=510
[2] https://cs.chromium.org/chromium/src/third_party/catapult/tracing/tracing/value/merge_histograms_cmdline.html?l=48