Open
Description
netns appears to crash on an armv5 board when run on the command line or as a runc prehook with the following error (hostname and path replaced in the error):
root@<host>:~# netns ls
panic: runtime error: index out of range
goroutine 1 [running]:
go.etcd.io/bbolt.(*DB).page(...)
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/vendor/pkg/mod/go.etcd.io/[email protected]/db.go:793
go.etcd.io/bbolt.(*Tx).page(...)
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/vendor/pkg/mod/go.etcd.io/[email protected]/tx.go:576
go.etcd.io/bbolt.(*Bucket).pageNode(0x80a940, 0x726f7400, 0x0, 0xb, 0xb)
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/vendor/pkg/mod/go.etcd.io/[email protected]/bucket.go:697 +0x1a8
go.etcd.io/bbolt.(*Cursor).First(0x85cd5c, 0x0, 0x0, 0x4b40dc, 0x0, 0x862100, 0x0)
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/vendor/pkg/mod/go.etcd.io/[email protected]/cursor.go:34 +0x58
go.etcd.io/bbolt.(*Bucket).ForEach(0x80a940, 0x85cd90, 0xb, 0xb)
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/vendor/pkg/mod/go.etcd.io/[email protected]/bucket.go:360 +0x8c
github.com/genuinetools/netns/network.(*Client).List.func1(0x862100, 0x2b65b0, 0x862100)
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/network/list.go:42 +0xb8
go.etcd.io/bbolt.(*DB).View(0x868120, 0x85ce10, 0x0, 0x0)
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/vendor/pkg/mod/go.etcd.io/[email protected]/db.go:626 +0x84
github.com/genuinetools/netns/network.(*Client).List(0x83a2c0, 0x0, 0x0, 0x0, 0x0, 0x0)
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/network/list.go:38 +0x1f4
main.(*listCommand).Run(0x4b40dc, 0x302470, 0x80a880, 0x80c040, 0x0, 0x0, 0x0, 0x6)
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/list.go:24 +0x24
github.com/genuinetools/pkg/cli.(*Program).run(0x83a280, 0x302470, 0x80a880, 0x80c040, 0x2, 0x2, 0x11e01, 0x80e3e8)
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/vendor/pkg/mod/github.com/genuinetools/[email protected]/cli/cli.go:212 +0x39c
github.com/genuinetools/pkg/cli.(*Program).Run(0x83a280)
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/vendor/pkg/mod/github.com/genuinetools/[email protected]/cli/cli.go:89 +0x4c
main.main()
<path>/build/tmp/work/armv5ehf-vfp-oe-linux-gnueabi/netns/0.5.3-r0/git/src/import/main.go:103 +0x574
this appears to be the section causing the error but it is unclear why:
func (db *DB) page(id pgid) *page {
pos := id * pgid(db.pageSize)
return (*page)(unsafe.Pointer(&db.data[pos]))
}```