• Austin Clements's avatar
    runtime: deflake TestTracebackAncestors · 9c899232
    Austin Clements authored
    TestTracebackAncestors has a ~0.1% chance of failing with more
    goroutines in the traceback than expected. This happens because
    there's a window between each goroutine starting its child and that
    goroutine actually exiting. The test captures its own stack trace
    after everything is "done", but if this happens during that window, it
    will include the goroutine that's in the process of being torn down.
    Here's an example of such a failure:
    https://build.golang.org/log/fad10d0625295eb79fa879f53b8b32b9d0596af8
    
    This CL fixes this by recording the goroutines that are expected to
    exit and removing them from the stack trace. With this fix, this test
    passed 15,000 times with no failures.
    
    Change-Id: I71e7c6282987a15e8b74188b9c585aa2ca97cbcd
    Reviewed-on: https://go-review.googlesource.com/c/147517
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    9c899232
Name
Last commit
Last update
..
abort.go Loading commit data...
badtraceback.go Loading commit data...
crash.go Loading commit data...
deadlock.go Loading commit data...
empty.s Loading commit data...
gc.go Loading commit data...
gettid.go Loading commit data...
gettid_none.go Loading commit data...
lockosthread.go Loading commit data...
main.go Loading commit data...
map.go Loading commit data...
memprof.go Loading commit data...
misc.go Loading commit data...
numcpu_freebsd.go Loading commit data...
panicrace.go Loading commit data...
signal.go Loading commit data...
stringconcat.go Loading commit data...
syscall_windows.go Loading commit data...
timeprof.go Loading commit data...
traceback_ancestors.go Loading commit data...