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

Intermittently getting fatal error: bulkBarrierPreWrite: unaligned arguments #25

Open
itsmurugappan opened this issue Aug 2, 2023 · 6 comments

Comments

@itsmurugappan
Copy link

Issue

Intermittently getting "fatal error: bulkBarrierPreWrite: unaligned arguments"

fatal error: bulkBarrierPreWrite: unaligned arguments

goroutine 25 [running]:
runtime.throw({0x198cc6f?, 0x0?})
        C:/Program Files/Go/src/runtime/panic.go:1047 +0x65 fp=0xc0007d2a20 sp=0xc0007d29f0 pc=0xb39225
runtime.bulkBarrierPreWrite(0xc0007d2ab8?, 0x4b?, 0xc000015040?)
        C:/Program Files/Go/src/runtime/mbitmap.go:582 +0x46b fp=0xc0007d2a90 sp=0xc0007d2a20 pc=0xb1578b
runtime.typedmemmove(0x19289a0, 0x1ecb6c70ed2, 0xc0007d2b78)
        C:/Program Files/Go/src/runtime/mbarrier.go:162 +0x45 fp=0xc0007d2ac8 sp=0xc0007d2a90 pc=0xb148e5
inet.af/wf.toFilter0(0xc0001752c0?, 0xc000675ec0, 0xc00072e001?)
        C:/Users/muru/go/pkg/mod/inet.af/wf@v0.0.0-20221017222439-36129f591884/compose.go:104 +0x30c fp=0xc0007d2c58 sp=0xc0007d2ac8 pc=0x16b510c
inet.af/wf.(*Session).AddRule(0xc000282900, 0xc000675ec0)
        C:/Users/muru/go/pkg/mod/inet.af/wf@v0.0.0-20221017222439-36129f591884/firewall.go:691 +0xcb fp=0xc0007d2cf0 sp=0xc0007d2c58 pc=0x16ba48b

When

While calling this function

Go Version

Tried 1.18. 1.19, 1.20

Occurence Frequency

Very random. Couldnt find a pattern.

@itsmurugappan itsmurugappan changed the title Intermittently fatal error: bulkBarrierPreWrite: unaligned arguments Intermittently getting fatal error: bulkBarrierPreWrite: unaligned arguments Aug 2, 2023
@bradfitz
Copy link
Member

bradfitz commented Aug 2, 2023

What Windows version and architecture?

@itsmurugappan
Copy link
Author

version is "windows server 2019 data center" and architecture is amd64

@itsmurugappan
Copy link
Author

Also tried in windows 11 pro / amd64

@jun-luo-changsha
Copy link

did it resolved?

@jun-luo-changsha
Copy link

I tried to modify the compose. go file line 103-104 by replacing

	ret := (*fwpmFilter0)(a.Alloc(unsafe.Sizeof(fwpmFilter0{})))
	*ret = fwpmFilter0{

with

   //ret := (*fwpmFilter0)(a.Alloc(unsafe.Sizeof(fwpmFilter0{})))
   ret := &fwpmFilter0{

After modifying, I tested it several times and it works fine .
However, I do not know if this modification has any other negative effects because I do not understand the specific meaning of the original code.

@idan1109
Copy link

I tried to modify the compose. go file line 103-104 by replacing

	ret := (*fwpmFilter0)(a.Alloc(unsafe.Sizeof(fwpmFilter0{})))
	*ret = fwpmFilter0{

with

   //ret := (*fwpmFilter0)(a.Alloc(unsafe.Sizeof(fwpmFilter0{})))
   ret := &fwpmFilter0{

After modifying, I tested it several times and it works fine . However, I do not know if this modification has any other negative effects because I do not understand the specific meaning of the original code.

i did you modification cause i've also find this annoying bug but its giving me this error.

go\src\inet.af\wf\compose.go:104:9: fwpmFilter0 can't be allocated in Go; it is incomplete (or unallocatable) using golang 1.18

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

4 participants