golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.09k stars 17.68k forks source link

FATAL: ThreadSanitizer: unsupported VMA range FATAL: Found 39 - Supported 48 / go: added github.com/docker/docker v23.0.4+incompatible #59781

Closed Marietto2008 closed 1 year ago

Marietto2008 commented 1 year ago

Hello to everyone.

I'm playing with the jetson nano. I've just installed ubuntu 22.04 on top of it. Nvidia says that nothing will work on 22.04 and it is totally unsupported. Well,I'm trying to make it supported :) ; the first problem to overcome is to find a good alternative for docker,because it does not work.

# docker run -it --entrypoint "/bin/bash" ubuntu:20.04 

docker: Error response from daemon: failed to create shim task: 
OCI runtime create failed: runc create failed: unable to start container process: 
error during container init: error setting cgroup config for procHooks process:
bpf_prog_query (BPF_CGROUP_DEVICE) failed: function not implemented: unknown.
ERRO[0002] error waiting for container: context canceled

To overcome this error,I'm trying to compile go and Docker from the source code. This is what I did,following a tutorial that I found :

https://gist.github.com/cwgem/c913c80dcb8eeef38abc30ff3abf1750

and what happened :

root@marietto-nano:/home/marietto/Scaricati# sha256sum go1.10.3.linux-amd64.tar.gz
fa1b0e45d3b647c252f51f5e1204aba049cde4af177ef9f2181f43004f901035  go1.10.3.linux-amd64.tar.gz

root@marietto-nano:/home/marietto/Scaricati# mv go go1.10.3

root@marietto-nano:/home/marietto/Scaricati/go_git/src# mv /home/marietto/go /home/marietto/go1.10.3

root@marietto-nano:/home/marietto/Scaricati/go_git/src# mv /root/go /root/go1.10.3

root@marietto-nano:/home/marietto/Scaricati# nano /root/.profile

# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"

GOROOT_BOOTSTRAP="$HOME/go1.10.3"

export PATH
export GOROOT_BOOTSTRAP

root@marietto-nano:/home/marietto/Scaricati# nano /home/marietto/.profile

# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH"

GOROOT_BOOTSTRAP="$HOME/go1.10.3"

export PATH
export GOROOT_BOOTSTRAP

root@marietto-nano:/home/marietto/Scaricati# source /home/marietto/.profile

root@marietto-nano:/home/marietto/Scaricati# source /root/.profile

root@marietto-nano:/home/marietto/Scaricati# git clone https://go.googlesource.com/go go_git

Clone in 'go_git' in corso...
remote: Finding sources: 100% (20/20)
remote: Total 569744 (delta 454605), reused 569740 (delta 454605)
Ricezione degli oggetti: 100% (569744/569744), 332.85 MiB | 7.30 MiB/s, fatto.
Risoluzione dei delta: 100% (454605/454605), fatto.
Aggiornamento dei file in corso: 100% (12325/12325), fatto.

root@marietto-nano:/home/marietto/Scaricati# cd go_git

root@marietto-nano:/home/marietto/Scaricati/go_git# git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/dev.boringcrypto
  remotes/origin/dev.boringcrypto.go1.10
  remotes/origin/dev.boringcrypto.go1.11
  remotes/origin/dev.boringcrypto.go1.12
  remotes/origin/dev.boringcrypto.go1.13
  remotes/origin/dev.boringcrypto.go1.14
  remotes/origin/dev.boringcrypto.go1.15
  remotes/origin/dev.boringcrypto.go1.16
  remotes/origin/dev.boringcrypto.go1.17
  remotes/origin/dev.boringcrypto.go1.18
  remotes/origin/dev.boringcrypto.go1.8
  remotes/origin/dev.boringcrypto.go1.9
  remotes/origin/dev.cc
  remotes/origin/dev.cmdgo
  remotes/origin/dev.debug
  remotes/origin/dev.fuzz
  remotes/origin/dev.garbage

root@marietto-nano:/home/marietto/Scaricati/go_git# cd src

root@marietto-nano:/home/marietto/Scaricati/go_git/src# bash all.bash

WARNING: /root/go1.10.3/bin/go does not exist, found /usr/bin/go from env
WARNING: set /usr/lib/go-1.18 as GOROOT_BOOTSTRAP
Building Go cmd/dist using /usr/lib/go-1.18. (go1.18.1 linux/arm64)
Building Go toolchain1 using /usr/lib/go-1.18.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for linux/arm64.

##### Test execution environment.
# GOARCH: arm64
# CPU:
# GOOS: linux
# OS Version: Linux 4.9.299+ #0 SMP PREEMPT Wed Mar 29 14:22:17 CEST 2023 aarch64

##### Testing packages.
ok      archive/tar     1.019s
ok      archive/zip     0.376s
ok      bufio   0.185s
ok      bytes   0.606s
ok      compress/bzip2  0.183s
ok      compress/flate  3.087s
ok      compress/gzip   11.042s
ok      compress/lzw    0.032s
ok      compress/zlib   0.063s
ok      container/heap  0.020s
ok      container/list  0.020s
ok      container/ring  0.017s
ok      context 0.040s
ok      crypto  0.010s
ok      crypto/aes      0.073s
ok      crypto/cipher   0.043s
ok      crypto/des      0.024s
ok      crypto/dsa      0.012s
ok      crypto/ecdh     0.162s
ok      crypto/ecdsa    0.109s
ok      crypto/ed25519  0.386s
ok      crypto/elliptic 0.033s
ok      crypto/hmac     0.011s
ok      crypto/internal/alias   0.007s
ok      crypto/internal/bigmod  0.773s
ok      crypto/internal/boring  0.007s
ok      crypto/internal/boring/bcache   1.052s
ok      crypto/internal/edwards25519    27.176s
ok      crypto/internal/edwards25519/field      23.933s
ok      crypto/internal/nistec  0.640s
ok      crypto/internal/nistec/fiat     0.008s [no tests to run]
ok      crypto/md5      0.014s
ok      crypto/rand     0.161s
ok      crypto/rc4      0.100s
ok      crypto/rsa      2.383s
ok      crypto/sha1     0.015s
ok      crypto/sha256   0.025s
ok      crypto/sha512   0.013s
ok      crypto/subtle   0.540s
ok      crypto/tls      2.196s
ok      crypto/x509     1.871s
ok      database/sql    0.450s
ok      database/sql/driver     0.010s
ok      debug/buildinfo 0.026s
ok      debug/dwarf     0.110s
ok      debug/elf       0.919s
ok      debug/gosym     0.098s
ok      debug/macho     0.113s
ok      debug/pe        0.090s
ok      debug/plan9obj  0.015s
ok      embed   0.015s [no tests to run]
ok      embed/internal/embedtest        0.012s
ok      encoding/ascii85        0.014s
ok      encoding/asn1   0.013s
ok      encoding/base32 0.062s
ok      encoding/base64 0.016s
ok      encoding/binary 0.013s
ok      encoding/csv    0.031s
ok      encoding/gob    13.220s
ok      encoding/hex    0.014s
ok      encoding/json   0.550s
ok      encoding/pem    1.785s
ok      encoding/xml    0.205s
ok      errors  0.030s
ok      expvar  0.013s
ok      flag    0.055s
ok      fmt     0.369s
ok      go/ast  0.014s
ok      go/build        10.279s
ok      go/build/constraint     0.013s
ok      go/constant     0.014s
ok      go/doc  0.249s
ok      go/doc/comment  6.088s
ok      go/format       0.020s
ok      go/importer     0.982s
ok      go/internal/gccgoimporter       0.050s
ok      go/internal/gcimporter  5.610s
ok      go/internal/srcimporter 35.102s
ok      go/parser       0.868s
ok      go/printer      0.868s
ok      go/scanner      0.012s
ok      go/token        0.064s
ok      go/types        21.038s
ok      hash    0.015s
ok      hash/adler32    0.020s
ok      hash/crc32      0.037s
ok      hash/crc64      0.011s
ok      hash/fnv        0.011s
ok      hash/maphash    0.305s
ok      html    0.015s
ok      html/template   0.353s
ok      image   0.274s
ok      image/color     0.056s
ok      image/draw      0.323s
ok      image/gif       0.698s
ok      image/jpeg      0.667s
ok      image/png       1.424s
ok      index/suffixarray       0.743s
ok      internal/abi    0.150s
ok      internal/buildcfg       0.009s
ok      internal/coverage/cformat       0.007s
ok      internal/coverage/cmerge        0.010s
ok      internal/coverage/pods  0.014s
ok      internal/coverage/slicereader   0.007s
ok      internal/coverage/slicewriter   0.008s
ok      internal/coverage/test  0.034s
ok      internal/cpu    0.013s
ok      internal/dag    0.011s
ok      internal/diff   0.029s
ok      internal/fmtsort        0.008s
ok      internal/fuzz   0.037s
ok      internal/godebug        0.008s
ok      internal/godebugs       0.018s
ok      internal/intern 0.926s
ok      internal/itoa   0.008s
ok      internal/poll   0.375s
ok      internal/profile        0.010s
ok      internal/reflectlite    0.314s
ok      internal/safefilepath   0.010s
ok      internal/saferio        0.060s
ok      internal/singleflight   0.039s
ok      internal/testenv        0.012s
ok      internal/trace  0.200s
ok      internal/types/errors   1.176s
ok      internal/unsafeheader   0.009s
ok      internal/xcoff  0.059s
ok      internal/zstd   0.711s
ok      io      0.056s
ok      io/fs   1.090s
ok      io/ioutil       0.017s
ok      log     0.014s
ok      log/slog        0.042s
ok      log/slog/internal/benchmarks    0.009s
ok      log/slog/internal/buffer        0.012s
ok      log/syslog      1.245s
ok      maps    0.007s
ok      math    0.028s
ok      math/big        6.714s
ok      math/bits       0.022s
ok      math/cmplx      0.013s
ok      math/rand       0.353s
ok      mime    0.036s
ok      mime/multipart  2.745s
ok      mime/quotedprintable    0.088s
ok      net     20.086s
ok      net/http        48.023s
ok      net/http/cgi    1.692s
ok      net/http/cookiejar      0.031s
ok      net/http/fcgi   0.157s
ok      net/http/httptest       0.324s
ok      net/http/httptrace      0.012s
ok      net/http/httputil       1.079s
ok      net/http/internal       0.011s
ok      net/http/internal/ascii 0.007s
ok      net/http/pprof  4.066s
ok      net/internal/socktest   0.009s
ok      net/mail        0.017s
ok      net/netip       1.247s
ok      net/rpc 0.074s
ok      net/rpc/jsonrpc 0.020s
ok      net/smtp        0.062s
ok      net/textproto   0.058s
ok      net/url 0.024s
ok      os      2.059s
ok      os/exec 0.761s
ok      os/exec/internal/fdtest 0.007s
ok      os/signal       3.467s
ok      os/user 0.017s
ok      path    0.010s
ok      path/filepath   0.136s
ok      plugin  0.011s
ok      reflect 1.708s
ok      regexp  2.140s
ok      regexp/syntax   2.998s
 ok     runtime 266.650s
ok      runtime/cgo     0.015s
ok      runtime/coverage        0.013s
ok      runtime/debug   0.138s
ok      runtime/internal/atomic 0.119s
ok      runtime/internal/math   0.007s
ok      runtime/internal/sys    0.020s
ok      runtime/internal/syscall        0.012s
ok      runtime/metrics 0.015s
ok      runtime/pprof   16.329s
ok      runtime/trace   6.822s
ok      slices  0.013s
ok      sort    0.367s
ok      strconv 3.053s
ok      strings 0.504s
ok      sync    0.988s
ok      sync/atomic     2.411s
ok      syscall 15.254s
ok      testing 1.578s
ok      testing/fstest  0.027s
ok      testing/iotest  0.043s
ok      testing/quick   0.176s
ok      text/scanner    0.021s
ok      text/tabwriter  0.014s
ok      text/template   0.155s
ok      text/template/parse     0.022s
ok      time    2.941s
ok      unicode 0.022s
ok      unicode/utf16   0.009s
ok      unicode/utf8    0.019s
ok      cmd/addr2line   3.318s
ok      cmd/api 58.340s
ok      cmd/asm/internal/asm    4.603s
ok      cmd/asm/internal/lex    0.023s
ok      cmd/compile/internal/abt        0.076s
ok      cmd/compile/internal/amd64      0.012s
ok      cmd/compile/internal/base       0.009s
ok      cmd/compile/internal/compare    0.010s
ok      cmd/compile/internal/dwarfgen   1.320s
ok      cmd/compile/internal/importer   4.484s
ok      cmd/compile/internal/ir 0.008s
ok      cmd/compile/internal/logopt     0.135s
ok      cmd/compile/internal/loopvar    164.457s
ok      cmd/compile/internal/noder      0.018s
ok      cmd/compile/internal/reflectdata        0.025s [no tests to run]
ok      cmd/compile/internal/ssa        209.373s
ok      cmd/compile/internal/syntax     0.184s
ok      cmd/compile/internal/test       38.700s
ok      cmd/compile/internal/typecheck  1.457s
ok      cmd/compile/internal/types      0.009s
ok      cmd/compile/internal/types2     16.398s
ok      cmd/covdata     0.019s
ok      cmd/cover       5.778s
ok      cmd/dist        0.011s
ok      cmd/distpack    0.031s
ok      cmd/doc 0.787s
ok      cmd/fix 25.885s
ok      cmd/go  406.466s
ok      cmd/go/internal/auth    0.014s
ok      cmd/go/internal/cache   0.944s
ok      cmd/go/internal/fsys    0.147s
ok      cmd/go/internal/generate        0.066s
ok      cmd/go/internal/get     0.049s
ok      cmd/go/internal/imports 0.065s
ok      cmd/go/internal/load    0.044s
ok      cmd/go/internal/lockedfile      0.349s
ok      cmd/go/internal/lockedfile/internal/filelock    0.062s
ok      cmd/go/internal/modconv 0.049s
ok      cmd/go/internal/modfetch        0.055s
ok      cmd/go/internal/modfetch/codehost       0.056s
ok      cmd/go/internal/modfetch/zip_sum_test   0.055s
ok      cmd/go/internal/modindex        0.692s
ok      cmd/go/internal/modload 0.063s
ok      cmd/go/internal/mvs     0.052s
ok      cmd/go/internal/par     0.057s
ok      cmd/go/internal/str     0.010s
ok      cmd/go/internal/test    0.091s
ok      cmd/go/internal/vcs     0.046s
ok      cmd/go/internal/vcweb   0.055s
ok      cmd/go/internal/vcweb/vcstest   21.772s
ok      cmd/go/internal/web     0.042s
ok      cmd/go/internal/work    0.356s
ok      cmd/gofmt       0.209s
ok      cmd/internal/archive    2.605s
ok      cmd/internal/buildid    0.752s
ok      cmd/internal/cov        1.761s
ok      cmd/internal/dwarf      0.029s
ok      cmd/internal/edit       0.033s
ok      cmd/internal/goobj      0.031s
ok      cmd/internal/moddeps    14.159s
ok      cmd/internal/notsha256  0.043s
ok      cmd/internal/obj        4.576s
ok      cmd/internal/obj/arm64  0.223s
ok      cmd/internal/obj/ppc64  0.506s
ok      cmd/internal/obj/riscv  0.143s
ok      cmd/internal/obj/s390x  0.027s
ok      cmd/internal/obj/x86    36.489s
ok      cmd/internal/objabi     0.027s
ok      cmd/internal/pkgpath    0.164s
ok      cmd/internal/pkgpattern 0.027s
ok      cmd/internal/quoted     0.019s
ok      cmd/internal/src        0.023s
ok      cmd/internal/test2json  1.262s
ok      cmd/link        82.646s
ok      cmd/link/internal/benchmark     0.033s
ok      cmd/link/internal/ld    32.614s
ok      cmd/link/internal/loader        0.085s
ok      cmd/nm  7.889s
ok      cmd/objdump     14.599s
ok      cmd/pack        1.070s
ok      cmd/pprof       2.253s
ok      cmd/trace       0.289s
ok      cmd/vet 39.242s

##### os/user with tag osusergo
ok      os/user 0.063s

##### hash/maphash purego implementation
ok      hash/maphash    0.616s

##### GOMAXPROCS=2 runtime -cpu=1,2,4 -quick
ok      runtime 99.012s

##### Testing without libgcc.
ok      net     0.089s
ok      os/user 0.060s

##### internal linking of -buildmode=pie
ok      reflect 2.358s
ok      os/user 0.053s

##### sync -cpu=10
ok      sync    1.449s

##### Testing race detector
FATAL: ThreadSanitizer: unsupported VMA range
FATAL: Found 39 - Supported 48
FAIL    runtime/race    0.049s
FAIL
2023/04/22 14:04:07 Failed: exit status 1
skipped due to unsupported VMA
FATAL: ThreadSanitizer: unsupported VMA range
FATAL: Found 39 - Supported 48
FAIL    flag    0.053s
FATAL: ThreadSanitizer: unsupported VMA range
FATAL: Found 39 - Supported 48
FAIL    os/exec 0.052s
FAIL
2023/04/22 14:06:00 Failed: exit status 1
go tool dist: FAILED

root@marietto-nano:/home/marietto/Scaricati/go_git/src#  mkdir ~/docker_build

root@marietto-nano:/home/marietto/Scaricati/go_git/src# nano /home/marietto/.profile

GOROOT_BOOTSTRAP="/home/ubuntu/go1.10.3"
GOROOT=$HOME/go_git
GOPATH=$HOME/docker_build

# set PATH so it includes user's private bin directories
PATH="$HOME/bin:$HOME/.local/bin:$PATH:$GOROOT/bin:$GOPATH/bin"

export PATH
export GOROOT_BOOTSTRAP
export GOROOT
export GOPATH

root@marietto-nano:/home/marietto/Scaricati/go_git/src# exit
exit

marietto@marietto-nano:~$ source /home/marietto/.profile

marietto@marietto-nano:~/Scaricati$ cp -r go_git /home/marietto

marietto@marietto-nano:~/Scaricati$ source /home/marietto/.profile

marietto@marietto-nano:~/Scaricati$ go version
go version go1.18.1 linux/arm64

marietto@marietto-nano:/home/marietto/go_git/src$ go get golang.org/x/tools/cmd/godoc

go: downloading golang.org/x/tools v0.8.0
go: downloading golang.org/x/sys v0.7.0
go: downloading github.com/yuin/goldmark v1.4.13
go: downloading golang.org/x/mod v0.10.0
go: downloading golang.org/x/net v0.9.1-0.20230410173003-9001ca7de9d7
go: downloading golang.org/x/crypto v0.5.1-0.20230203195927-310bfa40f1e4
go: downloading golang.org/x/text v0.9.0
go: added github.com/yuin/goldmark v1.4.13
go: upgraded golang.org/x/mod v0.8.0 => v0.10.0
go: upgraded golang.org/x/tools v0.6.0 => v0.8.0

marietto@marietto-nano:~/go_git/src$ go get -d github.com/docker/docker

go: downloading github.com/docker/docker v23.0.4+incompatible
go: added github.com/docker/docker v23.0.4+incompatible

marietto@marietto-nano:~/go_git/src$ mkdir ~/docker_utils

marietto@marietto-nano:~/go_git/src$ cd ~/docker_build/src/github.com/docker/docker/hack/dockerfile/install

bash: cd: /home/marietto/docker_build/src/github.com/docker/docker/hack/dockerfile/install: File or directory not found

root@marietto-nano:/home/marietto/go_git/src# find / -name github.com

/root/go/pkg/mod/cache/download/github.com
/root/go/pkg/mod/github.com
/home/marietto/docker_build/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com
/home/marietto/docker_build/pkg/mod/cache/download/github.com
/home/marietto/docker_build/pkg/mod/github.com
/home/marietto/Scaricati/go1.10.3/pkg/linux_amd64/cmd/vendor/github.com
/home/marietto/Scaricati/go1.10.3/src/cmd/vendor/github.com
/home/marietto/Scaricati/go_git/src/cmd/vendor/github.com
/home/marietto/go1.10.3/pkg/mod/cache/download/github.com
/home/marietto/go1.10.3/pkg/mod/github.com
/home/marietto/go_git/src/cmd/vendor/github.com
find: ‘/run/user/1000/doc’: Permesso negato
find: ‘/run/user/1000/gvfs’: Permesso negato
/usr/lib/go-1.18/pkg/linux_arm64/cmd/vendor/github.com
/usr/share/go-1.18/src/cmd/vendor/github.com

I think that these errors :

FATAL: ThreadSanitizer: unsupported VMA range FATAL: Found 39 - Supported 48 
go: downloading github.com/docker/docker v23.0.4+incompatible
go: added github.com/docker/docker v23.0.4+incompatible

prevents the creation of this directory :

"/home/marietto/docker_build/src/github.com/docker/docker/hack/dockerfile"

and I can't continue the configuration. Is there a way to fix it ?

seankhliao commented 1 year ago

that has nothing to do with your error

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions