hawkular / hawkular-openshift-agent

A Hawkular feed that collects metrics from Prometheus and/or Jolokia endpoints deployed in one or more pods within an OpenShift node.
16 stars 21 forks source link

crash due to concurrent map writes #99

Closed jmazzitelli closed 7 years ago

jmazzitelli commented 7 years ago

Need to refactor the status report type stuff so it is thread safe. Otherwise, agent is crashing with:

fatal error: concurrent map writes
goroutine 70 [running]:
runtime.throw(0x1379850, 0x15)
    /home/mazz/bin/go-install/go/src/runtime/panic.go:566 +0x95 fp=0xc420731b60 sp=0xc420731b40
runtime.mapassign1(0x12138a0, 0xc420461020, 0xc420731d70, 0xc420731d50)
    /home/mazz/bin/go-install/go/src/runtime/hashmap.go:458 +0x8ef fp=0xc420731c48 sp=0xc420731b60
github.com/hawkular/hawkular-openshift-agent/collector/manager.(*MetricsCollectorManager).StartCollecting.func1(0x1b1d3a0, 0xc4201c2990, 0xc42048d4a0, 0x5b, 0xc4204616b0, 0xc4202ed300)
    /home/mazz/source/go/hawkular-openshift-agent/src/github.com/hawkular/hawkular-openshift-agent/collector/manager/metrics_collector_manager.go:164 +0x72f fp=0xc420731f70 sp=0xc420731c48