закешированный к нам в целях безопасности дебаггер
Go to file
Alessandro Arzilli bf627d0f7d
proc: fix TestCondBreakpointWithFrame flakes on 1.22rc1 (#3624)
The flake manifests as an error where the variable i can not be found in
frame 1 and happens in go1.22rc1 between 0.1% and 0.5% of the time (it is highly dependent on CPU contention)
This problem is caused by the new code in evalop.PushLocal referencing the
stale value of SelectedGoroutine. This happens because:

-  evalop.PushLocal calls ConvertEvalScope
- ConvertEvalScope calls FindGoroutine
- FindGoroutine checks the value of selectedGoroutine

When breakpoint conditions are evaluated both the value of selectedGoroutine
and currentThread are stale because we can only set their definitive value
*after* all breakpoint conditions have been evaluated.

The fact that it only happens in 1.22rc1 is coincidental, it's probably
caused by the fact that 1.22rc1 migrates goroutines between threads more in
this particular circumstance.

This commit fixes the problem in two ways:

1. selectedGoroutine and currentThread are given temprorary non-stale values
   before breakpoint conditions are evaluated
2. evalop.PushLocal is changed so it takes a stack trace of the current
   thread rather than resolving it through the selected goroutine.

Either one would suffice however I think we should do both, (2) ensures that
the runtime.frame(n).var will work even if the current thread is not running
any goroutine and (1) ensures that we don't accidentally reference a stale
selectedGoroutine in the future.
2024-01-10 06:53:16 -08:00
_fixtures proc: make some type casts less counterintuitive 2023-12-12 11:43:41 -08:00
_scripts TeamCity: speed up ppc64le CI (#3622) 2024-01-09 14:13:00 -08:00
.teamcity teamcity,version: add 1.22 to supported versions and CI matrix (#3601) 2023-12-20 15:31:30 -08:00
assets Add high-res images 2015-05-19 12:25:26 -05:00
cmd/dlv *: remove checks for TRAVIS env variable (#3568) 2023-11-16 10:42:41 -08:00
Documentation Documentation: document runtime.frame(n).varname (#3625) 2024-01-06 21:10:19 -08:00
pkg proc: fix TestCondBreakpointWithFrame flakes on 1.22rc1 (#3624) 2024-01-10 06:53:16 -08:00
service TeamCity: speed up ppc64le CI (#3622) 2024-01-09 14:13:00 -08:00
vendor go.mod: Update version of go-delve/liner (#3619) 2024-01-02 20:12:30 -08:00
.cirrus.yml Cirrus-CI: update FreeBSD version (#3618) 2024-01-02 20:12:04 -08:00
.gitattributes makefile: use git's $Id$ instead of setting ver.Build in makefile (#807) 2017-04-28 10:14:33 -07:00
.gitignore chore: don't ignore directory cmd/dlv (#3359) 2023-05-05 09:59:43 -07:00
CHANGELOG.md *: release version 1.22.0 (#3606) 2023-12-29 14:48:07 -08:00
CONTRIBUTING.md *: Add explicit code of conduct (#3540) 2023-10-27 15:07:39 +02:00
go.mod go.mod: Update version of go-delve/liner (#3619) 2024-01-02 20:12:30 -08:00
go.sum go.mod: Update version of go-delve/liner (#3619) 2024-01-02 20:12:30 -08:00
inlinestripped pkg/proc: use gore to obtain info from stripped binaries (#3577) 2023-11-23 09:12:10 +01:00
ISSUE_TEMPLATE.md Documentation: document substitute-path more (#2998) 2022-05-04 11:01:56 -07:00
LICENSE Add License and README 2014-05-03 15:31:52 -05:00
Makefile *: Fix ppc64le test runs (#3460) 2023-08-11 08:51:28 -07:00
README.md TeamCity,Documentation: use new TeamCity URL (#3275) 2023-02-15 11:11:42 +01:00

Delve

license GoDoc Build Status

The GitHub issue tracker is for bugs only. Please use the developer mailing list for any feature proposals and discussions.

About Delve

Delve is a debugger for the Go programming language. The goal of the project is to provide a simple, full featured debugging tool for Go. Delve should be easy to invoke and easy to use. Chances are if you're using a debugger, things aren't going your way. With that in mind, Delve should stay out of your way as much as possible.