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

fmt: unexpected fault address 0x0 #56265

Closed
arch3754 opened this issue Oct 17, 2022 · 10 comments
Closed

fmt: unexpected fault address 0x0 #56265

arch3754 opened this issue Oct 17, 2022 · 10 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@arch3754
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.19.2 linux/amd64

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/lib/golang"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build275872546=/tmp/go-build -gno-record-gcc-switches"

image

Is there a known repair or workaround

@arch3754
Copy link
Author

I have not been able to find a consistent repro for this, It happens about 1/100000 of the time when running the program over a large service.

@dr2chase
Copy link
Contributor

This needs more information, please. What program? What service? Is cgo or unsafe code involved? Have you tried the race detector?

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 17, 2022
@arch3754
Copy link
Author

For a service requested by a batch of rpc clients, a log is printed after each request is completed. The error is reported when the network request reports an error, not involving cgo and unsafe code

@ZekeLu
Copy link
Contributor

ZekeLu commented Oct 20, 2022

Is it possible to run your code with the race detector enabled, as suggested by dr2chase@ ?. See https://go.dev/blog/race-detector.

@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 Oct 20, 2022
@arch3754
Copy link
Author

Is it possible to run your code with the race detector enabled, as suggested by dr2chase@ ?. See https://go.dev/blog/race-detector.

There should be no race. Each request is an independent goroutine. The log is also independent in goroutine. The error "err" is also declared independently

@arch3754
Copy link
Author

The project returns an error in the production environment for a few days, which cannot be reproduced in the test environment at present

@ZekeLu
Copy link
Contributor

ZekeLu commented Oct 20, 2022

Maybe the access to e.Source (line 482) is racy?

go/src/net/net.go

Lines 473 to 494 in 8190876

func (e *OpError) Error() string {
if e == nil {
return "<nil>"
}
s := e.Op
if e.Net != "" {
s += " " + e.Net
}
if e.Source != nil {
s += " " + e.Source.String()
}
if e.Addr != nil {
if e.Source != nil {
s += "->"
} else {
s += " "
}
s += e.Addr.String()
}
s += ": " + e.Err.Error()
return s
}

@arch3754
Copy link
Author

This error is returned by the "conn. Write" or "DialTimeout" method of the "net" package. I'm not sure which one it is

@ianlancetaylor
Copy link
Contributor

Rather than try to analyze the code by looking at it, I very strongly suggest that you try running the program with the race detector. Thanks.

@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 Nov 1, 2022
@seankhliao seankhliao added this to the Unplanned milestone Nov 19, 2022
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

6 participants