Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

panic: unaligned 64-bit atomic operation when running on raspberry pi 4 #13

Closed
xbassols opened this issue Nov 3, 2021 · 2 comments
Closed

Comments

@xbassols
Copy link

xbassols commented Nov 3, 2021

Following your advice I'm trying to host the service from my home network using my raspberrypi but since its using an arm32 it throws this error:

panic: unaligned 64-bit atomic operation

goroutine 6 [running]:
runtime/internal/atomic.panicUnaligned()
/usr/local/go/src/runtime/internal/atomic/unaligned.go:8 +0x24
runtime/internal/atomic.Xadd64(0x1907c0c, 0x1)
/usr/local/go/src/runtime/internal/atomic/atomic_arm.s:256 +0x14
go.mau.fi/whatsmeow.(*Client).generateRequestID(0x1907b30)
/home/pi/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20211031213406-f7df98c1e267/request.go:20 +0x34
go.mau.fi/whatsmeow.(*Client).sendIQAsync(0x1907b30, {{0x7f3410, 0x3}, {0x7f32b4, 0x3}, {{0x0, 0x0}, 0x0, 0x0, {0x7fce12, ...}, ...}, ...})
/home/pi/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20211031213406-f7df98c1e267/request.go:83 +0x28
go.mau.fi/whatsmeow.(*Client).sendKeepAlive(0x1907b30, {0x8fdb6c, 0x1901b00})
/home/pi/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20211031213406-f7df98c1e267/keepalive.go:42 +0xa4
go.mau.fi/whatsmeow.(*Client).keepAliveLoop(0x1907b30, {0x8fdb6c, 0x1901b00})
/home/pi/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20211031213406-f7df98c1e267/keepalive.go:32 +0x1b8
created by go.mau.fi/whatsmeow.(*Client).Connect
/home/pi/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20211031213406-f7df98c1e267/client.go:159 +0x354

It seems something related to this issue and I've seen it fixed by changing in64 to uint64 where it can be. Although its too low level for me to fully comprehend.

@tulir
Copy link
Owner

tulir commented Nov 3, 2021

That looks like an outdated version of whatsmeow

@xbassols
Copy link
Author

xbassols commented Nov 3, 2021

I've updated the version and tested again and the issue has been fixed. Thanks!

@xbassols xbassols closed this as completed Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants