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

SIGBUS error in TransferStatus on aarch64 #972

Closed
emul8ed opened this issue Apr 21, 2020 · 2 comments
Closed

SIGBUS error in TransferStatus on aarch64 #972

emul8ed opened this issue Apr 21, 2020 · 2 comments

Comments

@emul8ed
Copy link

emul8ed commented Apr 21, 2020

Which version of the AzCopy was used?

10.3.3

Which platform are you using? (ex: Windows, Mac, Linux)

Linux/Ubuntu 18.04/AArch64

What command did you run?

./azcopy cp ./afile.bin "https://account.blob.core.windows.net/container?sas_token"

What problem was encountered?

Appears to be due to an atomic load from an unaligned address

Thread 13 "azcopy" received signal SIGBUS, Bus error.
[Switching to Thread 0xffffcaffd1e0 (LWP 21378)]
github.com/Azure/azure-storage-azcopy/ste.(*JobPartPlanTransfer).TransferStatus (jppt=0xfffff7ff61e5) at /root/go/src/github.com/Azure/azure-storage-azcopy/ste/JobPartPlan.go:321

(gdb) bt
#0 github.com/Azure/azure-storage-azcopy/ste.(*JobPartPlanTransfer).TransferStatus (jppt=0xfffff7ff61e5) at /root/go/src/github.com/Azure/azure-storage-azcopy/ste/JobPartPlan.go:321
#1 github.com/Azure/azure-storage-azcopy/ste.(*jobPartMgr).ScheduleTransfers (jpm=0x400103e000, jobCtx=...) at /root/go/src/github.com/Azure/azure-storage-azcopy/ste/mgr-JobPartMgr.go:349
#2 0x00000000004e424c in github.com/Azure/azure-storage-azcopy/ste.(*jobsAdmin).scheduleJobParts (ja=0x40000221a0) at /root/go/src/github.com/Azure/azure-storage-azcopy/ste/JobsAdmin.go:281
#3 0x000000000006bf3c in runtime.goexit () at /usr/lib/go-1.13/src/runtime/asm_arm64.s:1128

0x4f01c0 <github.com/Azure/azure-storage-azcopy/ste.(*jobPartMgr).ScheduleTransfers+1720> ldar w3, [x3]

(gdb) print $x3
$2 = 0xfffff7ff6221

How can we reproduce the problem in the simplest way?

See above

Have you found a mitigation/solution?

No. I had a quick skim through the code and found that the jppt pointer appears to come from here:

return (*JobPartPlanTransfer)(unsafe.Pointer((uintptr(unsafe.Pointer(jpph)) + unsafe.Sizeof(*jpph) + uintptr(jpph.CommandStringLength)) + (unsafe.Sizeof(JobPartPlanTransfer{}) * uintptr(transferIndex))))

If CommandStringLength or sizeof(JobPartPlanTransfer) isn't a multiple of the natural alignment of JobPartPlanTransfer, then I can see how we'd end up in this situation. Unfortunately I've never written nor debugged a line of Go in my life, and I don't particularly want to start now, so that's as far as I've got :).

@JohnRusk
Copy link
Member

Thanks for logging this and looking up the likely cause.

@emul8ed
Copy link
Author

emul8ed commented Apr 24, 2020

You're welcome. I can provision an aarch64 VM on corp for testing if you need it. Otherwise, let me know if there's anything else I can do to help.

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

Successfully merging a pull request may close this issue.

3 participants