goharbor / perf

performance test scripts and data
Apache License 2.0
20 stars 16 forks source link

AWS EC2: panic: runtime error: invalid memory address or nil pointer dereference #40

Open hivl opened 1 year ago

hivl commented 1 year ago

Hi, I have some problems to run perf testing from AWS EC2 instances. After installing go, checking out a repo, setting some env variables and running go run mage.go I get following ERROR (the preparation go run mage.go prepare were allready done from local mashine):


panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x10c7946]

goroutine 1 [running]:
debug/elf.(*Section).ReadAt(0xc000ba0000?, {0xc0007626c0?, 0x17?, 0x16?}, 0x16?)
    <autogenerated>:1 +0x26
archive/zip.readDirectoryEnd({0x17be540, 0xc0003f5600}, 0x210)
    /usr/local/go/src/archive/zip/reader.go:581 +0xf5
archive/zip.(*Reader).init(0xc00016cc40, {0x17be540?, 0xc0003f5600}, 0x210)
    /usr/local/go/src/archive/zip/reader.go:124 +0x5c
archive/zip.NewReader({0x17be540, 0xc0003f5600}, 0x210)
    /usr/local/go/src/archive/zip/reader.go:103 +0x5e
github.com/daaku/go%2ezipexe.zipExeReaderElf({0x17c9620?, 0xc00039a298}, 0x2cc4441)
    /home/ubuntu/go/pkg/mod/github.com/daaku/go.zipexe@v0.0.0-20150329023125-a5fe2436ffcb/zipexe.go:128 +0x8b
github.com/daaku/go%2ezipexe.NewReader({0x17c9620, 0xc00039a298}, 0x0?)
    /home/ubuntu/go/pkg/mod/github.com/daaku/go.zipexe@v0.0.0-20150329023125-a5fe2436ffcb/zipexe.go:48 +0x98
github.com/daaku/go%2ezipexe.OpenCloser({0xc0003a4a40?, 0xc000a67980?})
    /home/ubuntu/go/pkg/mod/github.com/daaku/go.zipexe@v0.0.0-20150329023125-a5fe2436ffcb/zipexe.go:30 +0x57
github.com/GeertJohan/go%2erice.init.0()
    /home/ubuntu/go/pkg/mod/github.com/!geert!johan/go.rice@v0.0.0-20170420135705-c02ca9a983da/appended.go:38 +0x5e
Error: running "k6-harbor run scripts/test/get-artifact-by-digest.js --no-usage-report --vus 100 --iterations 200" failed with exit code 2
exit status 2```

have tried it out on different instance types (m5.large, c4.4xlarge) and with differetn OS (Amazon Linux 2023 AMI 2023.0.20230503.0 x86_64 HVM kernel-6.1 and Canonical, Ubuntu, 22.04 LTS, amd64 jammy image build on 2023-03-25)

what am I missing?
chlins commented 1 year ago

Which golang version do you use?

danielzhanghl commented 1 year ago

same error on go version go1.19.7 linux/amd64