Git Product home page Git Product logo

Comments (4)

gtyi999 avatar gtyi999 commented on June 8, 2024

2022/10/21 17:58:27 [errot] send request to 127.0.0.1:28082 fail : Get "http://127.0.0.1:28082/echo": dial tcp 127.0.0.1:28082: connect: connection refused
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x60 pc=0xa53617]

goroutine 84 [running]:
github.com/polarismesh/polaris-go/plugin/statreporter/prometheus.(*PrometheusHandler).handleCircuitBreakGauge(0xc0000a2410, 0x4044e6?, 0xc000394330)
/root/workspace/go/src/polaris-go/plugin/statreporter/prometheus/prometheus_handler.go:228 +0x77
github.com/polarismesh/polaris-go/plugin/statreporter/prometheus.(*PrometheusHandler).ReportStat(0xa0?, 0xc?, {0xd00750?, 0xc000394330?})
/root/workspace/go/src/polaris-go/plugin/statreporter/prometheus/prometheus_handler.go:139 +0x5a
github.com/polarismesh/polaris-go/plugin/statreporter/prometheus.(*PrometheusReporter).ReportStat(0x750000c0000218b8?, 0x0?, {0xd00750?, 0xc000394330?})
/root/workspace/go/src/polaris-go/plugin/statreporter/prometheus/prometheus_reporter.go:84 +0x27
github.com/polarismesh/polaris-go/pkg/flow.(*Engine).SyncReportStat(0xc0000d2ea0, 0x4, {0xd00750, 0xc000394330})
/root/workspace/go/src/polaris-go/pkg/flow/impl.go:344 +0x171
github.com/polarismesh/polaris-go/plugin/localregistry/inmemory.(*LocalCache).UpdateInstances(0xc00040a000, 0xc000286040)
/root/workspace/go/src/polaris-go/plugin/localregistry/inmemory/inmemory.go:577 +0x7a2
github.com/polarismesh/polaris-go/pkg/plugin/localregistry.(*Proxy).UpdateInstances(0xc0003b6448?, 0xc000021c60?)
/root/workspace/go/src/polaris-go/pkg/plugin/localregistry/proxy.go:48 +0x24
github.com/polarismesh/polaris-go/pkg/flow/cbcheck.(*CircuitBreakCallBack).doCircuitBreakForService(0xc000438600, {{0xc0003b6448?, 0x40e6be?}, {0xc000036450?, 0xffffffffffffff04?}}, {0x0, 0x0}, {0xd02e88?, 0xc0001c4a80}, {0xbec320, ...})
/root/workspace/go/src/polaris-go/pkg/flow/cbcheck/ticker.go:135 +0x790
github.com/polarismesh/polaris-go/pkg/flow/cbcheck.(*CircuitBreakRealTimeCallBack).Process(0xc0005480a0)
/root/workspace/go/src/polaris-go/pkg/flow/cbcheck/realtime.go:68 +0x136
github.com/polarismesh/polaris-go/pkg/flow/schedule.(*taskRoutine).runTakePriority(0xc0000a28c0)
/root/workspace/go/src/polaris-go/pkg/flow/schedule/routines.go:139 +0x202
created by github.com/polarismesh/polaris-go/pkg/flow/schedule.(*taskRoutine).start
/root/workspace/go/src/polaris-go/pkg/flow/schedule/routines.go:106 +0x178

from polaris-go.

chuntaojun avatar chuntaojun commented on June 8, 2024

我修复下

from polaris-go.

andrewshan avatar andrewshan commented on June 8, 2024

handleCircuitBreakGauge

是什么原因导致panic?

from polaris-go.

chuntaojun avatar chuntaojun commented on June 8, 2024

err := g.engine.SyncReportStat(model.CircuitBreakStat,
&model.CircuitBreakGauge{ChangeInstance: updateInstance, CBStatus: nextCBStatus})

这里原先的逻辑,塞入的是 preCBStatus,会导致 nil panic

from polaris-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.