Closed wangzhengnan closed 8 years ago
[10/25/16 22:52:41] [INFO] init comet rpc: [{tcp 127.0.0.1:8092}] [10/25/16 22:52:41] [INFO] start topic:KafkaPushsTopic consumer [10/25/16 22:52:41] [INFO] consumer group name:kafka_topic_push_group 2016/10/25 22:52:41 Connected to 127.0.0.1:2181 2016/10/25 22:52:41 Authenticated: id=96823266651668482, timeout=6000 2016/10/25 22:52:41 Re-submitting 0 credentials after reconnect [Sarama] 2016/10/25 22:52:41 Initializing new client [Sarama] 2016/10/25 22:52:41 client/metadata fetching metadata for all topics from broker localhost:9092 [Sarama] 2016/10/25 22:52:41 Connected to broker at localhost:9092 (unregistered) [Sarama] 2016/10/25 22:52:41 client/brokers registered new broker #0 at localhost:9092 [Sarama] 2016/10/25 22:52:41 Successfully initialized new client [Sarama] 2016/10/25 22:52:41 [kafka_topic_push_group/15c45f113feb] Consumer instance registered (localhost.pc-server:e34e5eed-0c91-425e-958e-15c45f113feb). [Sarama] 2016/10/25 22:52:41 [kafka_topic_push_group/15c45f113feb] Currently registered consumers: 1 [Sarama] 2016/10/25 22:52:41 [kafka_topic_push_group/15c45f113feb] KafkaPushsTopic :: Started topic consumer [Sarama] 2016/10/25 22:52:41 [kafka_topic_push_group/15c45f113feb] KafkaPushsTopic :: Claiming 1 of 1 partitions [Sarama] 2016/10/25 22:52:41 [kafka_topic_push_group/15c45f113feb] KafkaPushsTopic/0 :: Partition consumer listening for new messages only. [Sarama] 2016/10/25 22:52:41 Connected to broker at localhost:9092 (registered as #0) [Sarama] 2016/10/25 22:52:41 consumer/broker/0 added subscription to KafkaPushsTopic/0 panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x80ced4c]
0
goroutine 48 [running]: panic(0x8413f60, 0x18926008) /usr/lib/golang/src/runtime/panic.go:500 +0x331 sync/atomic.AddUint64(0x18a480dc, 0x1, 0x0, 0x20, 0x8411ec0) /usr/lib/golang/src/sync/atomic/asm_386.s:112 +0xc main.(*Comet).Broadcast(0x18a480a0, 0x18e0ae80, 0x0, 0x0) /var/live/apps/go/src/goim/logic/job/comet.go:62 +0x4f main.broadcast(0x18e0ae60, 0x10, 0x12) /var/live/apps/go/src/goim/logic/job/comet.go:168 +0x117 main.push(0x18e10045, 0x33, 0x33, 0x0, 0x0) /var/live/apps/go/src/goim/logic/job/push.go:50 +0x35e main.InitKafka.func2(0x18ae81e0) /var/live/apps/go/src/goim/logic/job/kafka.go:41 +0x247 created by main.InitKafka /var/live/apps/go/src/goim/logic/job/kafka.go:44 +0x442
那个分支呢,go是那个版本?
代码是最新的主版本 操作系统:centos6.5 go version go1.7.1 linux/386 kafka_2.11-0.10.0.0.tgz
我们目前线上是go1.6.2,这部分代码跑了两个月也没有出现过问题,代码目前还没看到有问题,估计跟go1.7.1有点关系,暂时还灰度。
改成go1.6.2 问题得到解决
[10/25/16 22:52:41] [INFO] init comet rpc: [{tcp 127.0.0.1:8092}] [10/25/16 22:52:41] [INFO] start topic:KafkaPushsTopic consumer [10/25/16 22:52:41] [INFO] consumer group name:kafka_topic_push_group 2016/10/25 22:52:41 Connected to 127.0.0.1:2181 2016/10/25 22:52:41 Authenticated: id=96823266651668482, timeout=6000 2016/10/25 22:52:41 Re-submitting
0
credentials after reconnect [Sarama] 2016/10/25 22:52:41 Initializing new client [Sarama] 2016/10/25 22:52:41 client/metadata fetching metadata for all topics from broker localhost:9092 [Sarama] 2016/10/25 22:52:41 Connected to broker at localhost:9092 (unregistered) [Sarama] 2016/10/25 22:52:41 client/brokers registered new broker #0 at localhost:9092 [Sarama] 2016/10/25 22:52:41 Successfully initialized new client [Sarama] 2016/10/25 22:52:41 [kafka_topic_push_group/15c45f113feb] Consumer instance registered (localhost.pc-server:e34e5eed-0c91-425e-958e-15c45f113feb). [Sarama] 2016/10/25 22:52:41 [kafka_topic_push_group/15c45f113feb] Currently registered consumers: 1 [Sarama] 2016/10/25 22:52:41 [kafka_topic_push_group/15c45f113feb] KafkaPushsTopic :: Started topic consumer [Sarama] 2016/10/25 22:52:41 [kafka_topic_push_group/15c45f113feb] KafkaPushsTopic :: Claiming 1 of 1 partitions [Sarama] 2016/10/25 22:52:41 [kafka_topic_push_group/15c45f113feb] KafkaPushsTopic/0 :: Partition consumer listening for new messages only. [Sarama] 2016/10/25 22:52:41 Connected to broker at localhost:9092 (registered as #0) [Sarama] 2016/10/25 22:52:41 consumer/broker/0 added subscription to KafkaPushsTopic/0 panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x80ced4c]goroutine 48 [running]: panic(0x8413f60, 0x18926008) /usr/lib/golang/src/runtime/panic.go:500 +0x331 sync/atomic.AddUint64(0x18a480dc, 0x1, 0x0, 0x20, 0x8411ec0) /usr/lib/golang/src/sync/atomic/asm_386.s:112 +0xc main.(*Comet).Broadcast(0x18a480a0, 0x18e0ae80, 0x0, 0x0) /var/live/apps/go/src/goim/logic/job/comet.go:62 +0x4f main.broadcast(0x18e0ae60, 0x10, 0x12) /var/live/apps/go/src/goim/logic/job/comet.go:168 +0x117 main.push(0x18e10045, 0x33, 0x33, 0x0, 0x0) /var/live/apps/go/src/goim/logic/job/push.go:50 +0x35e main.InitKafka.func2(0x18ae81e0) /var/live/apps/go/src/goim/logic/job/kafka.go:41 +0x247 created by main.InitKafka /var/live/apps/go/src/goim/logic/job/kafka.go:44 +0x442