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

tile38-server crash with fence ROAM #440

Closed
githubfr opened this issue Apr 14, 2019 · 3 comments
Closed

tile38-server crash with fence ROAM #440

githubfr opened this issue Apr 14, 2019 · 3 comments

Comments

@githubfr
Copy link

I am new to tile38 and tried the following:

in terminal window1
127.0.0.1:9851> SET group p1 POINT 58 60
{"ok":true,"elapsed":"9.754µs"}
127.0.0.1:9851> SET group p2 POINT 60 60
{"ok":true,"elapsed":"6.6µs"}
127.0.0.1:9851> SET group p3 POINT 62 60
{"ok":true,"elapsed":"12.192µs"}

in terminal window2
tile38-cli
127.0.0.1:9851> {Y visitors MATCH v LIMIT 5 DISTANCE fence ROAM group * 200000
{"ok":true,"live":true}

in terminal window1
127.0.0.1:9851> SET visitors v POINT 59 60
{"ok":true,"elapsed":"14.286µs"}

-> result is a crash of tile38-server, with the following messages:

2019/04/14 15:19:35 [INFO] Server started, Tile38 version 1.16.1, git 0000000
2019/04/14 15:19:35 [INFO] AOF loaded 103 commands: 0.00s, 232018/s, 16 MB/s
2019/04/14 15:19:35 [INFO] Ready to accept connections at [::]:9851
2019/04/14 15:21:01 [INFO] live 127.0.0.1:50573
2019/04/14 15:25:59 [INFO] not live 127.0.0.1:50573
2019/04/14 15:26:58 [INFO] live 127.0.0.1:50584
2019/04/14 15:27:04 [INFO] not live 127.0.0.1:50584
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x1479e12]

goroutine 47 [running]:
github.com/tidwall/tile38/vendor/github.com/tidwall/geojson.(*Point).Distance(0xc0001937a0, 0x0, 0x0, 0x8)
/var/folders/kw/j7f63hdn1lj39702nh90xm9w0000gp/T/tile38.XXXX.Ka2VFxjH/go/src/github.com/tidwall/tile38/vendor/github.com/tidwall/geojson/point.go:225 +0x22
github.com/tidwall/tile38/internal/server.fenceMatch(0x0, 0x0, 0xc000278f00, 0xc00021a140, 0x0, 0x0, 0x0, 0xc00011a000, 0xc000040500, 0xc000093a70, ...)
/var/folders/kw/j7f63hdn1lj39702nh90xm9w0000gp/T/tile38.XXXX.Ka2VFxjH/go/src/github.com/tidwall/tile38/internal/server/fence.go:174 +0x1845
github.com/tidwall/tile38/internal/server.FenceMatch(0x0, 0x0, 0xc000278f00, 0xc00021a140, 0x0, 0x0, 0x0, 0xc00011a000, 0x9e400, 0xc0000bb310, ...)
/var/folders/kw/j7f63hdn1lj39702nh90xm9w0000gp/T/tile38.XXXX.Ka2VFxjH/go/src/github.com/tidwall/tile38/internal/server/fence.go:17 +0x9b
github.com/tidwall/tile38/internal/server.(*Server).goLive.func4(0xc0001fa580, 0xc000093c18, 0xc00021a140, 0xc00011a000, 0xc00010dc88)
/var/folders/kw/j7f63hdn1lj39702nh90xm9w0000gp/T/tile38.XXXX.Ka2VFxjH/go/src/github.com/tidwall/tile38/internal/server/live.go:189 +0xa8
github.com/tidwall/tile38/internal/server.(*Server).goLive(0xc0001fa580, 0x1a9a800, 0xc00021a000, 0x1ab55c0, 0xc0000a6820, 0xc00043a040, 0xc0000bb280, 0x0, 0x0, 0x0)/var/folders/kw/j7f63hdn1lj39702nh90xm9w0000gp/T/tile38.XXXX.Ka2VFxjH/go/src/github.com/tidwall/tile38/internal/server/live.go:190 +0x93e
github.com/tidwall/tile38/internal/server.(*Server).netServe.func1.2(0xc00009e194, 0xc0001fa580, 0xc00043a000, 0x1ab5860, 0xc000214000, 0x26d1308, 0xc000214000)
/var/folders/kw/j7f63hdn1lj39702nh90xm9w0000gp/T/tile38.XXXX.Ka2VFxjH/go/src/github.com/tidwall/tile38/internal/server/server.go:629 +0x141
created by github.com/tidwall/tile38/internal/server.(*Server).netServe.func1
/var/folders/kw/j7f63hdn1lj39702nh90xm9w0000gp/T/tile38.XXXX.Ka2VFxjH/go/src/github.com/tidwall/tile38/internal/server/server.go:627 +0xb52

I hope it is just a mishandling from me. Thank you for your help.

@tidwall
Copy link
Owner

tidwall commented Apr 23, 2019

Thank you so much for reporting this bug. I just pushed an update

@githubfr
Copy link
Author

githubfr commented Apr 25, 2019 via email

@tidwall
Copy link
Owner

tidwall commented Apr 25, 2019

The fix is only in the master branch atm. I’ll be pushing a new version release this week.
With Docker you can see the fix by using the edge tag, or by manually building Tile38.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants