-
Notifications
You must be signed in to change notification settings - Fork 18k
fatal error: bulkBarrierPreWrite: unaligned arguments (go 1.19.1, looks like regression) #55122
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
Comments
This is strange. Copying a |
@randall77 surely no special command-line flags from me, seems also nothing special from the build system (just trimpath and other harmless stuff). While comparing -gcflags -S output, I see: go 1.18.6: 0x0b19 02841 (lnwire/lnwire.go:477) MOVUPS "".alias+172(SP), X0 0x0b21 02849 (lnwire/lnwire.go:477) MOVQ ""..autotmp_1115+384(SP), CX 0x0b29 02857 (lnwire/lnwire.go:477) MOVUPS X0, (CX) 0x0b2c 02860 (lnwire/lnwire.go:477) MOVUPS "".alias+188(SP), X0 0x0b34 02868 (lnwire/lnwire.go:477) MOVUPS X0, 16(CX) go1.19.1: 0x1701 05889 (lnwire/lnwire.go:477) TESTB AL, (BX) 0x1703 05891 (lnwire/lnwire.go:477) PCDATA $0, $-2 0x1703 05891 (lnwire/lnwire.go:477) CMPL runtime.writeBarrier(SB), $0 0x170a 05898 (lnwire/lnwire.go:477) JNE 5928 0x170c 05900 (lnwire/lnwire.go:477) MOVUPS github.com/lightningnetwork/lnd/lnwire.alias+172(SP), X0 0x1714 05908 (lnwire/lnwire.go:477) MOVUPS X0, (BX) 0x1717 05911 (lnwire/lnwire.go:477) MOVUPS github.com/lightningnetwork/lnd/lnwire.alias+188(SP), X0 0x171f 05919 (lnwire/lnwire.go:477) MOVUPS X0, 16(BX) 0x1723 05923 (lnwire/lnwire.go:477) JMP 6062 0x1728 05928 (lnwire/lnwire.go:477) LEAQ type.github.com/lightningnetwork/lnd/lnwire.OpaqueReason(SB), AX 0x172f 05935 (lnwire/lnwire.go:477) LEAQ github.com/lightningnetwork/lnd/lnwire.alias+172(SP), CX 0x1737 05943 (lnwire/lnwire.go:477) CALL runtime.typedmemmove(SB) 0x173c 05948 (lnwire/lnwire.go:477) JMP 6062 (it's my first time with go's assembly output, sorry, I probably should have made it more informative but I don't yet know how). These two pieces are directly from "go build ." under lnwire/, so nothing changes but the Go version, and no flags from makefiles and build scripts are used. Looks like much more interesting things happen in 1.19.1 for the same assignment, and somehow there is a branch with typedmemmove. |
That does look like a compiler bug. It seems it is trying to assign to a |
Reproducer:
Fails on 1.19.1 and tip, doesn't fail for 1.19 and earlier. @gopherbot please open a backport issue for 1.19. |
Backport issue(s) opened: #55124 (for 1.19). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Probably caused by https://go-review.googlesource.com/c/go/+/425076 . Or more correctly, that CL tickled an existing bug. The problem is that the We have 2 different SSA passes shouldn't really depend on the base types of pointer types to make decisions like this. At least, as long as we make pointer casts just The CL referenced above was backported to both 1.19 and 1.18. Not sure why 1.18 isn't failing, but it may need the backport as well. |
Change https://go.dev/cl/431496 mentions this issue: |
This bug does happen on 1.18.6, I have a test case in the CL above. @gopherbot please open a backport issue for 1.18. |
You have to create the backport manually, gopherbot only listen to the first backport comment. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
It appears with the latest release (go 1.19.1 at the time of writing), while everything is fine when compiling with go 1.18.6.
The problem is, I can't reproduce it reliably, as I have no testing environment with the same amount of real-life load.
However, while everything is the same, on 1.19.1 I get (1) first crash after 5 hours, (2) second crash after 6 hours, and on 1.18.6 I have 35+ hours without a panic.
More info might eventually appear at lightningnetwork/lnd#6923 if LND developers engage in testing on 1.19
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I've built the LND project (see lightningnetwork/lnd#6923 for details) and used it under a significant load for several hours.
What did you expect to see?
No panic
What did you see instead?
Two panics in a row, after several hours each, triggered by the same line of seemingly innocent assignment
The text was updated successfully, but these errors were encountered: