-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/telemetry/internal/counter: persistent test failures with "panic: runtime error: invalid memory address or nil pointer dereference" on GOOS=android GOARCH={386,amd64} via Android emulator builders #60967
Comments
Change https://go.dev/cl/505580 mentions this issue: |
Updates golang/go#60615 Updates golang/go#60692 Updates golang/go#60965 Updates golang/go#60967 Updates golang/go#60968 Updates golang/go#60970 Updates golang/go#60971 Change-Id: Ifb0320c279e91185ab04c3efa6bf20f2c141dbe1 Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/505580 Reviewed-by: Jamal Carvalho <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
Change https://go.dev/cl/505720 mentions this issue: |
:-) this revealed a bug in the test code. But the root cause of this failure is that the telemetry package couldn't create a telemetry collection directory in the android builder environment, so telemetry was disabled. https://github.com/golang/telemetry/blob/b6b6ba5c0fe03deba73c9244d30c283757992cfa/types.go#L82 The failed test assumed telemetry was enabled and eventually hit the bug in the test. From an old log I see "mkdir /.config: read-only file system" error. The telemetry code attempts to create telemetry data under
Since some code will end up in the go main project, I think it's better to keep running on android and skip individual tests that don't make sense, as we discover. |
Some tests in this package attempt to close/unmmap files by calling a test helper function 'close'. When telemetry is off, mapped file, not the file, can be nil. Actually, the file argument (f) of close is never nil. Updates golang/go#60967 Change-Id: I4ca3feb233ede3a6512a4f3d50460c2fb28a6559 Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/505720 TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Jamal Carvalho <[email protected]>
Oof. Compare:
But also: it seems like a mistake for the That sort of use case is exactly what the new |
Change https://go.dev/cl/506917 mentions this issue: |
Change https://go.dev/cl/506916 mentions this issue: |
The LocalDir/UploadDir/Enabled in types.go are computed based on internal/telemetry.{LocalDir,UploadDir,ModeFile}. Previously, the init function in types.go created the telemetry directories, which means, simply depending on the package creates directories in user's system default configuration location. For example, by running tests in this repo, users may end up having telemetry directories. Avoid this eager directory creation. The previous behavior allowed a process to completely skip telemetry collection if there is no writable disk space, even when the user didn't turn off the telemetry. However, we guess os.UserConfigDir misconfiguration is rare, so we drop this behavior. We introduce the undocumented EXP_GOTELEMETRYDIR env var here. A process' default telemetry setting uses directories and files under a directory determined by the EXP_GOTELEMETRYDIR env var, or os.UserConfigDir. EXP_GOTELEMETRYDIR env var allows us to test instrumented binary's behavior without polluting the user's default telemetry mode file or data collection directory. This environment variable is intentionally undocumented because this may change or get dropped. And, rename LookupMode to Mode. Updates golang/go#60967 Change-Id: Ie8ad9bf52a9b5d7fe70b92f6c8ccdeda6dbb1a90 Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/506916 Run-TryBot: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Jamal Carvalho <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
With https://go.dev/cl/538297, I think we will not need to write to |
Note that while that applies to Compare: |
The android-386-emu and android-amd64-emu builders are persistently failing on TestBasic in this package. Example failure:
See https://build.golang.org/log/cc69cc12aae4e352100a3ec136d1eb8443ea7b9f for an example log. More are visible at https://build.golang.org/?repo=golang.org%2fx%2ftelemetry.
CC @golang/android as port owners.
If package owners (CC @jamalc, @pjweinb, @hyangah) decide this repository isn't meant to support GOOS=android and doesn't need to be tested on this builder, the right fix is to adjust the test policy in x/build/dashboard. I'm happy to help with that if that's the path to resolve this issue. Thanks.
The text was updated successfully, but these errors were encountered: