pingcap / pingcap/tiup

piup client fresh install leads to SIGSEGV

Open
#2,617 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

contribution first-time-contributor type/bug
Dominant language
Go
Stars
466
Forks
338
Avg merge
3d 7h
Merged PRs (30d)
8

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

It's running on Macos 26.0.1 (25A362)


  1. Install TiUP with curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh.
  2. Run tiup playground in new terminal
  3. Run tiup client in new terminal

  1. What did you expect to see?

I think there will be a mysql prompt? I've never seen it running.

  1. What did you see instead?
❯ tiup client
Starting component client: /Users/lkimmel/.tiup/components/client/v1.16.3/tiup-client
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x605fa95]

goroutine 1 [running]:
main.isInstanceAlive({0xc0002e2640?, 0x1?}, {0xc0002d48d0?, 0x2e27ea388edd95a?})
	github.com/pingcap/tiup/components/client/main.go:134 +0x35
main.scanEndpoint({0xc00002400a, 0x14})
	github.com/pingcap/tiup/components/client/main.go:121 +0x105
main.connect({0x0, 0x0})
	github.com/pingcap/tiup/components/client/main.go:72 +0x4e
main.execute.func1(0xc0000ee700?, {0x6a62ec0?, 0x4?, 0x60ce7c8?})
	github.com/pingcap/tiup/components/client/main.go:60 +0x91
github.com/spf13/cobra.(*Command).execute(0xc0002c4008, {0xc000020080, 0x0, 0x0})
	github.com/spf13/cobra@v1.6.1/command.go:916 +0x85c
github.com/spf13/cobra.(*Command).ExecuteC(0xc0002c4008)
	github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.6.1/command.go:968
main.execute()
	github.com/pingcap/tiup/components/client/main.go:64 +0x59
main.main()
	github.com/pingcap/tiup/components/client/main.go:40 +0x13
  1. What version of TiUP are you using (tiup --version)?
❯ tiup --version
1.16.3 v1.16.2-release-1.16
Go Version: go1.24.1
Git Ref: release-1.16
GitHash: a290cbff372666163e686364bb63c24bd0638dbc

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in components/client/main.go, especially isInstanceAlive at line 134 and its callers scanEndpoint and connect. Reproduce the crash with the reported TiUP playground and tiup client commands, then trace the nil value at that path. Done means the fresh-install flow no longer panics with a SIGSEGV.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.