Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Panic on ARM #78

Closed
hsanjuan opened this issue May 25, 2018 · 2 comments · Fixed by #80
Closed

Panic on ARM #78

hsanjuan opened this issue May 25, 2018 · 2 comments · Fixed by #80
Assignees

Comments

@hsanjuan
Copy link
Contributor

Hi,

a user of cluster reports a panic coming from pubsub on a BeagleBone:

ipfs-cluster/ipfs-cluster#433

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

goroutine 46 [running]:
sync/atomic.addUint64(0x131c005c, 0x1, 0x0, 0x131c9150, 0x8)
	/usr/lib64/go/1.9/src/sync/atomic/64bit_arm.go:31 +0x4c
gx/ipfs/QmduQtUFqdq2RhM84yM2mYsdgJRAH8Aukb15viDxWkZtvP/go-libp2p-floodsub.(*PubSub).Publish(0x131c0000, 0x716b54, 0xf, 0x13124630, 0x5d, 0xa2, 0x0, 0x1e)
	gx/ipfs/QmduQtUFqdq2RhM84yM2mYsdgJRAH8Aukb15viDxWkZtvP/go-libp2p-floodsub/pubsub.go:556 +0x64
github.com/ipfs/ipfs-cluster/monitor/pubsubmon.(*Monitor).PublishMetric(0x12d5caa0, 0x70dc03, 0x4, 0x12d16c60, 0x22, 0x0, 0x0, 0xa5f1d075, 0x1531f22e, 0x1, ...)
	github.com/ipfs/ipfs-cluster/monitor/pubsubmon/pubsubmon.go:193 +0x39c
github.com/ipfs/ipfs-cluster.(*Cluster).pushPingMetrics(0x12d64320)
	github.com/ipfs/ipfs-cluster/cluster.go:232 +0xc0
created by github.com/ipfs/ipfs-cluster.(*Cluster).run
	github.com/ipfs/ipfs-cluster/cluster.go:340 +0x48

Might this come from the warning here: https://golang.org/pkg/sync/atomic/#pkg-note-BUG ? @vyzo

I'll be testing with my own RPis next week, maybe I can provide more info.

@Stebalien
Copy link
Member

Looks like it. That counter needs to go at the top of the pubsub struct. Unfortunately, I can't actually test this fix.

Fix: #80

As it stands, the atomic being modified lives at 0x131c005c which is not 64bit aligned.

@hsanjuan
Copy link
Contributor Author

I can test it

@ghost ghost removed the in progress label Jun 3, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants