StanfordSNR / guardian-agent

[beta] Guardian Agent: secure ssh-agent forwarding for Mosh and SSH
BSD 3-Clause "New" or "Revised" License
438 stars 30 forks source link

macOS 12 Beta fatal error #33

Open adamyonk opened 3 years ago

adamyonk commented 3 years ago

Testing on the macOS Beta results in:

 ➜ sga-guard -V
fatal error: runtime: bsdthread_register error

runtime stack:
runtime.throw(0x12ac359, 0x21)
        /usr/local/go/src/runtime/panic.go:596 +0x95 fp=0x5456750 sp=0x5456730
runtime.goenvs()
        /usr/local/go/src/runtime/os_darwin.go:108 +0xa0 fp=0x5456780 sp=0x5456750
runtime.schedinit()
        /usr/local/go/src/runtime/proc.go:486 +0xa1 fp=0x54567c0 sp=0x5456780
runtime.rt0_go(0x54567f0, 0x4, 0x54567f0, 0x1000000, 0x4, 0x5456bf8, 0x5456c06, 0x5456c1e, 0x5456c36, 0x0, ...)
        /usr/local/go/src/runtime/asm_amd64.s:158 +0x183 fp=0x54567c8 sp=0x54567c0

This is guardian agent installed via homebrew.

dimakogan commented 3 years ago

Thanks for reporting this! Unfortunately I don't have access to a macOS system. Would you mind checking if building from source works?

adamyonk commented 3 years ago

@dimakogan sorry for the delay! Can confirm that installing directly:

go get github.com/StanfordSNR/guardian-agent/...
cd $GOPATH/src/github.com/StanfordSNR/guardian-agent
./scripts/sga-guard <host>

does work as expected.

dimakogan commented 3 years ago

Thanks for checking! There have been barely any changes between the release used by brew and HEAD, so perhaps the difference is due to the fact that the release used by brew was compiled using an older go version. I will build a new release and send a pull request to the person that maintains the brew tap.

Thanks for raising this issue!

jBRNDnl commented 2 years ago

Dima, is there perhaps an update on the rebuild release on brew? The release of macOS Monterey will happen soon and it is not possible to use guardian-agent on macOS on this release now.

dancrossnyc commented 2 years ago

Sadly, this guardian-agent appears to have fallen into disrepair and no longer builds with recent Go versions and libraries, let alone on macOS.

I understand this was the product of an academic project that has been completed, but is there any plan for ongoing maintenance?

yihongang commented 2 years ago

The building from source instructions worked for me on macOS Monterey with go1.15.15

defulmere commented 2 years ago

@dancrossnyc to get this working on macOS Monterey (on a M1 system) with go1.18.1 from homebrew I had to build like this:

export GOPATH=$HOME/go
mkdir -p $GOPATH/{bin,pkg,src}
GO111MODULE=off go get github.com/StanfordSNR/guardian-agent/...

# copy these out to a location on PATH
# $GOPATH/bin/{sga-guard-bin,sga-ssh,sga-stub}
# $GOPATH/src/github.com/StanfordSNR/guardian-agent/scripts/{sga-guard,sga-env.sh}