openthread / ot-ns

OpenThread Network Simulator, a discrete event simulator and visualization tool for Thread networks.

Home Page:https://openthread.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

question

anying11 opened this issue · comments

I met such problem while I was making some changes.Could you help me classify it?
I want to simulate the hardware,so I send messages from a border router to the others .At first it is ok,but after a few while with no messages sent,the next few time I send messages from a border router to the others,it is quite easy to go wrong.I think this has something to do with alivenodes.

fatal error: concurrent map writes

goroutine 28 [running]:
runtime.throw(0xb444ef, 0x15)
/usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0xc000155b88 sp=0xc000155b58 pc=0x438e12
runtime.mapdelete_fast64(0xa75240, 0xc0003cdaa0, 0x7)
/usr/local/go/src/runtime/map_fast64.go:281 +0x30f fp=0xc000155bd0 sp=0xc000155b88 pc=0x414daf
github.com/openthread/ot-ns/dispatcher.(*Dispatcher).setSleeping(...)
/ss/otns/dispatcher/dispatcher.go:738
github.com/openthread/ot-ns/dispatcher.(*Dispatcher).handleRecvEvent(0xc00008b680, 0xc0008327c0)
/ss/otns/dispatcher/dispatcher.go:334 +0x245 fp=0xc000155cd8 sp=0xc000155bd0 pc=0x7b1205
github.com/openthread/ot-ns/dispatcher.(*Dispatcher).RecvEvents(0xc00008b680, 0x0)
/ss/otns/dispatcher/dispatcher.go:364 +0x12a fp=0xc000155d80 sp=0xc000155cd8 pc=0x7b180a
github.com/openthread/ot-ns/dispatcher.(*Dispatcher).goUntilPauseTime(0xc00008b680)
/ss/otns/dispatcher/dispatcher.go:283 +0x74 fp=0xc000155dd0 sp=0xc000155d80 pc=0x7b0ef4
github.com/openthread/ot-ns/dispatcher.(*Dispatcher).Run(0xc00008b680)
/ss/otns/dispatcher/dispatcher.go:255 +0x3d8 fp=0xc000155f38 sp=0xc000155dd0 pc=0x7b0c98
github.com/openthread/ot-ns/simulation.(*Simulation).Run(0xc0002e0fc0)
/ss/otns/simulation/simulation.go:137 +0x11d fp=0xc000155fd8 sp=0xc000155f38 pc=0x9c15dd
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000155fe0 sp=0xc000155fd8 pc=0x471761
created by github.com/openthread/ot-ns/otns_main.Main
/ss/otns/otns_main/otns_main.go:174 +0x365

Big brother,your kindness will help a poor student who is making painstaking efforts to make a simulation system about openthread. Your help will also make openthread more popular in China!!