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

Remove race detector platform restrictions and enable it in CI #2790

Closed
wants to merge 8 commits into from

Conversation

faec
Copy link
Contributor

@faec faec commented Jun 6, 2023

(copied from @cmacknz at #2743 so I can work through the remaining failed cases):

We discovered in a recent PR that the RACE_DETECTOR environment variable seemingly was not having any effect (#2729 (comment)), it turns out it is ignored on arm64. This is now an unnecessary restriction.

I've also enabled the race detector in CI, I'll need to see what this does to the test time on each platform first though. We will keep it at least for Linux.

@elasticmachine
Copy link
Contributor

💔 Tests Failed

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-06-26T13:06:31.733+0000

  • Duration: 21 min 11 sec

Test stats 🧪

Test Results
Failed 12
Passed 6079
Skipped 19
Total 6110

Test errors 12

Expand to view the tests failures

> Show only the first 10 test failures

Test / Matrix - PLATFORM = 'ubuntu-22 && immutable' / Test / TestManager_FakeInput_Restarts – github.com/elastic/elastic-agent/pkg/component/runtime
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestManager_FakeInput_Restarts
        manager_test.go:1397: component state changed: {State:STARTING Message:Starting: spawned pid '61793' Units:map[{UnitType:input UnitID:fake-input}:{State:STARTING Message:Starting: spawned pid '61793' Payload:map[] unitState:0 unitMessage:Starting unitPayload:map[] configStateIdx:0 err:<nil>}] Features:<nil> FeaturesIdx:0 VersionInfo:{Name: Version: Meta:map[]} expectedUnits:map[{UnitType:0 UnitID:fake-input}:{state:2 configStateIdx:1 config:0xc00081c5a0 err:<nil> logLevel:4}] expectedFeatures:<nil> expectedFeaturesIdx:1}
        manager_test.go:1397: component state changed: {State:HEALTHY Message:Healthy: communicating with pid '61793' Units:map[{UnitType:input UnitID:fake-input}:{State:STARTING Message:Starting: spawned pid '61793' Payload:map[] unitState:0 unitMessage: unitPayload:map[] configStateIdx:0 err:<nil>}] Features:<nil> FeaturesIdx:0 VersionInfo:{Name:fake Version:1.0 Meta:map[input:fake]} expectedUnits:map[{UnitType:0 UnitID:fake-input}:{state:2 configStateIdx:1 config:0xc00081c5a0 err:<nil> logLevel:4}] expectedFeatures:<nil> expectedFeaturesIdx:1}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"level":"info","state":"STARTING","expectedState":"HEALTHY","time":"2023-06-26T13:19:33Z","message":"unit change received","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"level":"trace","time":"2023-06-26T13:19:33Z","message":"registering set_state action for unit","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"level":"trace","time":"2023-06-26T13:19:33Z","message":"registering send_event action for unit","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"level":"trace","time":"2023-06-26T13:19:33Z","message":"registering kill action for unit","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"level":"trace","time":"2023-06-26T13:19:33Z","message":"registering retrieve_features action for unit","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"level":"debug","state":"HEALTHY","message":"updating unit state","time":"2023-06-26T13:19:33Z","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"level":"trace","kill_on_interval":false,"time":"2023-06-26T13:19:33Z","message":"kill_on_interval config set value","ecs.version":"1.6.0"}
        manager_test.go:1397: component state changed: {State:HEALTHY Message:Healthy: communicating with pid '61793' Units:map[{UnitType:input UnitID:fake-input}:{State:HEALTHY Message:Fake Healthy Payload:map[] unitState:2 unitMessage:Fake Healthy unitPayload:map[] configStateIdx:1 err:<nil>}] Features:<nil> FeaturesIdx:1 VersionInfo:{Name:fake Version:1.0 Meta:map[input:fake]} expectedUnits:map[{UnitType:0 UnitID:fake-input}:{state:2 configStateIdx:1 config:0xc00081c5a0 err:<nil> logLevel:4}] expectedFeatures:<nil> expectedFeaturesIdx:1}
        manager_test.go:1414: triggering kill through action
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"level":"trace","time":"2023-06-26T13:19:33Z","message":"executing kill action","ecs.version":"1.6.0"}
        manager_test.go:1397: component state changed: {State:FAILED Message:Failed: pid '61793' exited with code '1' Units:map[{UnitType:input UnitID:fake-input}:{State:FAILED Message:Failed: pid '61793' exited with code '1' Payload:map[] unitState:2 unitMessage:Fake Healthy unitPayload:map[] configStateIdx:1 err:<nil>}] Features:<nil> FeaturesIdx:1 VersionInfo:{Name:fake Version:1.0 Meta:map[input:fake]} expectedUnits:map[{UnitType:0 UnitID:fake-input}:{state:2 configStateIdx:1 config:0xc00081c5a0 err:<nil> logLevel:4}] expectedFeatures:<nil> expectedFeaturesIdx:1}
        manager_test.go:1397: component state changed: {State:STARTING Message:Starting: spawned pid '61803' Units:map[{UnitType:input UnitID:fake-input}:{State:STARTING Message:Starting: spawned pid '61803' Payload:map[] unitState:2 unitMessage:Fake Healthy unitPayload:map[] configStateIdx:1 err:<nil>}] Features:<nil> FeaturesIdx:1 VersionInfo:{Name:fake Version:1.0 Meta:map[input:fake]} expectedUnits:map[{UnitType:0 UnitID:fake-input}:{state:2 configStateIdx:1 config:0xc00081c5a0 err:<nil> logLevel:4}] expectedFeatures:<nil> expectedFeaturesIdx:1}
        manager_test.go:1397: component state changed: {State:HEALTHY Message:Healthy: communicating with pid '61803' Units:map[{UnitType:input UnitID:fake-input}:{State:STARTING Message:Starting: spawned pid '61803' Payload:map[] unitState:0 unitMessage: unitPayload:map[] configStateIdx:0 err:<nil>}] Features:<nil> FeaturesIdx:0 VersionInfo:{Name:fake Version:1.0 Meta:map[input:fake]} expectedUnits:map[{UnitType:0 UnitID:fake-input}:{state:2 configStateIdx:1 config:0xc00081c5a0 err:<nil> logLevel:4}] expectedFeatures:<nil> expectedFeaturesIdx:1}
    ==================
    WARNING: DATA RACE
    Read at 0x00c00027b1c0 by goroutine 527:
      github.com/elastic/elastic-agent/pkg/component/runtime.(*logWriter).Write()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/component/runtime/log_writer.go:84 +0x191
      io.copyBuffer()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/io/io.go:429 +0x2de
      io.Copy()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/io/io.go:386 +0x64
      os/exec.(*Cmd).writerDescriptor.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/os/exec/exec.go:407 +0x3d
      os/exec.(*Cmd).Start.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/os/exec/exec.go:544 +0x35
      os/exec.(*Cmd).Start.func2()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/os/exec/exec.go:545 +0x47
    
    Previous write at 0x00c00027b1c0 by goroutine 511:
      github.com/elastic/elastic-agent/pkg/component/runtime.(*logWriter).Write()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/component/runtime/log_writer.go:79 +0x89c
      io.copyBuffer()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/io/io.go:429 +0x2de
      io.Copy()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/io/io.go:386 +0x64
      os/exec.(*Cmd).writerDescriptor.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/os/exec/exec.go:407 +0x3d
      os/exec.(*Cmd).Start.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/os/exec/exec.go:544 +0x35
      os/exec.(*Cmd).Start.func2()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/os/exec/exec.go:545 +0x47
    
    Goroutine 527 (running) created at:
      os/exec.(*Cmd).Start()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/os/exec/exec.go:543 +0xd74
      github.com/elastic/elastic-agent/pkg/core/process.startContext()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/core/process/process.go:163 +0x4f4
      github.com/elastic/elastic-agent/pkg/core/process.Start()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/core/process/process.go:49 +0x36c
      github.com/elastic/elastic-agent/pkg/component/runtime.(*commandRuntime).start()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/component/runtime/command.go:350 +0xdf1
      github.com/elastic/elastic-agent/pkg/component/runtime.(*commandRuntime).Run()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/component/runtime/command.go:189 +0x1664
      github.com/elastic/elastic-agent/pkg/component/runtime.(*componentRuntimeState).runLoop.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/component/runtime/runtime.go:137 +0x12e
      github.com/elastic/elastic-agent/internal/pkg/runner.Start.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/runner/runner.go:69 +0x62
    
    Goroutine 511 (finished) created at:
      os/exec.(*Cmd).Start()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/os/exec/exec.go:543 +0xd74
      github.com/elastic/elastic-agent/pkg/core/process.startContext()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/core/process/process.go:163 +0x4f4
      github.com/elastic/elastic-agent/pkg/core/process.Start()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/core/process/process.go:49 +0x36c
      github.com/elastic/elastic-agent/pkg/component/runtime.(*commandRuntime).start()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/component/runtime/command.go:350 +0xdf1
      github.com/elastic/elastic-agent/pkg/component/runtime.(*commandRuntime).Run()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/component/runtime/command.go:124 +0x4c4
      github.com/elastic/elastic-agent/pkg/component/runtime.(*componentRuntimeState).runLoop.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/pkg/component/runtime/runtime.go:137 +0x12e
      github.com/elastic/elastic-agent/internal/pkg/runner.Start.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/runner/runner.go:69 +0x62
    ==================
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"time":"2023-06-26T13:19:33Z","message":"unit change received","level":"info","state":"STARTING","expectedState":"HEALTHY","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"level":"trace","time":"2023-06-26T13:19:33Z","message":"registering set_state action for unit","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"level":"trace","time":"2023-06-26T13:19:33Z","message":"registering send_event action for unit","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"level":"trace","time":"2023-06-26T13:19:33Z","message":"registering kill action for unit","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"time":"2023-06-26T13:19:33Z","message":"registering retrieve_features action for unit","level":"trace","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"time":"2023-06-26T13:19:33Z","level":"debug","state":"HEALTHY","message":"updating unit state","ecs.version":"1.6.0"}
    {"log.level":"info","@timestamp":"0000-01-01T00:00:00.000Z","message":"","component":{"binary":"","dataset":"elastic_agent.","id":"fake-default","type":"fake"},"log":{"source":"fake-default"},"message":"kill_on_interval config set value","level":"trace","kill_on_interval":false,"time":"2023-06-26T13:19:33Z","ecs.version":"1.6.0"}
        manager_test.go:1397: component state changed: {State:HEALTHY Message:Healthy: communicating with pid '61803' Units:map[{UnitType:input UnitID:fake-input}:{State:HEALTHY Message:Fake Healthy Payload:map[] unitState:2 unitMessage:Fake Healthy unitPayload:map[] configStateIdx:1 err:<nil>}] Features:<nil> FeaturesIdx:1 VersionInfo:{Name:fake Version:1.0 Meta:map[input:fake]} expectedUnits:map[{UnitType:0 UnitID:fake-input}:{state:2 configStateIdx:1 config:0xc00081c5a0 err:<nil> logLevel:4}] expectedFeatures:<nil> expectedFeaturesIdx:1}
        testing.go:1319: race detected during execution of test
    --- FAIL: TestManager_FakeInput_Restarts (2.31s)
     
    

Test / Matrix - PLATFORM = 'ubuntu-22 && immutable' / Test / TestActionDispatcher/Cancel_queued_action – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestActionDispatcher/Cancel_queued_action
    ==================
    WARNING: DATA RACE
    Read at 0x00c00012c0b8 by goroutine 61:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5.1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:254 +0x39
      github.com/stretchr/testify/assert.Eventually.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1737 +0x39
    
    Previous write at 0x00c00012c0b8 by goroutine 58:
      github.com/stretchr/testify/mock.(*Mock).MethodCalled()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:522 +0xffd
      fmt.Sprintf()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/fmt/print.go:219 +0x67
      github.com/stretchr/testify/mock.Arguments.Diff()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:889 +0x18e
      github.com/stretchr/testify/mock.(*Mock).findExpectedCall()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:361 +0x146
      github.com/stretchr/testify/mock.(*Mock).MethodCalled()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:466 +0xb9
      github.com/stretchr/testify/mock.(*Mock).Called()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:456 +0x1a4
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*mockHandler).Handle()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:27 +0x1c4
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).dispatchAction()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:171 +0x14e
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).dispatchCancelActions()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:212 +0x278
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).Dispatch()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:114 +0x204
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5.2()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:247 +0xc7
    
    Goroutine 61 (running) created at:
      github.com/stretchr/testify/assert.Eventually()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1737 +0x3a5
      github.com/stretchr/testify/assert.Eventuallyf()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertion_format.go:155 +0x18d
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:254 +0xa72
      testing.tRunner()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1493 +0x47
    
    Goroutine 58 (finished) created at:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:247 +0x829
      testing.tRunner()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1493 +0x47
    ==================
        dispatcher_test.go:255: PASS:	Handle(string,string,string)
        dispatcher_test.go:256: PASS:	Save()
        dispatcher_test.go:256: PASS:	DequeueActions()
        testing.go:1319: race detected during execution of test
        --- FAIL: TestActionDispatcher/Cancel_queued_action (0.03s)
     
    

Test / Matrix - PLATFORM = 'ubuntu-22 && immutable' / Test / TestActionDispatcher – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestActionDispatcher
    === CONT  TestActionDispatcher
        testing.go:1319: race detected during execution of test
    --- FAIL: TestActionDispatcher (0.52s)
     
    

Test / Matrix - PLATFORM = 'ubuntu-22 && immutable' / Test / TestDownloadBodyError – github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestDownloadBodyError
    ==================
    WARNING: DATA RACE
    Read at 0x00c0002e6070 by goroutine 8:
      net/http.(*Server).Serve()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/net/http/server.go:3093 +0x5d3
      net/http/httptest.(*Server).goServe.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/net/http/httptest/server.go:310 +0xbb
    
    Previous write at 0x00c0002e6070 by goroutine 7:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.TestDownloadBodyError()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader_test.go:43 +0xfe
      testing.tRunner()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1493 +0x47
    
    Goroutine 8 (running) created at:
      net/http/httptest.(*Server).goServe()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/net/http/httptest/server.go:308 +0xa6
      net/http/httptest.(*Server).Start()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/net/http/httptest/server.go:134 +0x236
      net/http/httptest.NewServer()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/net/http/httptest/server.go:107 +0x1d6
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.TestDownloadBodyError()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader_test.go:33 +0x50
      testing.tRunner()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1493 +0x47
    
    Goroutine 7 (running) created at:
      testing.(*T).Run()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1493 +0x75d
      testing.runTests.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1846 +0x99
      testing.tRunner()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1446 +0x216
      testing.runTests()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1844 +0x7ec
      testing.(*M).Run()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.amd64/src/testing/testing.go:1726 +0xa84
      main.main()
          _testmain.go:105 +0x3bc
    ==================
        testing.go:1319: race detected during execution of test
    --- FAIL: TestDownloadBodyError (0.01s)
     
    

Test / Matrix - PLATFORM = 'aws && aarch64 && gobld/diskSizeGb:200' / Test / TestActionDispatcher/Cancel_queued_action – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestActionDispatcher/Cancel_queued_action
    ==================
    WARNING: DATA RACE
    Read at 0x00c000033f58 by goroutine 56:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5.1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:254 +0x34
      github.com/stretchr/testify/assert.Eventually.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1737 +0x38
    
    Previous write at 0x00c000033f58 by goroutine 53:
      github.com/stretchr/testify/mock.(*Mock).MethodCalled()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:522 +0xbc8
      fmt.Sprintf()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.arm64/src/fmt/print.go:219 +0x50
      github.com/stretchr/testify/mock.Arguments.Diff()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:889 +0x128
      github.com/stretchr/testify/mock.(*Mock).findExpectedCall()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:361 +0x118
      github.com/stretchr/testify/mock.(*Mock).MethodCalled()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:466 +0x6c
      github.com/stretchr/testify/mock.(*Mock).Called()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:456 +0x140
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*mockHandler).Handle()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:27 +0x1b8
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).dispatchAction()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:171 +0xc4
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).dispatchCancelActions()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:212 +0x1bc
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).Dispatch()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:114 +0x12c
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5.2()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:247 +0x98
    
    Goroutine 56 (running) created at:
      github.com/stretchr/testify/assert.Eventually()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1737 +0x290
      github.com/stretchr/testify/assert.Eventuallyf()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertion_format.go:155 +0x138
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:254 +0x8e0
      testing.tRunner()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.arm64/src/testing/testing.go:1446 +0x188
      testing.(*T).Run.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.arm64/src/testing/testing.go:1493 +0x40
    
    Goroutine 53 (finished) created at:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:247 +0x748
      testing.tRunner()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.arm64/src/testing/testing.go:1446 +0x188
      testing.(*T).Run.func1()
          /var/lib/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.linux.arm64/src/testing/testing.go:1493 +0x40
    ==================
        dispatcher_test.go:255: PASS:	Handle(string,string,string)
        dispatcher_test.go:256: PASS:	Save()
        dispatcher_test.go:256: PASS:	DequeueActions()
        testing.go:1319: race detected during execution of test
        --- FAIL: TestActionDispatcher/Cancel_queued_action (0.02s)
     
    

Test / Matrix - PLATFORM = 'aws && aarch64 && gobld/diskSizeGb:200' / Test / TestActionDispatcher – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestActionDispatcher
    === CONT  TestActionDispatcher
        testing.go:1319: race detected during execution of test
    --- FAIL: TestActionDispatcher (0.47s)
     
    

Test / Matrix - PLATFORM = 'windows-2022 && windows-immutable' / Test / TestActionDispatcher/Cancel_queued_action – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestActionDispatcher/Cancel_queued_action
    ==================
    WARNING: DATA RACE
    Write at 0x00c00067c068 by goroutine 57:
      github.com/stretchr/testify/mock.(*Mock).MethodCalled()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:522 +0xffd
      fmt.Sprintf()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/fmt/print.go:219 +0x67
      github.com/stretchr/testify/mock.Arguments.Diff()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:889 +0x18e
      github.com/stretchr/testify/mock.(*Mock).findExpectedCall()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:361 +0x146
      github.com/stretchr/testify/mock.(*Mock).MethodCalled()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:466 +0xb9
      github.com/stretchr/testify/mock.(*Mock).Called()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:456 +0x1a4
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*mockHandler).Handle()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:27 +0x1c4
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).dispatchAction()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:171 +0x101
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).dispatchCancelActions()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:212 +0x22e
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).Dispatch()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:114 +0x1ec
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5.2()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:247 +0xc7
    
    Previous read at 0x00c00067c068 by goroutine 62:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5.1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:254 +0x39
      github.com/stretchr/testify/assert.Eventually.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1737 +0x39
    
    Goroutine 57 (running) created at:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:247 +0x829
      testing.tRunner()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1493 +0x47
    
    Goroutine 62 (finished) created at:
      github.com/stretchr/testify/assert.Eventually()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1737 +0x3a5
      github.com/stretchr/testify/assert.Eventuallyf()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertion_format.go:155 +0x18d
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:254 +0xa66
      testing.tRunner()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1493 +0x47
    ==================
        dispatcher_test.go:255: PASS:	Handle(string,string,string)
        dispatcher_test.go:256: PASS:	Save()
        dispatcher_test.go:256: PASS:	DequeueActions()
        testing.go:1319: race detected during execution of test
        --- FAIL: TestActionDispatcher/Cancel_queued_action (0.02s)
     
    

Test / Matrix - PLATFORM = 'windows-2022 && windows-immutable' / Test / TestActionDispatcher – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestActionDispatcher
    === CONT  TestActionDispatcher
        testing.go:1319: race detected during execution of test
    --- FAIL: TestActionDispatcher (0.52s)
     
    

Test / Matrix - PLATFORM = 'windows-2022 && windows-immutable' / Test / TestDownloadBodyError – github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestDownloadBodyError
    ==================
    WARNING: DATA RACE
    Read at 0x00c000086888 by goroutine 7:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.TestDownloadBodyError()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader_test.go:67 +0x778
      testing.tRunner()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1493 +0x47
    
    Previous write at 0x00c000086888 by goroutine 15:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*recordLogger).Infof()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader_test.go:203 +0x224
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*downloadProgressReporter).Report.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader.go:291 +0x754
    
    Goroutine 7 (running) created at:
      testing.(*T).Run()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1493 +0x75d
      testing.runTests.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1846 +0x99
      testing.tRunner()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1446 +0x216
      testing.runTests()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1844 +0x7ec
      testing.(*M).Run()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1726 +0xa84
      main.main()
          _testmain.go:55 +0x2e9
    
    Goroutine 15 (finished) created at:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*downloadProgressReporter).Report()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader.go:261 +0x324
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*Downloader).downloadFile()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader.go:209 +0xd6d
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*Downloader).download()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader.go:145 +0x47b
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*Downloader).Download()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader.go:106 +0x272
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.TestDownloadBodyError()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader_test.go:61 +0x711
      testing.tRunner()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1493 +0x47
    ==================
    ==================
    WARNING: DATA RACE
    Read at 0x00c0000868a0 by goroutine 7:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.TestDownloadBodyError()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader_test.go:69 +0x864
      testing.tRunner()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1493 +0x47
    
    Previous write at 0x00c0000868a0 by goroutine 15:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*recordLogger).Warnf()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader_test.go:209 +0x224
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*downloadProgressReporter).Report.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader.go:296 +0x79c
    
    Goroutine 7 (running) created at:
      testing.(*T).Run()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1493 +0x75d
      testing.runTests.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1846 +0x99
      testing.tRunner()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1446 +0x216
      testing.runTests()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1844 +0x7ec
      testing.(*M).Run()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1726 +0xa84
      main.main()
          _testmain.go:55 +0x2e9
    
    Goroutine 15 (finished) created at:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*downloadProgressReporter).Report()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader.go:261 +0x324
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*Downloader).downloadFile()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader.go:209 +0xd6d
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*Downloader).download()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader.go:145 +0x47b
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.(*Downloader).Download()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader.go:106 +0x272
      github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http.TestDownloadBodyError()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http/downloader_test.go:61 +0x711
      testing.tRunner()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1493 +0x47
    ==================
        testing.go:1319: race detected during execution of test
    --- FAIL: TestDownloadBodyError (0.01s)
     
    

Test / Matrix - PLATFORM = 'windows-2016 && windows-immutable' / Test / TestActionDispatcher/Cancel_queued_action – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
    Expand to view the error details

     Failed 
    

    Expand to view the stacktrace

     === RUN   TestActionDispatcher/Cancel_queued_action
    ==================
    WARNING: DATA RACE
    Read at 0x00c00008ffa8 by goroutine 60:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5.1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:254 +0x39
      github.com/stretchr/testify/assert.Eventually.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1737 +0x39
    
    Previous write at 0x00c00008ffa8 by goroutine 58:
      github.com/stretchr/testify/mock.(*Mock).MethodCalled()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:522 +0xffd
      fmt.Sprintf()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/fmt/print.go:219 +0x67
      github.com/stretchr/testify/mock.Arguments.Diff()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:889 +0x18e
      github.com/stretchr/testify/mock.(*Mock).findExpectedCall()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:361 +0x146
      github.com/stretchr/testify/mock.(*Mock).MethodCalled()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:466 +0xb9
      github.com/stretchr/testify/mock.(*Mock).Called()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/mock/mock.go:456 +0x1a4
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*mockHandler).Handle()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:27 +0x1c4
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).dispatchAction()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:171 +0x101
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).dispatchCancelActions()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:212 +0x22e
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.(*ActionDispatcher).Dispatch()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher.go:114 +0x1ec
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5.2()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:247 +0xc7
    
    Goroutine 60 (running) created at:
      github.com/stretchr/testify/assert.Eventually()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertions.go:1737 +0x3a5
      github.com/stretchr/testify/assert.Eventuallyf()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/pkg/mod/github.com/stretchr/[email protected]/assert/assertion_format.go:155 +0x18d
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:254 +0xa66
      testing.tRunner()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1493 +0x47
    
    Goroutine 58 (finished) created at:
      github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher.TestActionDispatcher.func5()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/src/github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher/dispatcher_test.go:247 +0x829
      testing.tRunner()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1446 +0x216
      testing.(*T).Run.func1()
          C:/Users/jenkins/workspace/_agent_elastic-agent-mbp_PR-2790/.gvm/versions/go1.19.10.windows.amd64/src/testing/testing.go:1493 +0x47
    ==================
        dispatcher_test.go:255: PASS:	Handle(string,string,string)
        dispatcher_test.go:256: PASS:	Save()
        dispatcher_test.go:256: PASS:	DequeueActions()
        testing.go:1319: race detected during execution of test
        --- FAIL: TestActionDispatcher/Cancel_queued_action (0.01s)
     
    

Steps errors 8

Expand to view the steps failures

Go unitTest
  • Took 4 min 28 sec . View more details here
  • Description: mage unitTest
Publish Cobertura Coverage Report
  • Took 0 min 1 sec . View more details here
  • Description: [2023-06-26T13:20:01.078Z] [Cobertura] Publishing Cobertura coverage report... [2023-06-26T13:20:01
Go unitTest
  • Took 5 min 53 sec . View more details here
  • Description: mage unitTest
Checks if running on a Unix-like node
  • Took 0 min 0 sec . View more details here
  • Description: script returned exit code 1
Go unitTest
  • Took 6 min 48 sec . View more details here
  • Description: mage unitTest
Checks if running on a Unix-like node
  • Took 0 min 0 sec . View more details here
  • Description: script returned exit code 1
Go unitTest
  • Took 6 min 8 sec . View more details here
  • Description: mage unitTest
Checks if running on a Unix-like node
  • Took 0 min 0 sec . View more details here
  • Description: script returned exit code 1

🐛 Flaky test report

❕ There are test failures but not known flaky tests.

Expand to view the summary

Genuine test errors 12

💔 There are test failures but not known flaky tests, most likely a genuine test failure.

  • Name: Test / Matrix - PLATFORM = 'ubuntu-22 && immutable' / Test / TestManager_FakeInput_Restarts – github.com/elastic/elastic-agent/pkg/component/runtime
  • Name: Test / Matrix - PLATFORM = 'ubuntu-22 && immutable' / Test / TestActionDispatcher/Cancel_queued_action – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
  • Name: Test / Matrix - PLATFORM = 'ubuntu-22 && immutable' / Test / TestActionDispatcher – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
  • Name: Test / Matrix - PLATFORM = 'ubuntu-22 && immutable' / Test / TestDownloadBodyError – github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http
  • Name: Test / Matrix - PLATFORM = 'aws && aarch64 && gobld/diskSizeGb:200' / Test / TestActionDispatcher/Cancel_queued_action – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
  • Name: Test / Matrix - PLATFORM = 'aws && aarch64 && gobld/diskSizeGb:200' / Test / TestActionDispatcher – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
  • Name: Test / Matrix - PLATFORM = 'windows-2022 && windows-immutable' / Test / TestActionDispatcher/Cancel_queued_action – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
  • Name: Test / Matrix - PLATFORM = 'windows-2022 && windows-immutable' / Test / TestActionDispatcher – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
  • Name: Test / Matrix - PLATFORM = 'windows-2022 && windows-immutable' / Test / TestDownloadBodyError – github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http
  • Name: Test / Matrix - PLATFORM = 'windows-2016 && windows-immutable' / Test / TestActionDispatcher/Cancel_queued_action – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
  • Name: Test / Matrix - PLATFORM = 'windows-2016 && windows-immutable' / Test / TestActionDispatcher – github.com/elastic/elastic-agent/internal/pkg/agent/application/dispatcher
  • Name: Test / Matrix - PLATFORM = 'windows-2016 && windows-immutable' / Test / TestDownloadBodyError – github.com/elastic/elastic-agent/internal/pkg/agent/application/upgrade/artifact/download/http

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages.

  • run integration tests : Run the Elastic Agent Integration tests.

  • run end-to-end tests : Generate the packages and run the E2E Tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@blakerouse
Copy link
Contributor

Closing in favor of #3096

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

Successfully merging this pull request may close these issues.

4 participants