container/dispatcher: instrument each goroutine individually
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 44s
Test / Hakurei (push) Successful in 2m33s
Test / Sandbox (race detector) (push) Successful in 2m35s
Test / Hakurei (race detector) (push) Successful in 3m25s
Test / Hpkg (push) Successful in 3m41s
Test / Flake checks (push) Successful in 1m30s

Scheduler nondeterminism cannot be accounted for, so do this instead.

There should not be any performance penalty as these calls are optimised out for direct.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-23 11:06:19 +09:00
parent ea1e3ebae9
commit 1b3902df78
4 changed files with 91 additions and 59 deletions

View File

@@ -333,7 +333,7 @@ func initEntrypoint(k syscallDispatcher, prepareLogger func(prefix string), setV
info := make(chan winfo, 1)
done := make(chan struct{})
go func() {
go func(k syscallDispatcher) {
var (
err error
wpid = -2
@@ -360,7 +360,7 @@ func initEntrypoint(k syscallDispatcher, prepareLogger func(prefix string), setV
}
close(done)
}()
}(k.new())
// handle signals to dump withheld messages
sig := make(chan os.Signal, 2)