1. 13 Jan, 2016 5 commits
  2. 07 Dec, 2015 1 commit
  3. 04 Dec, 2015 1 commit
  4. 03 Dec, 2015 3 commits
  5. 24 Nov, 2015 3 commits
  6. 23 Nov, 2015 12 commits
  7. 20 Nov, 2015 3 commits
    • Austin Clements's avatar
      [release-branch.go1.5] runtime: prevent sigprof during all stack barrier ops · 08ea8252
      Austin Clements authored
      A sigprof during stack barrier insertion or removal can crash if it
      detects an inconsistency between the stkbar array and the stack
      itself. Currently we protect against this when scanning another G's
      stack using stackLock, but we don't protect against it when unwinding
      stack barriers for a recover or a memmove to the stack.
      
      This commit cleans up and improves the stack locking code. It
      abstracts out the lock and unlock operations. It uses the lock
      consistently everywhere we perform stack operations, and pushes the
      lock/unlock down closer to where the stack barrier operations happen
      to make it more obvious what it's protecting. Finally, it modifies
      sigprof so that instead of spinning until it acquires the lock, it
      simply doesn't perform a traceback if it can't acquire it. This is
      necessary to prevent self-deadlock.
      
      Updates #11863, which introduced stackLock to fix some of these
      issues, but didn't go far enough.
      
      Updates #12528.
      
      Change-Id: I9d1fa88ae3744d31ba91500c96c6988ce1a3a349
      Reviewed-on: https://go-review.googlesource.com/17036Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-on: https://go-review.googlesource.com/17057
      08ea8252
    • Russ Cox's avatar
      [release-branch.go1.5] runtime: fix new stack barrier check · 7ab4cba9
      Russ Cox authored
      During a crash showing goroutine stacks of all threads
      (with GOTRACEBACK=crash), it can be that f == nil.
      
      Only happens on Solaris; not sure why.
      
      Change-Id: Iee2c394a0cf19fa0a24f6befbc70776b9e42d25a
      Reviewed-on: https://go-review.googlesource.com/17110Reviewed-by: default avatarAustin Clements <austin@google.com>
      Reviewed-on: https://go-review.googlesource.com/17122Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      7ab4cba9
    • Austin Clements's avatar
      [release-branch.go1.5] runtime: handle sigprof in stackBarrier · 2a6c7739
      Austin Clements authored
      Currently, if a profiling signal happens in the middle of
      stackBarrier, gentraceback may see inconsistencies between stkbar and
      the barriers on the stack and it will certainly get the wrong return
      PC for stackBarrier. In most cases, the return PC won't be a PC at all
      and this will immediately abort the traceback (which is considered
      okay for a sigprof), but if it happens to be a valid PC this may sent
      gentraceback down a rabbit hole.
      
      Fix this by detecting when the gentraceback starts in stackBarrier and
      simulating the completion of the barrier to get the correct initial
      frame.
      
      Change-Id: Ib11f705ac9194925f63fe5dfbfc84013a38333e6
      Reviewed-on: https://go-review.googlesource.com/17035Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      Run-TryBot: Austin Clements <austin@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-on: https://go-review.googlesource.com/17056
      2a6c7739
  8. 17 Nov, 2015 12 commits