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

TestGoCollectorAllowList tests fail in v1.13.0 with Go 1.19 #1135

Closed
dswarbrick opened this issue Sep 16, 2022 · 4 comments · Fixed by #1160
Closed

TestGoCollectorAllowList tests fail in v1.13.0 with Go 1.19 #1135

dswarbrick opened this issue Sep 16, 2022 · 4 comments · Fixed by #1160

Comments

@dswarbrick
Copy link
Contributor

dswarbrick commented Sep 16, 2022

The following tests fail in v1.13.0 and main branch (as of writing).

=== RUN   TestGoCollectorAllowList
=== RUN   TestGoCollectorAllowList/Without_any_rules
=== RUN   TestGoCollectorAllowList/allow_all
    go_collector_latest_test.go:193: got [go_cgo_go_to_c_calls_calls_total go_gc_cycles_automatic_gc_cycles_total go_gc_cycles_forced_gc_cycles_total go_gc_cycles_total_gc_cycles_total go_gc_duration_seconds go_gc_heap_allocs_by_size_bytes go_gc_heap_allocs_bytes_total go_gc_heap_allocs_objects_total go_gc_heap_frees_by_size_bytes go_gc_heap_frees_bytes_total go_gc_heap_frees_objects_total go_gc_heap_goal_bytes go_gc_heap_objects_objects go_gc_heap_tiny_allocs_objects_total go_gc_limiter_last_enabled_gc_cycle go_gc_pauses_seconds go_gc_stack_starting_size_bytes go_goroutines go_info go_memory_classes_heap_free_bytes go_memory_classes_heap_objects_bytes go_memory_classes_heap_released_bytes go_memory_classes_heap_stacks_bytes go_memory_classes_heap_unused_bytes go_memory_classes_metadata_mcache_free_bytes go_memory_classes_metadata_mcache_inuse_bytes go_memory_classes_metadata_mspan_free_bytes go_memory_classes_metadata_mspan_inuse_bytes go_memory_classes_metadata_other_bytes go_memory_classes_os_stacks_bytes go_memory_classes_other_bytes go_memory_classes_profiling_buckets_bytes go_memory_classes_total_bytes go_memstats_last_gc_time_seconds go_sched_gomaxprocs_threads go_sched_goroutines_goroutines go_sched_latencies_seconds go_threads],
                                    want [go_gc_cycles_automatic_gc_cycles_total go_gc_cycles_forced_gc_cycles_total go_gc_cycles_total_gc_cycles_total go_gc_duration_seconds go_gc_heap_allocs_by_size_bytes go_gc_heap_allocs_bytes_total go_gc_heap_allocs_objects_total go_gc_heap_frees_by_size_bytes go_gc_heap_frees_bytes_total go_gc_heap_frees_objects_total go_gc_heap_goal_bytes go_gc_heap_objects_objects go_gc_heap_tiny_allocs_objects_total go_gc_pauses_seconds go_goroutines go_info go_memory_classes_heap_free_bytes go_memory_classes_heap_objects_bytes go_memory_classes_heap_released_bytes go_memory_classes_heap_stacks_bytes go_memory_classes_heap_unused_bytes go_memory_classes_metadata_mcache_free_bytes go_memory_classes_metadata_mcache_inuse_bytes go_memory_classes_metadata_mspan_free_bytes go_memory_classes_metadata_mspan_inuse_bytes go_memory_classes_metadata_other_bytes go_memory_classes_os_stacks_bytes go_memory_classes_other_bytes go_memory_classes_profiling_buckets_bytes go_memory_classes_total_bytes go_memstats_last_gc_time_seconds go_sched_goroutines_goroutines go_sched_latencies_seconds go_threads]
=== RUN   TestGoCollectorAllowList/allow_GC
    go_collector_latest_test.go:193: got [go_gc_cycles_automatic_gc_cycles_total go_gc_cycles_forced_gc_cycles_total go_gc_cycles_total_gc_cycles_total go_gc_duration_seconds go_gc_heap_allocs_by_size_bytes go_gc_heap_allocs_bytes_total go_gc_heap_allocs_objects_total go_gc_heap_frees_by_size_bytes go_gc_heap_frees_bytes_total go_gc_heap_frees_objects_total go_gc_heap_goal_bytes go_gc_heap_objects_objects go_gc_heap_tiny_allocs_objects_total go_gc_limiter_last_enabled_gc_cycle go_gc_pauses_seconds go_gc_stack_starting_size_bytes go_goroutines go_info go_memstats_last_gc_time_seconds go_threads],
                                    want [go_gc_cycles_automatic_gc_cycles_total go_gc_cycles_forced_gc_cycles_total go_gc_cycles_total_gc_cycles_total go_gc_duration_seconds go_gc_heap_allocs_by_size_bytes go_gc_heap_allocs_bytes_total go_gc_heap_allocs_objects_total go_gc_heap_frees_by_size_bytes go_gc_heap_frees_bytes_total go_gc_heap_frees_objects_total go_gc_heap_goal_bytes go_gc_heap_objects_objects go_gc_heap_tiny_allocs_objects_total go_gc_pauses_seconds go_goroutines go_info go_memstats_last_gc_time_seconds go_threads]
=== RUN   TestGoCollectorAllowList/allow_Memory
=== RUN   TestGoCollectorAllowList/allow_Scheduler
    go_collector_latest_test.go:193: got [go_gc_duration_seconds go_goroutines go_info go_memstats_last_gc_time_seconds go_sched_gomaxprocs_threads go_sched_goroutines_goroutines go_sched_latencies_seconds go_threads],
                                    want [go_gc_duration_seconds go_goroutines go_info go_memstats_last_gc_time_seconds go_sched_goroutines_goroutines go_sched_latencies_seconds go_threads]
--- FAIL: TestGoCollectorAllowList (0.00s)
    --- PASS: TestGoCollectorAllowList/Without_any_rules (0.00s)
    --- FAIL: TestGoCollectorAllowList/allow_all (0.00s)
    --- FAIL: TestGoCollectorAllowList/allow_GC (0.00s)
    --- PASS: TestGoCollectorAllowList/allow_Memory (0.00s)
    --- FAIL: TestGoCollectorAllowList/allow_Scheduler (0.00s)

Tested with Go 1.19.1 on linux/amd64, running kernel 5.19.

I'm not sure how this got past Circle CI, assuming that it runs tests. The release notes state "we also test client_golang against the new 1.19 version", but this doesn't appear to be true:

workflows:
  version: 2
  client_golang:
    jobs:
      # Refer to README.md for the currently supported versions.
      - test:
          name: go-1-17
          go_version: "1.17"
          run_lint: true
      - test:
          name: go-1-18
          go_version: "1.18"
          run_lint: true
          # Style and unused/missing packages are only checked against
          # the latest supported Go version.
          run_style_and_unused: true
@dswarbrick
Copy link
Contributor Author

I presume that this test will need special handling for Go 1.17 / 1.18, and 1.19, as per the prometheus/go_collector_metrics_go1{17,18,19}_test.go files.

Specifically, Go 1.19 seems to expose four additional metrics:

  • go_cgo_go_to_c_calls_calls_total
  • go_gc_limiter_last_enabled_gc_cycle
  • go_gc_stack_starting_size_bytes
  • go_sched_gomaxprocs_threads

@rogerogers
Copy link
Contributor

work fine with me on go1.18.6. some fail on 1.19.

@dswarbrick dswarbrick changed the title TestGoCollectorAllowList tests fail in v1.13.0 TestGoCollectorAllowList tests fail in v1.13.0 with Go 1.19 Sep 18, 2022
@dswarbrick
Copy link
Contributor Author

work fine with me on go1.18.6. some fail on 1.19.

See my second comment. Updated title to avoid confusion.

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

Successfully merging a pull request may close this issue.

3 participants
@dswarbrick @rogerogers and others