I have questions about segmentation faults in go r...
# general
d
I have questions about segmentation faults in go resolve on M1 machines in ancient pants.
One of my coworkers is on a new M1 machine and is hitting a segfault error during resolve. I've never seen this before, and know basically nil about go.
Full output.txt
The relevant bit is right at the end:
Copy code
11:54:49 19:35   [resolve]
11:54:49 19:35     [ivy]
11:54:49 19:35       [cache].
                   Using cached artifacts for 11 targets.
11:54:50 19:36       [ivy-resolve]
11:54:51 19:37       [cache].
                   Using cached artifacts for 296 targets.
11:54:51 19:37       [ivy-resolve]
11:55:08 19:54     [coursier]
11:55:08 19:54     [go]
11:55:09 19:55       [cache]                         .
                   Using cached artifacts for 1 target.
                   No cached artifacts for 25 targets.
                   Invalidated 25 targets.
11:55:09 19:55       [fetch <http://github.com/AndreasBriese/bbloom|github.com/AndreasBriese/bbloom>]INFO] Downloading <https://github.com/AndreasBriese/bbloom/archive/0320de81a58b973b5187098f4815608711c70f3b.tar.gz>...
INFO] Attempting to fetch go.tar.gz binary from: <https://foursquaredev.jfrog.io/foursquaredev/fsqdev/pants/fs-bootstrap/bin/go/mac/10.13/1.10.5/go.tar.gz> ...
INFO] Attempting to fetch go.tar.gz binary from: <https://foursquaredev.jfrog.io/foursquaredev/pantsbuild-s3/bin/go/mac/10.13/1.10.5/go.tar.gz> ...
100% .................................................. 88207 KB 65.414s
INFO] Fetched go.tar.gz binary from: <https://foursquaredev.jfrog.io/foursquaredev/pantsbuild-s3/bin/go/mac/10.13/1.10.5/go.tar.gz> .

11:56:20 21:06       [list <http://github.com/AndreasBriese/bbloom|github.com/AndreasBriese/bbloom>]
                     ==== stderr ====
                     go tool compile: signal: segmentation fault
                     go tool compile: signal: segmentation fault
                     go tool compile: signal: segmentation fault
                     go tool compile: signal: segmentation fault
                     go tool compile: signal: segmentation fault
                     go tool compile: signal: segmentation fault
                     go tool compile: signal: segmentation fault
                     go tool compile: signal: segmentation fault
                     INFO] killing nailgun server pid=55651
INFO] killing nailgun server pid=55655
INFO] killing nailgun server pid=56073

               Waiting for background workers to finish.
11:56:23 21:09   [complete]
               FAILURE
Exception caught: (<class 'pants.contrib.go.tasks.go_task.ListDepsError'>)
  File ".pvenvs/fs/bin/pants", line 11, in <module>
    sys.exit(main())
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/bin/pants_loader.py", line 69, in main
    PantsLoader.run()
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/bin/pants_loader.py", line 65, in run
    cls.load_and_execute(entrypoint)
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/bin/pants_loader.py", line 58, in load_and_execute
    entrypoint_main()
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/bin/pants_exe.py", line 39, in main
    PantsRunner(exiter, start_time=start_time).run()
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/bin/pants_runner.py", line 53, in run
    return runner.run()
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/bin/local_pants_runner.py", line 49, in run
    self._run()
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/bin/local_pants_runner.py", line 97, in _run
    goal_runner_result = goal_runner.run()
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/bin/goal_runner.py", line 270, in run
    result = self._execute_engine()
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/bin/goal_runner.py", line 258, in _execute_engine
    result = engine.execute(self._context, self._goals)
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/engine/legacy_engine.py", line 26, in execute
    self.attempt(context, goals)
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/engine/round_engine.py", line 233, in attempt
    goal_executor.attempt(explain)
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/engine/round_engine.py", line 49, in attempt
    task.execute()
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/contrib/go/tasks/go_fetch.py", line 53, in execute
    undeclared_deps = self._transitive_download_remote_libs(set(go_remote_libs))
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/contrib/go/tasks/go_fetch.py", line 197, in _transitive_download_remote_libs
    resolved_remote_libs, undeclared_deps, import_root_map)
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/contrib/go/tasks/go_fetch.py", line 111, in _map_fetched_remote_source
    gopath=gopath)
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/contrib/go/tasks/go_fetch.py", line 261, in _get_remote_import_paths
    import_listing = self.import_oracle.list_imports(pkg, gopath=gopath)
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/util/memo.py", line 101, in memoize
    result = func(*args, **kwargs)
  File "/Users/lhayden/dev/code/foursquare.web/.pvenvs/fs/lib/python2.7/site-packages/pants/contrib/go/tasks/go_task.py", line 156, in list_imports
    .format(pkg, go_cmd, returncode))

Exception message: Problem listing imports for <http://github.com/AndreasBriese/bbloom|github.com/AndreasBriese/bbloom>: GOROOT=/Users/lhayden/.cache/foursquare.web/bin/go/mac/10.13/1.10.5/go.tar/go GOPATH=/Users/lhayden/dev/code/foursquare.web/.pants.d/resolve/go/e77e8d8d0448/3rdparty.go.github.com.AndreasBriese.bbloom.bbloom/current/gopath /Users/lhayden/.cache/foursquare.web/bin/go/mac/10.13/1.10.5/go.tar/go/bin/go list -json <http://github.com/AndreasBriese/bbloom|github.com/AndreasBriese/bbloom> failed with exit code 1

End: 2022-03-24 11:56:23.919520
Has anyone seen this issue with Go resolves before? I'm assuming it has something to do with being on an M1 machine as I can't repro the issue.
f
Looks like that log shows Go v1.10.5? Apple Silicon is only supported on Go 1.16 or higher. https://go.dev/doc/go1.16#darwin
d
That would do it