hashicorp / hashicorp/consul

flaky test: api TestAPI_SessionServiceChecks

Open
#7,497 0 comments 0 reactions 0 assignees View on GitHub
theme/testing type/crash
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

Failed [here](https://app.circleci.com/pipelines/github/hashicorp/consul/7964/workflows/ff54a829-92c3-47ad-919e-bdcf77e6e370/jobs/144222), passed on the second run.

```
=== Failed
=== FAIL: . TestAPI_SessionServiceChecks (2.29s)
=== PAUSE TestAPI_SessionServiceChecks
=== CONT TestAPI_SessionServiceChecks
TestAPI_SessionNodeChecks: io.go:407: 2020-03-24T20:00:12.828Z [INFO] agent: Caught: signal=interrupt
TestAPI_SessionNodeChecks: io.go:407: 2020-03-24T20:00:12.828Z [INFO] agent: Graceful shutdown disabled. Exiting
2020-03-24T20:00:12.828Z [INFO] agent: Requesting shutdown
2020-03-24T20:00:12.828Z [INFO] agent.server: shutting down server
2020-03-24T20:00:12.828Z [DEBUG] agent.leader: stopping routine: routine="federation state pruning"
2020-03-24T20:00:12.828Z [DEBUG] agent.leader: stopping routine: routine="CA root pruning"
2020-03-24T20:00:12.828Z [DEBUG] agent.leader: stopping routine: routine="federation state anti-entropy"
2020-03-24T20:00:12.828Z [WARN] agent.server.serf.lan: serf: Shutdown without a Leave
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9697c4]

goroutine 178 [running]:
testing.tRunner.func1.1(0xa12ec0, 0xf89a70)
/usr/local/go/src/testing/testing.go:941 +0x3d0
testing.tRunner.func1(0xc00031f8c0)
/usr/local/go/src/testing/testing.go:944 +0x3f9
panic(0xa12ec0, 0xf89a70)
/usr/local/go/src/runtime/panic.go:967 +0x166
github.com/hashicorp/consul/api.TestAPI_SessionServiceChecks(0xc00031f8c0)
/home/circleci/project/api/session_test.go:643 +0x644
testing.tRunner(0xc00031f8c0, 0xae6b08)
/usr/local/go/src/testing/testing.go:992 +0xdc
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:1043 +0x357
```

Contributor guide

Open the contributing guide

Research direction

Start with api/session_test.go at line 643 and compare the failed CircleCI run with the second successful run. Run TestAPI_SessionServiceChecks repeatedly to investigate the intermittent nil-pointer panic. Done means the test no longer flakes or panics and passes reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.