keybase / keybase/keybase-issues

Segmentation Fault (SIGSEGV) during Keybase installation via Homebrew on macOS

Open
#4,280 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
899
Forks
40
PR merge metrics
No merged PRs in 30d

Description

**Description:**

When installing Keybase using Homebrew on macOS, I encountered a segmentation fault (SIGSEGV) during the installation process, specifically while installing command-line tools. This appears to be caused by a nil pointer dereference in the Go code.

* * * * *

**Steps to Reproduce:**

1. Run `brew install keybase` on macOS.
2. Observe the panic during the installation process.

* * * * *

**Expected behavior:**

The installation should complete without errors.

* * * * *

**Actual behavior:**

The installation fails with a segmentation fault.

* * * * *

**Environment:**

- **macOS Version:** `Darwin Darwin Kernel Version 24.0.0 arm64`
- **Homebrew Version:** Homebrew 4.4.2
- **Keybase Version:** 6.5.0

* * * * *

**Error Logs:**

```shell
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x28 pc=0x1016a4484]

goroutine 1 [running]:
github.com/keybase/client/go/install.installCommandLineForBinPath({0x14000470640, 0x3c}, {0x140001be810, 0x16}, 0x1, {0x12a2203e0, 0x14000405d40})
/Users/test/go/src/github.com/keybase/client/go/install/install_darwin.go:710 +0x74
github.com/keybase/client/go/install.installCommandLine({0x101a182a5?, 0x3?}, {0x0?, 0x14000762cd0?}, 0x1, {0x12a2203e0, 0x14000405d40})
/Users/test/go/src/github.com/keybase/client/go/install/install_darwin.go:673 +0x13c
github.com/keybase/client/go/install.Install({0x10248e418, 0x140003cb608}, {0x0, 0x0}, {0x0, 0x0}, {0x1400046a5f0, 0x5, 0x5}, 0x1, ...)
/Users/test/go/src/github.com/keybase/client/go/install/install_darwin.go:494 +0x138
github.com/keybase/client/go/install.InstallAuto({0x10248e418, 0x140003cb608}, {0x0, 0x0}, {0x0, 0x0}, 0x28fa6ae00, {0x12a2203e0, 0x14000405d40})
/Users/test/go/src/github.com/keybase/client/go/install/install_darwin.go:441 +0x1fc
github.com/keybase/client/go/client.(*cmdInstallAuto).Run(0x1400067e440)
/Users/test/go/src/github.com/keybase/client/go/client/cmd_install_osx.go:361 +0x74
main.mainInner(0x140003cb608, {0x0, 0x0, 0x0})
/Users/test/go/src/github.com/keybase/client/go/keybase/main.go:247 +0xb38
main.main()
/Users/test/go/src/github.com/keybase/client/go/keybase/main.go:70 +0x84
```

* * * * *

**Additional Context:**

The installation process seems to fail while checking `/usr/local/bin/keybase`. It appears related to the Go code at this point:

```shell
/Users/test/go/src/github.com/keybase/client/go/install/install_darwin.go:710
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with `brew install keybase` on macOS, then inspect `go/install/install_darwin.go` around lines 673, 710, and 494 using the provided stack trace. Trace the `/usr/local/bin/keybase` check and identify the nil value involved. Done means the installation completes without the SIGSEGV.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, macos
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.