Skip to content

x/build: can't ssh to x_tools-gotip-netbsd-arm64 gomote #70163

Closed
@ianlancetaylor

Description

@ianlancetaylor

Go version

HEAD

Output of go env in your module/workspace:

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/iant/.cache/go-build'
GOENV='/home/iant/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/iant/gopath/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/iant/gopath'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org'
GOROOT='/home/iant/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/iant/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='devel go1.24-bae2e968e2 Mon Sep 30 22:04:40 2024 +0000'
GODEBUG=''
GOTELEMETRY='on'
GOTELEMETRYDIR='/home/iant/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/iant/gopath/src/golang.org/x/tools/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 -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build4106496375=/tmp/go-build -gno-record-gcc-switches'

What did you do?

> gomote create x_tools-gotip-netbsd-arm64
> gomote ssh iant-x_tools-gotip-netbsd-arm64-0

What did you see happen?

unable to start shell "": exec: no command

What did you expect to see?

I expected to be connected to the gomote

CC @golang/release

Activity

ianlancetaylor

ianlancetaylor commented on Nov 1, 2024

@ianlancetaylor
ContributorAuthor

CC @golang/release

added
Buildersx/build issues (builders, bots, dashboards)
on Nov 1, 2024
added this to the Unreleased milestone on Nov 1, 2024
ianlancetaylor

ianlancetaylor commented on Nov 1, 2024

@ianlancetaylor
ContributorAuthor

The same happens for a plain gotip-netbsd-arm64 gomote.

dmitshur

dmitshur commented on Nov 2, 2024

@dmitshur
Member

Thanks for reporting. Also CC @golang/netbsd.

ssh.go#L52 calls shell() to determine the command name, and on GOOS=netbsd, its implementation returns whatever the SHELL environment variable is set to:

https://cs.opensource.google/go/x/build/+/master:cmd/buildlet/buildlet.go;l=2041-2042;drc=0d31c9b6e4b5ca7b9505a983bd19ae246447f8ad

Unsurprisingly given the error, that environment variable isn't currently set on this builder:

$ gomote run $USER-gotip-netbsd-arm64-0 env | grep SHELL | wc -l
       0

I see that bash is available on the builder, and in PATH, so setting SHELL to bash in the environment of the swarming client might be all that's needed to let gomote ssh work on this builder. CC @bsiegert as the builder owner who would need to make that change.

An (inconvenient) workaround is to use gomote run, e.g.:

$ gomote run -system $USER-gotip-netbsd-arm64-0 bash -c 'echo test'
test
added
NeedsFixThe path to resolution is known, but the work has not been done.
on Nov 2, 2024
added
DevExpanything around developer experience
on Nov 2, 2024
bsiegert

bsiegert commented on Nov 2, 2024

@bsiegert
Contributor

I can set the SHELL environment variable. There is at least bash and ksh available.

ianlancetaylor

ianlancetaylor commented on Nov 4, 2024

@ianlancetaylor
ContributorAuthor

Can we change the shell function to return a reasonable default if SHELL is not set in the environment? Using /bin/sh would be far better than completely failing.

gopherbot

gopherbot commented on Nov 4, 2024

@gopherbot
Contributor

Change https://go.dev/cl/624796 mentions this issue: cmd/buildlet: set a safe default for shell

added a commit that references this issue on Nov 16, 2024
58cbe53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buildersx/build issues (builders, bots, dashboards)DevExpanything around developer experienceNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bsiegert@dmitshur@ianlancetaylor@gopherbot@gabyhelp

        Issue actions

          x/build: can't ssh to x_tools-gotip-netbsd-arm64 gomote · Issue #70163 · golang/go