Closed vickery closed 8 years ago
When the close instruction was completed prior to the creation instruction, then will panic.
panic: assignment to entry in nil map goroutine 5602 [running]: github.com/Lafeng/deblocus/tunnel.(*SessionMgr).createTokens(0xc820064920, 0xc8207d5590, 0x4, 0x0, 0x0, 0x0) /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/server.go:192 +0xaa8 github.com/Lafeng/deblocus/tunnel.(*Session).tokensHandle(0xc8207d5590, 0xc820066300, 0x1, 0x100) /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/server.go:78 +0x69 created by github.com/Lafeng/deblocus/tunnel.(*Session).eventHandler /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/server.go:70 +0xb0 goroutine 1 [chan receive, 1810 minutes]: main.waitSignal() /works/deblocus/src/github.com/Lafeng/deblocus/deblocus.go:19 +0x2a2 main.main() /works/deblocus/src/github.com/Lafeng/deblocus/deblocus.go:77 +0x6ae goroutine 17 [syscall, 1810 minutes, locked to thread]: runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 goroutine 20 [chan receive]: github.com/Lafeng/deblocus/golang/glog.(*loggingT).flushDaemon(0xc96500) /works/deblocus/src/github.com/Lafeng/deblocus/golang/glog/glog.go:901 +0x67 created by github.com/Lafeng/deblocus/golang/glog.init.1 /works/deblocus/src/github.com/Lafeng/deblocus/golang/glog/glog.go:411 +0x6f goroutine 4 [syscall, 1810 minutes]: os/signal.loop() /usr/local/go/src/os/signal/signal_unix.go:22 +0x18 created by os/signal.init.1 /usr/local/go/src/os/signal/signal_unix.go:28 +0x37 goroutine 5 [IO wait, 2 minutes]: net.runtime_pollWait(0x7f01dd675318, 0x72, 0xc8200640a0) /usr/local/go/src/runtime/netpoll.go:157 +0x60 net.(*pollDesc).Wait(0xc820108530, 0x72, 0x0, 0x0) /usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a net.(*pollDesc).WaitRead(0xc820108530, 0x0, 0x0) /usr/local/go/src/net/fd_poll_runtime.go:78 +0x36 net.(*netFD).accept(0xc8201084d0, 0x0, 0x7f01dd676798, 0xc820606020) /usr/local/go/src/net/fd_unix.go:408 +0x27c net.(*TCPListener).AcceptTCP(0xc820070058, 0x878ea0, 0x0, 0x0) /usr/local/go/src/net/tcpsock_posix.go:254 +0x4d main.(*bootContext).startServer(0xc96240) /works/deblocus/src/github.com/Lafeng/deblocus/bootContext.go:184 +0x63b created by main.main /works/deblocus/src/github.com/Lafeng/deblocus/deblocus.go:73 +0x6a9 goroutine 6 [select, 1810 minutes, locked to thread]: runtime.gopark(0x8795b8, 0xc820026728, 0x7e1108, 0x6, 0x435418, 0x2) /usr/local/go/src/runtime/proc.go:185 +0x163 runtime.selectgoImpl(0xc820026728, 0x0, 0x18) /usr/local/go/src/runtime/select.go:392 +0xa64 runtime.selectgo(0xc820026728) /usr/local/go/src/runtime/select.go:212 +0x12 runtime.ensureSigM.func1() /usr/local/go/src/runtime/signal1_unix.go:227 +0x353 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 goroutine 25 [chan receive, 2 minutes]: github.com/cloudflare/golibs/bytepool.(*BytePool).Init.func1(0xc820112a80) /works/deblocus/src/github.com/cloudflare/golibs/bytepool/bytepool.go:35 +0x58 created by github.com/cloudflare/golibs/bytepool.(*BytePool).Init /works/deblocus/src/github.com/cloudflare/golibs/bytepool/bytepool.go:38 +0x176 goroutine 11 [chan receive]: github.com/Lafeng/deblocus/tunnel.(*Server).updateTimeCounterWorker(0xc82010b800, 0xdf8475800) /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/server.go:283 +0xa2 created by github.com/Lafeng/deblocus/tunnel.NewServer.func1 /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/server.go:245 +0x5a goroutine 4786 [select]: github.com/Lafeng/deblocus/tunnel.(*egressRouter).cleanTask(0xc82084acf0) /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:206 +0xf8 created by github.com/Lafeng/deblocus/tunnel.newEgressRouter /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:102 +0x1eb goroutine 4745 [select]: github.com/Lafeng/deblocus/tunnel.(*egressRouter).cleanTask(0xc820949830) /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:206 +0xf8 created by github.com/Lafeng/deblocus/tunnel.newEgressRouter /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:102 +0x1eb goroutine 4789 [select]: github.com/Lafeng/deblocus/tunnel.(*egressRouter).cleanTask(0xc82084a6f0) /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:206 +0xf8 created by github.com/Lafeng/deblocus/tunnel.newEgressRouter /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:102 +0x1eb goroutine 4627 [select]: github.com/Lafeng/deblocus/tunnel.(*egressRouter).cleanTask(0xc8208363c0) /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:206 +0xf8 created by github.com/Lafeng/deblocus/tunnel.newEgressRouter /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:102 +0x1eb goroutine 4744 [select]: github.com/Lafeng/deblocus/tunnel.(*egressRouter).cleanTask(0xc820910e40) /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:206 +0xf8 created by github.com/Lafeng/deblocus/tunnel.newEgressRouter /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:102 +0x1eb goroutine 4787 [select]: github.com/Lafeng/deblocus/tunnel.(*egressRouter).cleanTask(0xc8208377a0) /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:206 +0xf8 created by github.com/Lafeng/deblocus/tunnel.newEgressRouter /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:102 +0x1eb goroutine 5555 [select]: github.com/Lafeng/deblocus/tunnel.(*egressRouter).cleanTask(0xc82084ab10) /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:206 +0xf8 created by github.com/Lafeng/deblocus/tunnel.newEgressRouter /works/deblocus/src/github.com/Lafeng/deblocus/tunnel/queue.go:102 +0x1eb
When the close instruction was completed prior to the creation instruction, then will panic.