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

runtime: unexpected fault [signal SIGBUS: bus error code=0x1 addr=0x1085d2380 pc=0x100b211c0] #66555

Open
isdwei opened this issue Mar 27, 2024 · 5 comments
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@isdwei
Copy link

isdwei commented Mar 27, 2024

Go version

go1.20 darwin

Output of go env in your module/workspace:

GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/bytedance/Library/Caches/go-build"
GOENV="/Users/bytedance/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/bytedance/go/pkg/mod"
GONOPROXY="*.byted.org,*.everphoto.cn,git.smartisan.com"
GONOSUMDB="*.byted.org,*.everphoto.cn,git.smartisan.com"
GOOS="darwin"
GOPATH="/Users/bytedance/go"
GOPRIVATE="*.byted.org,*.everphoto.cn,git.smartisan.com"
GOPROXY="https://goproxy.byted.org|https://goproxy.cn|direct"
GOROOT="/Users/bytedance/go/go1.20"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/Users/bytedance/go/go1.20/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/bytedance/Projects/tradeparttern/standard_aftersale_capability_starter/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/cj/4trqpd515lb3wcrb5vspkz0c0000gn/T/go-build290706001=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

func TestAfterSaleServiceReplayForSelf(t *testing.T) {
	logIdList := []string{
		"20240327120656CB50B205FA452FA5EF41",
		//"021708442837867fdbddc01002b00361c45a17a0000008b3b50ae",
		//"202312061114300102252441498726775",
		//"2023120520065301022524414989452A1",
		//"20231205154649010225127083318DE2",
		//"20231123173259010225244149270B6F0", // 先过滤
		//"202312111823293D8AB2535416204AEE38",
		//"20231201141159010225127083232B4A",
	}
	replay.Replay(context.Background(), t, logIdList)
}

What did you see happen?

[Metrics(v4)] metrics new writer error: factory is not able to fill the pool: metrics sdk can not get agent socket path: dial unixpacket /opt/tmp/sock/metric_seqpacket.sock: socket: protocol not supported, all metrics would be dropped
[Metrics(v4)] metrics new writer error: factory is not able to fill the pool: metrics sdk can not get agent socket path: dial unixpacket /opt/tmp/sock/metric_seqpacket.sock: socket: protocol not supported, all metrics would be dropped
init /Users/bytedance/go/pkg/mod/code.byted.org/ttarch/byteset_sdk@v1.0.14/pkg/client/action/metainfo.go:17 60002 ms
[Metrics(v3)] metrics new writer error: metrics sdk can not get agent socket path: dial unixgram /tmp/metric.sock: connect: no such file or directory, all metrics would be dropped
unexpected fault address 0x1085d2380
fatal error: fault
[signal SIGBUS: bus error code=0x1 addr=0x1085d2380 pc=0x100b211c0]

goroutine 1 [running, locked to thread]:
runtime.throw({0x1107c10e6?, 0x106f328c8?})
	/Users/bytedance/go/go1.20rc3/src/runtime/panic.go:1047 +0x40 fp=0x140041935d0 sp=0x140041935a0 pc=0x10097ba90
runtime.sigpanic()
	/Users/bytedance/go/go1.20rc3/src/runtime/signal_unix.go:834 +0x10c fp=0x14004193600 sp=0x140041935d0 pc=0x10099214c
encoding/binary.bigEndian.PutUint32({}, {0x1085d2380, 0x112e562d0, 0x140000021a0}, 0x0)
	/Users/bytedance/go/go1.20rc3/src/encoding/binary/binary.go:163 +0x50 fp=0x14004193630 sp=0x14004193610 pc=0x100b211c0
github.com/cloudwego/kitex/pkg/protocol/bthrift.binaryProtocol.WriteI32({}, {0x1085d2380, 0x112e562d0, 0x140000021a0}, 0x0)
	/Users/bytedance/go/pkg/mod/github.com/cloudwego/kitex@v0.8.0/pkg/protocol/bthrift/binary.go:118 +0x38 fp=0x14004193670 sp=0x14004193630 pc=0x100feacb8
github.com/cloudwego/kitex/pkg/protocol/bthrift.binaryProtocol.WriteBinaryNocopy({}, {0x1085d2380, 0x112e562d0, 0x140000021a0}, {0x14002212e38, 0x0}, {0x43101, 0x0, 0x0})
	/Users/bytedance/go/pkg/mod/github.com/cloudwego/kitex@v0.8.0/pkg/protocol/bthrift/binary.go:148 +0x58 fp=0x14004193710 sp=0x14004193670 pc=0x100feb238
github.com/cloudwego/kitex/pkg/protocol/bthrift.binaryProtocol.WriteStringNocopy({}, {0x1085d2380, 0x112e562d0, 0x140000021a0}, {0x14002212e38, 0x0}, {0x43101, 0x0})
	/Users/bytedance/go/pkg/mod/github.com/cloudwego/kitex@v0.8.0/pkg/protocol/bthrift/binary.go:144 +0x90 fp=0x14004193790 sp=0x14004193710 pc=0x100feb180
code.byted.org/ecom/business/xiaodian/apple/self/starter/standard_aftersale_capability.init.0()
	/Users/bytedance/go/pkg/mod/code.byted.org/ecom/business/xiaodian/apple/self/starter/standard_aftersale_capability@v0.0.2-0.20240325025942-b6357c6b7690/starter.go:19 +0x40 fp=0x14004193920 sp=0x14004193790 pc=0x1085d23c0
code.byted.org/ecom/init_tracer.doInit()
	/Users/bytedance/go/pkg/mod/code.byted.org/ecom/init_tracer@v0.5.0/init_tracer.go:62 +0x288 fp=0x14004193a70 sp=0x14004193920 pc=0x106f327a8
runtime.doInit(0x11a92f4e0)
	/Users/bytedance/go/go1.20rc3/src/runtime/proc.go:6506 +0x130 fp=0x14004193bb0 sp=0x14004193a70 pc=0x10098ac80
runtime.doInit(0x11a972960)
	/Users/bytedance/go/go1.20rc3/src/runtime/proc.go:6483 +0x70 fp=0x14004193cf0 sp=0x14004193bb0 pc=0x10098abc0
runtime.doInit(0x11a958780)
	/Users/bytedance/go/go1.20rc3/src/runtime/proc.go:6483 +0x70 fp=0x14004193e30 sp=0x14004193cf0 pc=0x10098abc0
runtime.doInit(0x11a923b40)
	/Users/bytedance/go/go1.20rc3/src/runtime/proc.go:6483 +0x70 fp=0x14004193f70 sp=0x14004193e30 pc=0x10098abc0
runtime.main()
	/Users/bytedance/go/go1.20rc3/src/runtime/proc.go:233 +0x18c fp=0x14004193fd0 sp=0x14004193f70 pc=0x10097e12c
runtime.goexit()
	/Users/bytedance/go/go1.20rc3/src/runtime/asm_arm64.s:1172 +0x4 fp=0x14004193fd0 sp=0x14004193fd0 pc=0x1009b0044

goroutine 2 [force gc (idle), 1 minutes]:
runtime.gopark(0x112e68e08, 0x11aad7f90, 0x11, 0x14, 0x1)
	/Users/bytedance/go/go1.20rc3/src/runtime/proc.go:381 +0xd4 fp=0x14000084f70 sp=0x14000084f40 pc=0x10097e5a4
runtime.goparkunlock(0x0?, 0x0?, 0x0?, 0x0?)
	/Users/bytedance/go/go1.20rc3/src/runtime/proc.go:387 +0x34 fp=0x14000084fa0 sp=0x14000084f70 pc=0x10097e634
runtime.forcegchelper()
	/Users/bytedance/go/go1.20rc3/src/runtime/proc.go:305 +0xac fp=0x14000084fd0 sp=0x14000084fa0 pc=0x10097e3cc
runtime.goexit()
	/Users/bytedance/go/go1.20rc3/src/runtime/asm_arm64.s:1172 +0x4 fp=0x14000084fd0 sp=0x14000084fd0 pc=0x1009b0044
created by runtime.init.6
	/Users/bytedance/go/go1.20rc3/src/runtime/proc.go:293 +0x24

goroutine 3 [GC sweep wait]:
runtime.gopark(0x112e68e08, 0x11aadb680, 0xc, 0x14, 0x1)
	/Users/bytedance/go/go1.20rc3/src/runtime/proc.go:381 +0xd4 fp=0x14000085740 sp=0x14000085710 pc=0x10097e5a4
runtime.goparkunlock(0x1?, 0x0?, 0x0?, 0x0?)
	/Users/bytedance/go/go1.20rc3/src/runtime/proc.go:387 +0x34 fp=0x14000085770 sp=0x14000085740 pc=0x10097e634
runtime.bgsweep(0x0?)

What did you expect to see?

code can work good

@isdwei
Copy link
Author

isdwei commented Mar 27, 2024

this unit test can work good when i run it with goland, but throw fatal error when i try to debug it

@isdwei
Copy link
Author

isdwei commented Mar 27, 2024

and the line in error stack "/Users/bytedance/go/pkg/mod/code.byted.org/ecom/business/xiaodian/apple/self/starter/standard_aftersale_capability@v0.0.2-0.20240325025942-b6357c6b7690/starter.go:19 +0x40 fp=0x14004193920 sp=0x14004193790 pc=0x1085d23c0" code is a init func like "func init() {XXXXXX}"

@seankhliao
Copy link
Member

1.20 isn't a supported release, does it reproduce on 1.22?

@seankhliao seankhliao changed the title import/path: unexpected fault [signal SIGBUS: bus error code=0x1 addr=0x1085d2380 pc=0x100b211c0] runtime: unexpected fault [signal SIGBUS: bus error code=0x1 addr=0x1085d2380 pc=0x100b211c0] Mar 27, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Mar 27, 2024
@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed compiler/runtime Issues related to the Go compiler and/or runtime. labels Mar 27, 2024
@isdwei
Copy link
Author

isdwei commented Mar 27, 2024

however my code can't run on 1.22, errors : # github.com/choleraehyq/pid
../../../../go/pkg/mod/github.com/choleraehyq/pid@v0.0.17/pid_go1.5_arm64.s:44: expected pseudo-register; found R13
../../../../go/pkg/mod/github.com/choleraehyq/pid@v0.0.17/pid_go1.5_arm64.s:45: expected pseudo-register; found R14
asm: assembly of ../../../../go/pkg/mod/github.com/choleraehyq/pid@v0.0.17/pid_go1.5_arm64.s failed
../../../../go/pkg/mod/code.byted.org/gopkg/pid@v0.0.17/pid_go1.5_arm64.s:28: expected pseudo-register; found R13
../../../../go/pkg/mod/code.byted.org/gopkg/pid@v0.0.17/pid_go1.5_arm64.s:29: expected pseudo-register; found R14
asm: assembly of ../../../../go/pkg/mod/code.byted.org/gopkg/pid@v0.0.17/pid_go1.5_arm64.s failed

@isdwei
Copy link
Author

isdwei commented Mar 27, 2024

1.20 isn't a supported release, does it reproduce on 1.22?

the code can run on others computer with same config, i think it may have some err with my dev env😭

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants