debugging a hung mutex lock

This commit is contained in:
Jeff Carr 2025-01-13 08:12:39 -06:00
parent 9b9c51d964
commit 49a06843e9
2 changed files with 4 additions and 1 deletions

View File

@ -43,6 +43,8 @@ func Init() *Forge {
f.rillUpdate(20, 10) f.rillUpdate(20, 10)
if f.configSave { if f.configSave {
// taking this out to debug Marshal() panic
// os.Exit(-1)
f.ConfigSave() f.ConfigSave()
f.configSave = false f.configSave = false
} }

View File

@ -30,6 +30,7 @@ func (f *Forge) rillUpdate(pool1 int, pool2 int) (int, error) {
// Concurrency = 10 // Concurrency = 10
err := rill.ForEach(rills, pool2, func(repo *gitpb.Repo) error { err := rill.ForEach(rills, pool2, func(repo *gitpb.Repo) error {
counter += 1 counter += 1
// log.Info("rill.ForEach() gopath=", repo.GetGoPath())
return f.updateRepo(repo) return f.updateRepo(repo)
}) })
@ -38,7 +39,7 @@ func (f *Forge) rillUpdate(pool1 int, pool2 int) (int, error) {
func (f *Forge) updateRepo(repo *gitpb.Repo) error { func (f *Forge) updateRepo(repo *gitpb.Repo) error {
if !repo.IsValidDir() { if !repo.IsValidDir() {
log.Printf("%10s %-50s", "bad git dir\n", repo.FullPath) log.Printf("%10s %-50s gopath=%s\n", "git dir is missing:", repo.FullPath, repo.GetGoPath())
f.Repos.DeleteByFullPath(repo.FullPath) f.Repos.DeleteByFullPath(repo.FullPath)
f.configSave = true f.configSave = true
return nil return nil