canonical / canonical/spread

Panic when preparing fails

Open
#139 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
127
Forks
81
PR merge metrics
No merged PRs in 30d

Description

When there are multiple systems and some have not yet started to prepare but one already failed and prepare folds, spread may panic.

```
panic: attempting to unreserve a system that is not reserved: localhost:59315

goroutine 44 [running]:
github.com/snapcore/spread/spread.(*Runner).unreserve(0xc0001cf8c0, 0xc00041c1b0, 0xf)
/home/zyga/projects/spread/spread/runner.go:971 +0x1ad
github.com/snapcore/spread/spread.(*Runner).discardServer(0xc0001cf8c0, 0x8d2080, 0xc000420420)
/home/zyga/projects/spread/spread/runner.go:857 +0x21d
github.com/snapcore/spread/spread.(*Runner).worker(0xc0001cf8c0, 0xc00016c000, 0xc0000da630, 0xc000312b60, 0x1a, 0x1a)
/home/zyga/projects/spread/spread/runner.go:673 +0x12d5
created by github.com/snapcore/spread/spread.(*Runner).loop
/home/zyga/projects/spread/spread/runner.go:232 +0x701
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with spread/runner.go at the reported unreserve, discardServer, and worker paths, then trace how preparation failure is folded when multiple systems are involved. Reproduce the case with systems that have not started preparing alongside a failed system. Done means this scenario no longer panics while cleaning up reservations.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.