Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concurrent map writes -- when clicking to open table while netview visible and network running #65

Open
rohrlich opened this issue Oct 10, 2020 · 1 comment

Comments

@rohrlich
Copy link
Contributor

fatal error: concurrent map writes

goroutine 6 [running]:
runtime.throw(0x52ba136, 0x15)
/usr/local/go/src/runtime/panic.go:1112 +0x72 fp=0xc0f0f4d4b0 sp=0xc0f0f4d480 pc=0x40361b2
runtime.mapassign_faststr(0x50a6020, 0xc025eeb230, 0x527b1ad, 0x9, 0x1)
/usr/local/go/src/runtime/map_faststr.go:211 +0x3f7 fp=0xc0f0f4d518 sp=0xc0f0f4d4b0 pc=0x40164c7
github.com/goki/ki/ki.(*Node).SetProp(...)
/Users/rohrlich/go/src/github.com/goki/ki/ki/node.go:1336
github.com/goki/gi/giv.(*ValueViewBase).ConfigWidget(0xc09828af00, 0x55c1cc0, 0xc025ee8a00)
/Users/rohrlich/go/src/github.com/goki/gi/giv/valueview.go:900 +0x2ff fp=0xc0f0f4d658 sp=0xc0f0f4d518 pc=0x4c0f78f
github.com/goki/gi/giv.(*SliceViewInline).ConfigParts(0xc0266e0a80)
/Users/rohrlich/go/src/github.com/goki/gi/giv/sliceviewinline.go:110 +0x949 fp=0xc0f0f4d7f0 sp=0xc0f0f4d658 pc=0x4bb7029
github.com/goki/gi/giv.(*SliceViewInline).Render2D(0xc0266e0a80)
/Users/rohrlich/go/src/github.com/goki/gi/giv/sliceviewinline.go:216 +0x65 fp=0xc0f0f4d810 sp=0xc0f0f4d7f0 pc=0x4bb79e5
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc0004f8580)
/Users/rohrlich/go/src/github.com/goki/gi/gi/layout.go:1451 +0xb9 fp=0xc0f0f4d878 sp=0xc0f0f4d810 pc=0x46f85d9
github.com/goki/gi/gi.(*Frame).Render2D(0xc0004f8580)
/Users/rohrlich/go/src/github.com/goki/gi/gi/frame.go:167 +0xc4 fp=0xc0f0f4d8b0 sp=0xc0f0f4d878 pc=0x46ea954
github.com/goki/gi/gi.(*Node2DBase).Render2DTree(0xc0004f8580)
/Users/rohrlich/go/src/github.com/goki/gi/gi/node2d.go:869 +0x78 fp=0xc0f0f4d8e8 sp=0xc0f0f4d8b0 pc=0x47050c8
github.com/goki/gi/gi.(*Viewport2D).ReRender2DNode(0xc025f00000, 0x55bf0e0, 0xc0004f8580)
/Users/rohrlich/go/src/github.com/goki/gi/gi/viewport.go:378 +0xbd fp=0xc0f0f4d9a8 sp=0xc0f0f4d8e8 pc=0x47415dd
github.com/goki/gi/gi.(*Layout).SetScroll.func1(0x558e860, 0xc0004f8580, 0x5590540, 0xc07c454000, 0x0, 0x4fd0c40, 0xc0981f0150)
/Users/rohrlich/go/src/github.com/goki/gi/gi/layout.go:1270 +0xc7 fp=0xc0f0f4da00 sp=0xc0f0f4d9a8 pc=0x476b9a7
github.com/goki/ki/ki.(*Signal).Emit(0xc07c455b28, 0x5590540, 0xc07c454000, 0x0, 0x4fd0c40, 0xc0981f0150)
/Users/rohrlich/go/src/github.com/goki/ki/ki/signal.go:173 +0x1a7 fp=0xc0f0f4dac8 sp=0xc0f0f4da00 pc=0x41928b7
github.com/goki/gi/gi.(*SliderBase).EmitNewValue(0xc07c454000, 0x44804000)
/Users/rohrlich/go/src/github.com/goki/gi/gi/sliders.go:253 +0xb8 fp=0xc0f0f4db18 sp=0xc0f0f4dac8 pc=0x4714dd8
github.com/goki/gi/gi.(*SliderBase).SetValueAction(0xc07c454000, 0x44804000)
/Users/rohrlich/go/src/github.com/goki/gi/gi/sliders.go:337 +0x5e fp=0xc0f0f4db38 sp=0xc0f0f4db18 pc=0x47154be
github.com/goki/gi/gi.(*Layout).ScrollActionDelta(0xc0004f8580, 0x1, 0x40c00000)
/Users/rohrlich/go/src/github.com/goki/gi/gi/layout.go:1371 +0x7c fp=0xc0f0f4db90 sp=0xc0f0f4db38 pc=0x46f80fc
github.com/goki/gi/gi.(*Layout).ScrollDelta(0xc0004f8580, 0xc096419db0)
/Users/rohrlich/go/src/github.com/goki/gi/gi/layout.go:1401 +0x1a6 fp=0xc0f0f4dbd8 sp=0xc0f0f4db90 pc=0x46f84d6
github.com/goki/gi/gi.(*Layout).LayoutScrollEvents.func1(0x558e860, 0xc0004f8580, 0x5594b60, 0xc025e96000, 0x3, 0x5171880, 0xc096419db0)
/Users/rohrlich/go/src/github.com/goki/gi/gi/layout.go:1937 +0x8e fp=0xc0f0f4dc10 sp=0xc0f0f4dbd8 pc=0x476bcde
github.com/goki/gi/gi.(*WinEventRecv).Call(0xc0f0f4dd28, 0x5594b60, 0xc025e96000, 0x3, 0x5171880, 0xc096419db0)
/Users/rohrlich/go/src/github.com/goki/gi/gi/events.go:116 +0x8c fp=0xc0f0f4dc90 sp=0xc0f0f4dc10 pc=0x46dccfc
github.com/goki/gi/gi.(*EventMgr).SendEventSignal(0xc025e96198, 0x553c060, 0xc096419db0, 0x1)
/Users/rohrlich/go/src/github.com/goki/gi/gi/events.go:225 +0x39a fp=0xc0f0f4dd88 sp=0xc0f0f4dc90 pc=0x46dd81a
github.com/goki/gi/gi.(*Window).ProcessEvent(0xc025e96000, 0x553c060, 0xc096419db0)
/Users/rohrlich/go/src/github.com/goki/gi/gi/window.go:1547 +0x8d1 fp=0xc0f0f4dec0 sp=0xc0f0f4dd88 pc=0x4755591
github.com/goki/gi/gi.(*Window).EventLoop(0xc025e96000)
/Users/rohrlich/go/src/github.com/goki/gi/gi/window.go:1469 +0x36 fp=0xc0f0f4df48 sp=0xc0f0f4dec0 pc=0x4754ad6
github.com/goki/gi/gi.(*Window).StartEventLoop(0xc025e96000)
/Users/rohrlich/go/src/github.com/goki/gi/gi/window.go:867 +0x6d fp=0xc0f0f4df80 sp=0xc0f0f4df48 pc=0x475039d
main.guirun()
/Users/rohrlich/go/src/github.com/ccnlab/lang-acq/sims/wordseg/wordseg.go:75 +0x4b fp=0xc0f0f4dfa0 sp=0xc0f0f4df80 pc=0x4eec6eb
main.main.func1()
/Users/rohrlich/go/src/github.com/ccnlab/lang-acq/sims/wordseg/wordseg.go:67 +0x20 fp=0xc0f0f4dfb0 sp=0xc0f0f4dfa0 pc=0x4f092f0
github.com/goki/gi/gimain.Main.func1(0x55503e0, 0x69e3040)
/Users/rohrlich/go/src/github.com/goki/gi/gimain/gimain.go:31 +0x24 fp=0xc0f0f4dfc0 sp=0xc0f0f4dfb0 pc=0x4eeab04
github.com/goki/gi/oswin/driver/glos.Main.func1()
/Users/rohrlich/go/src/github.com/goki/gi/oswin/driver/glos/app.go:87 +0x40 fp=0xc0f0f4dfe0 sp=0xc0f0f4dfc0 pc=0x4ee7ce0
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc0f0f4dfe8 sp=0xc0f0f4dfe0 pc=0x40664e1
created by github.com/goki/gi/oswin/driver/glos.Main
/Users/rohrlich/go/src/github.com/goki/gi/oswin/driver/glos/app.go:86 +0x87

goroutine 1 [syscall, locked to thread]:
github.com/go-gl/glfw/v3.3/glfw._Cfunc_glfwWaitEventsTimeout(0x3fc999999999999a)
_cgo_gotypes.go:2435 +0x41
github.com/go-gl/glfw/v3.3/glfw.WaitEventsTimeout(0x3fc999999999999a)
/Users/rohrlich/go/src/github.com/go-gl/glfw/v3.3/glfw/window.go:994 +0x2d
github.com/goki/gi/oswin/driver/glos.(*appImpl).mainLoop(0x69e3040)
/Users/rohrlich/go/src/github.com/goki/gi/oswin/driver/glos/app.go:177 +0x16f
github.com/goki/gi/oswin/driver/glos.Main(0xc000032630)
/Users/rohrlich/go/src/github.com/goki/gi/oswin/driver/glos/app.go:90 +0x97
github.com/goki/gi/oswin/driver.driverMain(...)
/Users/rohrlich/go/src/github.com/goki/gi/oswin/driver/driver_glos.go:18
github.com/goki/gi/oswin/driver.Main(...)
/Users/rohrlich/go/src/github.com/goki/gi/oswin/driver/driver.go:27
github.com/goki/gi/gimain.Main(0x53429e8)
/Users/rohrlich/go/src/github.com/goki/gi/gimain/gimain.go:30 +0x57
main.main()
/Users/rohrlich/go/src/github.com/ccnlab/lang-acq/sims/wordseg/wordseg.go:66 +0x71

goroutine 5 [chan receive, 6 minutes]:
github.com/emer/leabra/leabra.(*NetworkStru).ThrWorker(0xc00026e4b0, 0x0)
/Users/rohrlich/go/src/github.com/emer/leabra/leabra/networkstru.go:592 +0x130
created by github.com/emer/leabra/leabra.(*NetworkStru).StartThreads
/Users/rohrlich/go/src/github.com/emer/leabra/leabra/networkstru.go:579 +0x48

goroutine 7 [select]:
github.com/goki/gi/oswin/driver/glos.(*windowImpl).winLoop(0xc000092600)
/Users/rohrlich/go/src/github.com/goki/gi/oswin/driver/glos/window.go:164 +0xe6
created by github.com/goki/gi/oswin/driver/glos.(*appImpl).NewWindow
/Users/rohrlich/go/src/github.com/goki/gi/oswin/driver/glos/app.go:300 +0x8dd

goroutine 8 [runnable]:
github.com/goki/ki/ki.(*Signal).ConnectOnly(0xc09828ba30, 0x55a0920, 0xc0266e0a80, 0x5341ab0)
/Users/rohrlich/go/src/github.com/goki/ki/ki/signal.go:105 +0x66
github.com/goki/gi/giv.(*SliceViewInline).ConfigParts(0xc0266e0a80)
/Users/rohrlich/go/src/github.com/goki/gi/giv/sliceviewinline.go:102 +0x8a1
github.com/goki/gi/giv.(*SliceViewInline).Render2D(0xc0266e0a80)
/Users/rohrlich/go/src/github.com/goki/gi/giv/sliceviewinline.go:216 +0x65
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc0004f8580)
/Users/rohrlich/go/src/github.com/goki/gi/gi/layout.go:1451 +0xb9
github.com/goki/gi/gi.(*Frame).Render2D(0xc0004f8580)
/Users/rohrlich/go/src/github.com/goki/gi/gi/frame.go:167 +0xc4
github.com/goki/gi/gi.(*Layout).Render2DChildren(0xc025734e00)
/Users/rohrlich/go/src/github.com/goki/gi/gi/layout.go:1451 +0xb9
github.com/goki/gi/gi.(*Frame).Render2D(0xc025734e00)
/Users/rohrlich/go/src/github.com/goki/gi/gi/frame.go:167 +0xc4
github.com/goki/gi/giv.(*StructView).Render2D(0xc025734e00)
/Users/rohrlich/go/src/github.com/goki/gi/giv/structview.go:363 +0x5b
github.com/goki/gi/gi.(*Node2DBase).Render2DTree(0xc025734e00)
/Users/rohrlich/go/src/github.com/goki/gi/gi/node2d.go:869 +0x78
github.com/goki/gi/gi.(*Viewport2D).ReRender2DNode(0xc025f00000, 0x7fb0190, 0xc025734e00)
/Users/rohrlich/go/src/github.com/goki/gi/gi/viewport.go:378 +0xbd
github.com/goki/gi/gi.(*Viewport2D).UpdateNode(0xc025f00000, 0x7fb0190, 0xc025734e00)
/Users/rohrlich/go/src/github.com/goki/gi/gi/viewport.go:878 +0x1cf
github.com/goki/gi/gi.(*Viewport2D).UpdateNodes(0xc025f00000)
/Users/rohrlich/go/src/github.com/goki/gi/gi/viewport.go:859 +0x1d7
github.com/goki/gi/gi.(*Viewport2D).NodeUpdated(0xc025f00000, 0x7fb0190, 0xc025734e00, 0x1, 0x4fde040, 0xc098292298)
/Users/rohrlich/go/src/github.com/goki/gi/gi/viewport.go:749 +0x166
github.com/goki/gi/gi.SignalViewport2D(0x5594320, 0xc025f00000, 0x55a1580, 0xc025734e00, 0x1, 0x4fde040, 0xc098292298)
/Users/rohrlich/go/src/github.com/goki/gi/gi/viewport.go:703 +0x1d2
github.com/goki/ki/ki.(*Signal).Emit(0xc025734e58, 0x55a1580, 0xc025734e00, 0x1, 0x4fde040, 0xc098292298)
/Users/rohrlich/go/src/github.com/goki/ki/ki/signal.go:173 +0x1a7
github.com/goki/ki/ki.(*Node).UpdateEnd(0xc025734e00, 0x5266701)
/Users/rohrlich/go/src/github.com/goki/ki/ki/node.go:1935 +0x20a
github.com/goki/gi/giv.(*StructView).UpdateField(0xc025734e00, 0x526677c, 0x5)
/Users/rohrlich/go/src/github.com/goki/gi/giv/structview.go:115 +0xcc
main.(*Sim).TrialFieldUpdates(0x6a21360)
/Users/rohrlich/go/src/github.com/ccnlab/lang-acq/sims/wordseg/wordseg.go:984 +0xb3
main.(*Sim).TestTrial(0x6a21360, 0x1)
/Users/rohrlich/go/src/github.com/ccnlab/lang-acq/sims/wordseg/wordseg.go:1540 +0x91
main.(*Sim).TestAll(0x6a21360)
/Users/rohrlich/go/src/github.com/ccnlab/lang-acq/sims/wordseg/wordseg.go:1578 +0x85
created by main.(*Sim).ConfigGui.func20
/Users/rohrlich/go/src/github.com/ccnlab/lang-acq/sims/wordseg/wordseg.go:2620 +0x7b

Process finished with exit code 2

@rcoreilly
Copy link
Member

This appears to be due to /Users/rohrlich/go/src/github.com/goki/gi/giv/structview.go:115 +0xcc
main.(*Sim).TrialFieldUpdates(0x6a21360)

do you need that call? probably slows things down a bit? Anyway, it is conflicting with another full re-render update.. in principle it should be robust to this but I guess not always..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants