Skip to content

runtime: race detector traceback missing frames #78463

@prattmic

Description

@prattmic

From #78202:

My best guess is that the deferred AddInt32 is from Mutex.Unlock: https://cs.opensource.google/go/go/+/master:src/internal/sync/mutex.go;l=194;drc=6c660052856feae2bf1f3fe44665b5da0002500d

net/http/internal/http2.(*pipe).closeWithError() defers an Unlock.

If that is accurate, then the stack trace is actually missing quite a few frames:

net/http/internal/http2.(*pipe).closeWithError() before the defer, and sync.(*Mutex).Unlock and internal/sync.(*Mutex).Unlock between the defer and sync/atomic.AddInt32.

cc @golang/runtime

In other words, traceback output is sometimes missing multiple frames, and not just inlined frames. closeWithError in those races was not inlined. The Unlock frames could be inlined, but not into deferreturn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.RaceDetectorcompiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions