Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

invalid memory address or nil pointer dereference on arm or i386 #8

Open
brunnels opened this issue Mar 3, 2019 · 4 comments
Open

Comments

@brunnels
Copy link

brunnels commented Mar 3, 2019

I think this is caused by https://golang.org/pkg/sync/atomic/#pkg-note-BUG

Common fix I found was making sure the int64 is first in struct definition but I tried this and it didn't resolve the issue.

dr-provision2019/03/02 18:57:21.458535 Starting API server
http: panic serving 127.0.0.1:42578: runtime error: invalid memory address or nil pointer dereference
goroutine 229 [running]:
net/http.(*conn).serve.func1(0x6682060)
        /usr/local/go/src/net/http/server.go:1769 +0x94
panic(0x9a47c0, 0x28fd398)
        /usr/local/go/src/runtime/panic.go:522 +0x1a0
github.com/digitalrebar/provision/vendor/github.com/digitalrebar/logger.(*Buffer).NewGroup(...)
        /mnt/configs/go/src/github.com/digitalrebar/provision/vendor/github.com/digitalrebar/logger/logger.go:252
github.com/digitalrebar/provision/vendor/github.com/digitalrebar/logger.(*log).Fork(0x4600ea0, 0x7ea, 0x791ec7e8)
        /mnt/configs/go/src/github.com/digitalrebar/provision/vendor/github.com/digitalrebar/logger/logger.go:596 +0x114
github.com/digitalrebar/provision/server.server.func1(0xc1bb60, 0x4a02000, 0x1)
        /mnt/configs/go/src/github.com/digitalrebar/provision/server/server.go:493 +0x38
net/http.(*conn).setState(0x6682060, 0xc1bb60, 0x4a02000, 0x1)
        /usr/local/go/src/net/http/server.go:1722 +0x100
net/http.(*conn).serve(0x6682060, 0xc14a70, 0x674a340)
        /usr/local/go/src/net/http/server.go:1822 +0xdd0
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2884 +0x298
@VictorLowther
Copy link
Contributor

woah, I had not seen this. What version of Go were you compiling with?

@brunnels
Copy link
Author

brunnels commented Mar 26, 2019 via email

@VictorLowther
Copy link
Contributor

/me sighs. The issue is that a *sync.Mutex is 32 bits on a 32 bit platform

@fairhaven
Copy link

Good evening, any possible solution to this bug? I am going through same presently

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants