Closed NeverCheng closed 8 years ago
现在使用comet下的client客户端测试连接, 使用tcp 协议连接服务器,跑完以后,程序退出, 报错误如下: panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x40a47e]
goroutine 33203 [running]: main.LogSlow(0x897660, 0x6, 0xc820518bf0, 0x4, 0x0) /usr/local/goim/src/goim/comet/slow.go:50 +0x55e main.(_Server).dispatchTCP(0xc8268b2620, 0xc820518bf0, 0x4, 0xc8200281a0, 0xc820128ba8, 0xc848e16000, 0xc849220000, 0xc820128b60) /usr/local/goim/src/goim/comet/tcp.go:230 +0xe0f created by main.(_Server).serveTCP /usr/local/goim/src/goim/comet/tcp.go:132 +0x8ec
goroutine 1 [chan receive]: main.InitSignal() /usr/local/goim/src/goim/comet/signal.go:16 +0x38c main.main() /usr/local/goim/src/goim/comet/main.go:91 +0xb39
goroutine 17 [syscall, 1 minutes, locked to thread]: runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1
但是使用HTTP就没有问题,debug了好久了,目前还未发现问题原因
是使用那个commit版本的代码呢,现在最新master已经把slow log注释了的。
是由于什么导致崩溃的呢? 或者说是哪个地方指针为空?
用最新代码,没有使用slow.log 呢
现在使用comet下的client客户端测试连接, 使用tcp 协议连接服务器,跑完以后,程序退出, 报错误如下: panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x40a47e]
goroutine 33203 [running]: main.LogSlow(0x897660, 0x6, 0xc820518bf0, 0x4, 0x0) /usr/local/goim/src/goim/comet/slow.go:50 +0x55e main.(_Server).dispatchTCP(0xc8268b2620, 0xc820518bf0, 0x4, 0xc8200281a0, 0xc820128ba8, 0xc848e16000, 0xc849220000, 0xc820128b60) /usr/local/goim/src/goim/comet/tcp.go:230 +0xe0f created by main.(_Server).serveTCP /usr/local/goim/src/goim/comet/tcp.go:132 +0x8ec
goroutine 1 [chan receive]: main.InitSignal() /usr/local/goim/src/goim/comet/signal.go:16 +0x38c main.main() /usr/local/goim/src/goim/comet/main.go:91 +0xb39
goroutine 17 [syscall, 1 minutes, locked to thread]: runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1
但是使用HTTP就没有问题,debug了好久了,目前还未发现问题原因