Dangling symlinks cause `spread` to panic
- Dominant language
- Go
- Stars
- 127
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
Dangling symlinks in a spread test suite directory cause spread to panic with no useful error output. I can only reproduce this on self-hosted runners with the `spread-installed` tag.
Error:
```bash
Run spread google:ubuntu-24.04-64
spread google:ubuntu-24.04-64
shell: /usr/bin/bash -e {0}
env:
SPREAD_GOOGLE_KEY:
UA_TOKEN: ***
RUN_UA_TESTS: true
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x74bb25]
Error: Process completed with exit code 2.
```
I accidentally had a dangling symlink when removing a shared test like this:
```
tests/spread/
├── _common/
│ └── test-1/ ← deleted
├── core22/
│ └── test-1 -> ../_common/test-1 ← deleted
├── core24/
│ └── test-1 -> ../_common/test-1 ← deleted
└── core26/
└── test-1 -> ../_common/test-1 ← dangling (forgotten, causes the panic)
```
See https://github.com/canonical/snapcraft/pull/6198 and https://github.com/canonical/snapcraft/actions/runs/24582803735/job/71885536820?pr=6198 for a reproducer.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.