Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/bytealg: strings test fails on ppc64le/p9 on certain random strings #56457

Closed
archanaravindar opened this issue Oct 27, 2022 · 4 comments
Assignees
Labels
arch-ppc64x FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@archanaravindar
Copy link
Contributor

archanaravindar commented Oct 27, 2022

#!watchflakes
post <- pkg == "strings" && test == "TestIndexRandom"

What version of Go are you using (go version)?

master go1.20-50557edf10

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="ppc64le"
GOBIN=""
GOCACHE="/home/archana/.cache/go-build"
GOENV="/home/archana/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="ppc64le"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/archana/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/archana/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/archana/Go_master/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/archana/Go_master/go/pkg/tool/linux_ppc64le"
GOVCS=""
GOVERSION="devel go1.20-50557edf10 Thu Oct 27 10:37:01 2022 +0000"
GCCGO="gccgo"
GOPPC64="power9"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/archana/Go_master/go/src/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3329760993=/tmp/go-build -gno-record-gcc-switches"

What did you do?

There is a random failure seen recently in the Go build dashboard under ppc64le/power9. The timing of this error seems to be related to the CL 443058 as it does not occur with setting GODEBUG=randautoseed=0.

--- FAIL: TestIndexRandom (0.01s)
strings_test.go:268: Index(999f2xmimunbuyew5vrkla9cpwhmxan8o98ec,98ec) = -1; want 33
FAIL
FAIL strings 1.575s

Upon running the strings test multiple times with random inputs, it appears that the test fails for some number of cases.

What did you expect to see?

The strings test should pass

What did you see instead?

The strings test fails for a subset of the random inputs tested

@bcmills

@archanaravindar archanaravindar self-assigned this Oct 27, 2022
@bcmills bcmills added this to the Backlog milestone Oct 27, 2022
@bcmills bcmills added arch-ppc64x NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Oct 27, 2022
@ianlancetaylor
Copy link
Contributor

CC @golang/ppc64

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/446135 mentions this issue: internal/bytealg: Fix bug in index function for ppc64le/power9

romaindoumenc pushed a commit to TroutSoftware/go that referenced this issue Nov 3, 2022
The index function was not handling certain corner cases where there
were two more bytes to be examined in the tail end of the string to
complete the comparison. Fix code to ensure that when the string has
to be shifted two more times the correct bytes are examined.
Also hoisted vsplat to V10 so that all paths use the correct value.
Some comments had incorrect register names and corrected the same.
Added the strings that were failing to strings test for verification.

Fixes golang#56457

Change-Id: Idba7cbc802e3d73c8f4fe89309871cc8447792f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/446135
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Archana Ravindar <ravindararchana@gmail.com>
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "strings" && test == "TestIndexRandom"
2022-10-27 01:24 linux-ppc64le-power9osu go@612bb34a strings.TestIndexRandom (log)
--- FAIL: TestIndexRandom (0.01s)
    strings_test.go:268: Index(999f2xmimunbuyew5vrkla9cpwhmxan8o98ec,98ec) = -1; want 33

watchflakes

@gopherbot gopherbot reopened this Nov 4, 2022
@pmur
Copy link
Contributor

pmur commented Nov 4, 2022

I think gopherbot reopened this against failure @archanaravindar already observed and committed a fix for yesterday.

@archanaravindar does this fix need backported to go1.19?

@pmur pmur closed this as completed Nov 4, 2022
@golang golang locked and limited conversation to collaborators Nov 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-ppc64x FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Archived in project
Development

No branches or pull requests

5 participants