Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Tests fail on arches ppc64le, aarch64 and s390x #249

Open
eclipseo opened this issue Oct 29, 2018 · 4 comments
Open

Tests fail on arches ppc64le, aarch64 and s390x #249

eclipseo opened this issue Oct 29, 2018 · 4 comments

Comments

@eclipseo
Copy link

+ go test -buildmode pie -compiler gc -ldflags '-extldflags '\''-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '\'''
--- FAIL: TestEWMA1 (0.00s)
    ewma_test.go:64: 3 minute a.Rate(): 0.029872241020718428 != 0.02987224102071842
    ewma_test.go:68: 4 minute a.Rate(): 0.01098938333324054 != 0.010989383333240534
    ewma_test.go:72: 5 minute a.Rate(): 0.004042768199451294 != 0.004042768199451292
    ewma_test.go:76: 6 minute a.Rate(): 0.0014872513059998212 != 0.00148725130599982
    ewma_test.go:80: 7 minute a.Rate(): 0.0005471291793327122 != 0.0005471291793327121
    ewma_test.go:84: 8 minute a.Rate(): 0.00020127757674150815 != 0.0002012775767415081
    ewma_test.go:88: 9 minute a.Rate(): 7.404588245200814e-05 != 7.404588245200811e-05
    ewma_test.go:96: 11 minute a.Rate(): 1.0021020474147462e-05 != 1.0021020474147466e-05
    ewma_test.go:100: 12 minute a.Rate(): 3.6865274119969525e-06 != 3.686527411996955e-06
    ewma_test.go:104: 13 minute a.Rate(): 1.3561976441886433e-06 != 1.356197644188644e-06
    ewma_test.go:108: 14 minute a.Rate(): 4.989172314621449e-07 != 4.989172314621452e-07
--- FAIL: TestEWMA5 (0.00s)
    ewma_test.go:149: 7 minute a.Rate(): 0.14795817836496392 != 0.1479581783649639
    ewma_test.go:169: 12 minute a.Rate(): 0.05443077197364752 != 0.054430771973647527
    ewma_test.go:173: 13 minute a.Rate(): 0.04456414692860035 != 0.044564146928600355
    ewma_test.go:177: 14 minute a.Rate(): 0.03648603757513079 != 0.036486037575130796
--- FAIL: TestUniformSampleSnapshot (0.00s)
    sample_test.go:330: 99th percentile: 9986.429999999998 != 9986.43
--- FAIL: TestUniformSampleStatistics (0.00s)
    sample_test.go:330: 99th percentile: 9986.429999999998 != 9986.43
FAIL
exit status 1
FAIL	github.com/rcrowley/go-metrics	5.419s

I filed a similar bug last year in VividCortex/ewma#14
Probably the same rounding issue.

@chakravarthy392
Copy link

Getting the similar issue on s390x for jpmorganchase/quorum with Go.

lrita added a commit to lrita/go-metrics that referenced this issue Jul 30, 2019
name                             old time/op  new time/op  delta
SampleCalc4K/SampleSum-4         2.07µs ± 6%  0.25µs ± 3%  -88.07%  (p=0.100 n=3+3)
SampleCalc4K/SampleMax-4         2.79µs ± 4%  0.71µs ± 1%  -74.50%  (p=0.100 n=3+3)
SampleCalc4K/SampleMin-4         2.73µs ± 1%  0.70µs ± 1%  -74.34%  (p=0.100 n=3+3)
SampleCalc4K/SampleMean-4        1.99µs ± 2%  0.24µs ± 1%  -87.73%  (p=0.100 n=3+3)
SampleCalc4K/SampleStdDev-4      6.16µs ± 1%  4.09µs ± 4%  -33.52%  (p=0.100 n=3+3)
SampleCalc4K/SampleVariance-4    6.10µs ± 2%  4.03µs ± 2%  -33.93%  (p=0.100 n=3+3)
SampleCalc4K/SamplePercentile-4   222µs ± 1%   215µs ± 1%   -2.78%  (p=0.100 n=3+3)
@rhenwood-arm
Copy link

I have observed this too, on aarch64. I believe this is an example of a precision error:

montanaflynn/stats#33

lrita added a commit to lrita/go-metrics that referenced this issue Mar 31, 2020
@siretart
Copy link

I took the liberty of cherry-picking @lrita 's fixes to the precisions checks from bb326cd into https://salsa.debian.org/go-team/packages/golang-github-rcrowley-go-metrics/-/blob/master/debian/patches/precision.patch and uploaded it to debian/unstable to fix http://bugs.debian.org/976543 to prevent other unrelated package from falling out of the next Debian release

@lrita I stripped out your optimiziations because I'm not entirely compfortable / familiar enough with the code base to assess their implications fully. Maybe your might would be easier to review if it the precision fixes were kept in a separate PR from the assembler optimizations?

@Gu1nness
Copy link

Nice I was ready to implement this to patch the debian bug and removal.
I'll go for it with the other problematic package (github.com/montanaflynn/stats)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants