[arvados] created: 2.1.0-2614-gb5db4b708
git repository hosting
git at public.arvados.org
Tue Jun 21 03:19:19 UTC 2022
at b5db4b70878a3907db3691b71979e6e65511a12c (commit)
commit b5db4b70878a3907db3691b71979e6e65511a12c
Author: Tom Clegg <tom at curii.com>
Date: Mon Jun 20 12:41:54 2022 -0400
19192: Crash with stack trace if MemorySize takes too long.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/services/keep-web/cache.go b/services/keep-web/cache.go
index d5fdc4997..16e828c8e 100644
--- a/services/keep-web/cache.go
+++ b/services/keep-web/cache.go
@@ -5,8 +5,10 @@
package keepweb
import (
+ "os"
"sync"
"sync/atomic"
+ "syscall"
"time"
"git.arvados.org/arvados.git/sdk/go/arvados"
@@ -169,7 +171,14 @@ func (c *cache) setup() {
c.chPruneSessions = make(chan struct{}, 1)
go func() {
for range c.chPruneSessions {
+ max := 30 * time.Second
+ timeout := time.AfterFunc(max, func() {
+ c.logger.Errorf("bug: pruneSessions took longer than %s, suspect deadlock", max)
+ p, _ := os.FindProcess(os.Getpid())
+ p.Signal(syscall.SIGABRT)
+ })
c.pruneSessions()
+ timeout.Stop()
}
}()
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list