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

cmd/go: "RLock …: Function not implemented" when the main module is in a filesystem that does not support locking #48572

Open
ayush-dedhia25 opened this issue Sep 23, 2021 · 2 comments
Assignees
Milestone

Comments

@ayush-dedhia25
Copy link

@ayush-dedhia25 ayush-dedhia25 commented Sep 23, 2021

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

$ go version
go version go1.17.1 android/arm64

Does this issue reproduce with the latest release?

No

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

go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/data/data/com.termux/files/home/.cache/go-build"
GOENV="/data/data/com.termux/files/home/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="android"
GOINSECURE=""
GOMODCACHE="/data/data/com.termux/files/home/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="android"
GOPATH="/data/data/com.termux/files/home/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/data/data/com.termux/files/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/data/data/com.termux/files/usr/lib/go/pkg/tool/android_arm64"
GOVCS=""
GOVERSION="go1.17.1"
GCCGO="gccgo"
AR="ar"
CC="aarch64-linux-android-clang"
CXX="aarch64-linux-android-clang++"
CGO_ENABLED="1"
GOMOD="/storage/8D8B-150E/Go/secure-api/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/data/data/com.termux/files/usr/tmp/go-build380772883=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I tired to create a module for my new golang project using go mod init github.com/ayush/secure-api

What did you expect to see?

I expected of successfully creation of module for my project.

What did you see instead?

Error I got:
go: RLock /storage/8D8B-150E/Go/secure-api/go.mod: function not implemented

@shmsr
Copy link
Contributor

@shmsr shmsr commented Sep 23, 2021

@ayush-dedhia25 I see a similar query of yours was already answered on StackOverflow and even by a member of a Go Team (@bcmills) and still you have opened an issue here.

Refer: https://stackoverflow.com/a/68728663/5821408

@bcmills
Copy link
Member

@bcmills bcmills commented Sep 23, 2021

I explicitly mentioned the possibility of filing an issue on the SO answer:

If you can't configure the filesystem to support locking and it isn't practical for you to work within a different filesystem that does, please file an issue at https://golang.org/issue/new, and mention issue #37461 (which is closely related) in the issue description.

So I think it's fine to keep this issue open. Honestly, I think we should probably proceed without file-locking when the go.mod and go.sum files cannot be locked — they're less prone to race conditions than, say, the module cache (which must support file-locking because it is much harder to fix if it becomes corrupted, and is implicitly modified much more frequently).

@bcmills bcmills reopened this Sep 23, 2021
@bcmills bcmills changed the title RLock Error: Function not implemented cmd/go: "RLock …: Function not implemented" when the main module is in a filesystem that does not support locking Sep 23, 2021
@bcmills bcmills added this to the Backlog milestone Sep 23, 2021
@bcmills bcmills self-assigned this Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants