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 in ServeHTTP: unaligned 64-bit atomic operation #516

Closed
jmkristian opened this issue Aug 28, 2021 · 3 comments
Closed

panic in ServeHTTP: unaligned 64-bit atomic operation #516

jmkristian opened this issue Aug 28, 2021 · 3 comments

Comments

@jmkristian
Copy link

WebDAV requests fail with status "500 Internal Server Error". The log (attached) contains "panic in ServeHTTP: "unaligned 64-bit atomic operation".
panic.txt

This seems to be caused by a bug in golang on the armv7l architecture, for example my Raspberry Pi 3. Fixes have been proposed here and here. Some people have worked around it by carefully shuffling field declarations to achieve the required alignment.

I built sftpgo from source code.
$ ./sftpgo -v
SFTPGo 2.1.0-dev-b903a6e-dirty-2021-08-27T20:47:49Z +metrics -azblob -gcs -s3 -bolt -mysql -pgsql +sqlite +portable
$ go version
go version go1.17 linux/arm
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
$ uname -mpisr
Linux 5.4.0-1041-raspi armv7l armv7l armv7l

@drakkan
Copy link
Owner

drakkan commented Aug 28, 2021

Hi,

can you please confirm that it works now? This bug recurs from time to time, I should test at least one 32-bit platform using GitHub actions

@drakkan
Copy link
Owner

drakkan commented Aug 28, 2021

It shouldn't happen again in the future

16ba7dd

drakkan added a commit that referenced this issue Aug 28, 2021
@jmkristian
Copy link
Author

That solved the problem. Thank you!

can you please confirm that it works now?

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