~sircmpwn/aerc2#498: 
data race after (probably?) failing to start Unix server

hi,

I am using aerc at 548faca, and compiled with -race. I sometimes get:

2021/03/10 11:47:15 Starting up aerc
imap
2021/03/10 11:47:20 (ui)=> *types.Configure
2021/03/10 11:47:20 (ui)=> *types.Connect
2021/03/10 11:47:20 <-(ui) *types.Configure(2)
2021/03/10 11:47:20 <-(ui) *types.Connect(3)
2021/03/10 11:47:20 (ui)=> *types.Configure
2021/03/10 11:47:20 (ui)=> *types.Connect
2021/03/10 11:47:20 <-(ui) *types.Configure(4)
2021/03/10 11:47:20 <-(ui) *types.Connect(5)
2021/03/10 11:47:20 Initializing PGP keyring
2021/03/10 11:47:20 Starting Unix server
2021/03/10 11:47:20 Failed to start Unix server: listen unix /run/user/1000/aerc.sock: bind: address already in use (non-fatal)
==================
WARNING: DATA RACE
Read at 0x00c000210d20 by goroutine 17:
  git.sr.ht/~sircmpwn/aerc/lib/ui.(*Tabs).invalidateChild()
      git.sr.ht/~sircmpwn/aerc/lib/ui/tab.go:62 +0x3e
  git.sr.ht/~sircmpwn/aerc/lib/ui.(*Tabs).invalidateChild-fm()
      git.sr.ht/~sircmpwn/aerc/lib/ui/tab.go:61 +0x5e
  git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).OnInvalidate.func1()
      git.sr.ht/~sircmpwn/aerc/widgets/account.go:130 +0x5b
  git.sr.ht/~sircmpwn/aerc/lib/ui.(*Invalidatable).DoInvalidate()
      git.sr.ht/~sircmpwn/aerc/lib/ui/invalidatable.go:22 +0x8b
  git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).cellInvalidated()
      git.sr.ht/~sircmpwn/aerc/lib/ui/grid.go:287 +0x197
  git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).cellInvalidated-fm()
      git.sr.ht/~sircmpwn/aerc/lib/ui/grid.go:273 +0x5e
  git.sr.ht/~sircmpwn/aerc/lib/ui.(*Invalidatable).DoInvalidate()
      git.sr.ht/~sircmpwn/aerc/lib/ui/invalidatable.go:22 +0x8b
  git.sr.ht/~sircmpwn/aerc/lib/ui.(*Bordered).Invalidate()
      git.sr.ht/~sircmpwn/aerc/lib/ui/borders.go:44 +0x5e
  git.sr.ht/~sircmpwn/aerc/lib/ui.(*Bordered).contentInvalidated()
      git.sr.ht/~sircmpwn/aerc/lib/ui/borders.go:36 +0x44
  git.sr.ht/~sircmpwn/aerc/lib/ui.(*Bordered).contentInvalidated-fm()
      git.sr.ht/~sircmpwn/aerc/lib/ui/borders.go:35 +0x26
  git.sr.ht/~sircmpwn/aerc/lib/ui.(*Invalidatable).DoInvalidate()
      git.sr.ht/~sircmpwn/aerc/lib/ui/invalidatable.go:22 +0x8b
  git.sr.ht/~sircmpwn/aerc/widgets.(*DirectoryList).Invalidate()
      git.sr.ht/~sircmpwn/aerc/widgets/dirlist.go:121 +0x55
  git.sr.ht/~sircmpwn/aerc/widgets.NewDirectoryList.func1()
      git.sr.ht/~sircmpwn/aerc/widgets/dirlist.go:48 +0x3b
  git.sr.ht/~sircmpwn/aerc/lib/ui.(*Invalidatable).DoInvalidate()
      git.sr.ht/~sircmpwn/aerc/lib/ui/invalidatable.go:22 +0x8b
  git.sr.ht/~sircmpwn/aerc/widgets.(*Spinner).Invalidate()
      git.sr.ht/~sircmpwn/aerc/widgets/spinner.go:81 +0x87
  git.sr.ht/~sircmpwn/aerc/widgets.(*Spinner).Start.func1()
      git.sr.ht/~sircmpwn/aerc/widgets/spinner.go:48 +0x65

Previous write at 0x00c000210d20 by main goroutine:
  [failed to restore the stack]

Goroutine 17 (running) created at:
  git.sr.ht/~sircmpwn/aerc/widgets.(*Spinner).Start()
      git.sr.ht/~sircmpwn/aerc/widgets/spinner.go:39 +0x97
  git.sr.ht/~sircmpwn/aerc/widgets.NewDirectoryList()
      git.sr.ht/~sircmpwn/aerc/widgets/dirlist.go:50 +0x6f9
  git.sr.ht/~sircmpwn/aerc/widgets.NewAccountView()
      git.sr.ht/~sircmpwn/aerc/widgets/account.go:77 +0xb4e
  git.sr.ht/~sircmpwn/aerc/widgets.NewAerc()
      git.sr.ht/~sircmpwn/aerc/widgets/aerc.go:88 +0xf38
  main.main()
      git.sr.ht/~sircmpwn/aerc/aerc.go:159 +0x854
Status
REPORTED
Submitter
~sbinet
Assigned to
No-one
Submitted
3 months ago
Updated
3 months ago
Labels
No labels applied.