Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rest sink report -> panic: runtime error: invalid memory address or nil pointer dereference #173

Closed
lesliechung88 opened this issue Mar 23, 2020 · 1 comment
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@lesliechung88
Copy link

lesliechung88 commented Mar 23, 2020

运行一段时间后,突然出现在这个情况:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xb2e74c]

goroutine 21 [running]:
github.com/emqx/kuiper/xstream/sinks.(*RestSink).send(0xc00012c460, 0xe9d3c0, 0xc00040e330, 0x10ef060, 0xc0001e2070, 0x1, 0x0)
/root/kuiper-edgex/xstream/sinks/rest_sink.go:283 +0x66c
github.com/emqx/kuiper/xstream/sinks.(*RestSink).Collect(0xc00012c460, 0x10eefe0, 0xc0001e60a0, 0xe56da0, 0xc000422340, 0x0, 0xc0000bf068)
/root/kuiper-edgex/xstream/sinks/rest_sink.go:180 +0x297
github.com/emqx/kuiper/xstream/nodes.doCollect(0x10df440, 0xc00012c460, 0xc000422320, 0x10eaf60, 0xc0000fa360, 0x3e8, 0xc000094360, 0x10eefe0, 0xc0001e60a0)
/root/kuiper-edgex/xstream/nodes/sink_node.go:181 +0x1af
github.com/emqx/kuiper/xstream/nodes.(*SinkNode).Open.func1.1(0xc000144d20, 0xc00016a2a0, 0x10eefe0, 0xc0001e60a0, 0x10ef060, 0xc0001e2070, 0xc0000b8ba8, 0xc0000b8bb0, 0xc0000b8b8e, 0xc0000b8ba0, ...)
/root/kuiper-edgex/xstream/nodes/sink_node.go:145 +0x3f8
created by github.com/emqx/kuiper/xstream/nodes.(*SinkNode).Open.func1
/root/kuiper-edgex/xstream/nodes/sink_node.go:108 +0x3c2

@jinfahua
Copy link
Collaborator

Thanks, it should be a bug... @ngjaying We should add error handling before determining the response code at https://github.com/emqx/kuiper/blob/master/xstream/sinks/rest_sink.go#L283

@jinfahua jinfahua added the kind/bug Categorizes issue or PR as related to a bug. label Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants