zsysd panic after ubuntu apt update
nanliu opened this issue · 2 comments
nanliu commented
Describe the bug
After a recent apt package update, zsys daemon no longer starts properly. Journalctl indicates the following error:
Apr 01 12:10:27 neon zsysd[1256455]: panic: runtime error: index out of range [33] with length 33
Apr 01 12:10:27 neon zsysd[1256455]: goroutine 1 [running]:
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/vendor/github.com/bicomsystems/go-libzfs.(*Pool).ReloadProperties(0xc0000deea0)
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/vendor/github.com/bicomsystems/go-libzfs/zpool.go:518 +0x56e
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/vendor/github.com/bicomsystems/go-libzfs.(*Dataset).Pool(0x400?)
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/vendor/github.com/bicomsystems/go-libzfs/zfs.go:306 +0x55
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/zfs.(*Dataset).refreshProperties(0xc000166000, {0xad3d20, 0xc000024040})
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/zfs/helpers.go:41 +0x41d
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/zfs.newDatasetTree({0xad3d20, 0xc000024040}, {0xad7fe8?, 0xc00014da40?}, 0xc0>
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/zfs/helpers.go:214 +0x258
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/zfs.(*Zfs).Refresh(0xc00007c980, {0xad3d20, 0xc000024040})
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/zfs/zfs.go:118 +0x2d2
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/zfs.New({0xad3d20, 0xc000024040}, {0xc0000df6c0, 0x1, 0xc0000df6d8?})
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/zfs/zfs.go:93 +0xf7
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/machines.New({0xad3d20, _}, {_, _}, {_, _, _})
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/machines/machines.go:128 +0x337
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/daemon.New({0x9fd26f, 0xf}, {0x0, 0x0, 0xacfce0?})
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/internal/daemon/daemon.go:115 +0x57a
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/cmd/zsysd/daemon.glob..func2(0xe29940?, {0xea2c40?, 0x0?, 0x0?})
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/cmd/zsysd/daemon/zsysd.go:30 +0x52
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/vendor/github.com/spf13/cobra.(*Command).execute(0xe29940, {0xc000020250, 0x0, 0x0})
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/vendor/github.com/spf13/cobra/command.go:830 +0x663
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xe29940)
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/vendor/github.com/spf13/cobra/command.go:914 +0x2ee
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/vendor/github.com/spf13/cobra.(*Command).Execute(...)
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/vendor/github.com/spf13/cobra/command.go:864
Apr 01 12:10:27 neon zsysd[1256455]: main.main()
Apr 01 12:10:27 neon zsysd[1256455]: github.com/ubuntu/zsys/cmd/zsysd/main.go:36 +0xb3
Apr 01 12:10:27 neon systemd[1]: zsysd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
To Reproduce
Steps to reproduce the behavior:
apt update && apt upgrade
- Error during apt:
Get:1 http://us.archive.ubuntu.com/ubuntu jammy/universe amd64 xclip amd64 0.13-2 [18.3 kB]
Fetched 18.3 kB in 0s (47.9 kB/s)
ERROR couldn't connect to zsys daemon: connection error: desc = "transport: Error while dialing dial unix /run/zsysd.sock: connect: connection refused"
Expected behavior
zsys daemon should not be affected by normal package updates.
For ubuntu users, please run and copy the following:
ubuntu-bug zsys --save=/tmp/report
- Copy paste below
/tmp/report
content:
The report is too long and prevents submitting the GitHub issue. The full dump is available here:
https://gist.github.com/nanliu/9c6b2fb8ad5f47e5cac54a8da62d6f6f
Screenshots
If applicable, add screenshots to help explain your problem.
Installed versions:
- OS: (
/etc/os-release
)
PRETTY_NAME="Ubuntu Jammy Jellyfish (development branch)"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
- Zsysd running version: (
zsysctl version
output)
zsysctl 0.5.8build2
Additional context
Add any other context about the problem here.
nanliu commented
Fixed in zys 0.5.9