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

gorse-in-one启动时候还有个panic #485

Closed
ppyupp opened this issue Jun 27, 2022 · 6 comments · Fixed by #585
Closed

gorse-in-one启动时候还有个panic #485

ppyupp opened this issue Jun 27, 2022 · 6 comments · Fixed by #585
Labels
bug Something isn't working irreproducible Something is irreproducible

Comments

@ppyupp
Copy link

ppyupp commented Jun 27, 2022

只在启动时候出现, 不过捕获到了... 就是看着难受 -_-!
{
"level":"error",
"ts":1656313095.142161,
"caller":"base/util.go:61",
"msg":"panic recovered",
"panic":"runtime error: index out of range [-1]",
"stacktrace":"github.com/zhenghaoz/gorse/base.CheckPanic
/Users/ak47/dec/gorse-master/base/util.go:61
runtime.gopanic
/usr/local/go/src/runtime/panic.go:838
runtime.goPanicIndex
/usr/local/go/src/runtime/panic.go:89
github.com/zhenghaoz/gorse/base/search.(*IVF).Build.func1
/Users/ak47/dec/gorse-master/base/search/ivf.go:205
github.com/zhenghaoz/gorse/base/parallel.Parallel
/Users/ak47/dec/gorse-master/base/parallel/parallel.go:31
github.com/zhenghaoz/gorse/base/search.(*IVF).Build
/Users/ak47/dec/gorse-master/base/search/ivf.go:192
github.com/zhenghaoz/gorse/base/search.(*IVFBuilder).Build
/Users/ak47/dec/gorse-master/base/search/ivf.go:274
github.com/zhenghaoz/gorse/master.(*Master).findItemNeighborsIVF
/Users/ak47/dec/gorse-master/master/tasks.go:386
github.com/zhenghaoz/gorse/master.(*Master).runFindItemNeighborsTask
/Users/ak47/dec/gorse-master/master/tasks.go:254
github.com/zhenghaoz/gorse/master.(*Master).runRankingRelatedTasks
/Users/ak47/dec/gorse-master/master/tasks.go:857
github.com/zhenghaoz/gorse/master.(*Master).RunPrivilegedTasksLoop
/Users/ak47/dec/gorse-master/master/master.go:277"
}

@ppyupp ppyupp added the bug Something isn't working label Jun 27, 2022
@zhenghaoz
Copy link
Collaborator

这个是数据集为空时候会出现的BUG

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


This is a bug that occurs when the dataset is empty

@zhenghaoz
Copy link
Collaborator

zhenghaoz commented Jul 7, 2022

这个BUG的深层次原因是计算距离的时候出现了NaN,复现的话需要依赖数据

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The deep-seated reason for this bug is that NaN appears when calculating the distance.

@zhenghaoz zhenghaoz added the irreproducible Something is irreproducible label Jul 7, 2022
@myxtype
Copy link

myxtype commented Sep 29, 2022

同样遇到这样的问题

{"level":"info","ts":1664419110.760423,"caller":"master/tasks.go:252","msg":"start searching neighbors of items","n_cache":100}
panic: runtime error: index out of range [-1]

goroutine 152 [running]:
github.com/zhenghaoz/gorse/base/search.(*IVF).Build.func1(0xc000064400?, 0x0)
	/go/gorse/base/search/ivf.go:222 +0x38e
github.com/zhenghaoz/gorse/base/parallel.Parallel(0x2, 0xc0004d8360?, 0xc012e9e050)
	/go/gorse/base/parallel/parallel.go:39 +0xf7
github.com/zhenghaoz/gorse/base/search.(*IVF).Build(0xc00c7be180)
	/go/gorse/base/search/ivf.go:209 +0x525
github.com/zhenghaoz/gorse/base/search.(*IVFBuilder).Build(0xc012e9e000, 0x3f4ccccd, 0x3, 0x64?, 0xc000324070)
	/go/gorse/base/search/ivf.go:294 +0x175
github.com/zhenghaoz/gorse/master.(*Master).findUserNeighborsIVF(0xc0001b8c00, 0xc012eacd80, {0xc00c87e700, 0x1, 0x1}, {0xc00acfe000, 0x4fce3, 0x4fce3}, 0xc000102240, 0xc0001577e0)
	/go/gorse/master/tasks.go:752 +0x470
github.com/zhenghaoz/gorse/master.(*FindUserNeighborsTask).run(0xc0095ee510, 0x167b965?)
	/go/gorse/master/tasks.go:625 +0x606
github.com/zhenghaoz/gorse/master.(*Master).RunPrivilegedTasksLoop.func2({0x1abb000, 0xc0095ee510})
	/go/gorse/master/master.go:301 +0x18c
created by github.com/zhenghaoz/gorse/master.(*Master).RunPrivilegedTasksLoop
	/go/gorse/master/master.go:297 +0x85c

@zhenghaoz
Copy link
Collaborator

同样遇到这样的问题

{"level":"info","ts":1664419110.760423,"caller":"master/tasks.go:252","msg":"start searching neighbors of items","n_cache":100}
panic: runtime error: index out of range [-1]

goroutine 152 [running]:
github.com/zhenghaoz/gorse/base/search.(*IVF).Build.func1(0xc000064400?, 0x0)
	/go/gorse/base/search/ivf.go:222 +0x38e
github.com/zhenghaoz/gorse/base/parallel.Parallel(0x2, 0xc0004d8360?, 0xc012e9e050)
	/go/gorse/base/parallel/parallel.go:39 +0xf7
github.com/zhenghaoz/gorse/base/search.(*IVF).Build(0xc00c7be180)
	/go/gorse/base/search/ivf.go:209 +0x525
github.com/zhenghaoz/gorse/base/search.(*IVFBuilder).Build(0xc012e9e000, 0x3f4ccccd, 0x3, 0x64?, 0xc000324070)
	/go/gorse/base/search/ivf.go:294 +0x175
github.com/zhenghaoz/gorse/master.(*Master).findUserNeighborsIVF(0xc0001b8c00, 0xc012eacd80, {0xc00c87e700, 0x1, 0x1}, {0xc00acfe000, 0x4fce3, 0x4fce3}, 0xc000102240, 0xc0001577e0)
	/go/gorse/master/tasks.go:752 +0x470
github.com/zhenghaoz/gorse/master.(*FindUserNeighborsTask).run(0xc0095ee510, 0x167b965?)
	/go/gorse/master/tasks.go:625 +0x606
github.com/zhenghaoz/gorse/master.(*Master).RunPrivilegedTasksLoop.func2({0x1abb000, 0xc0095ee510})
	/go/gorse/master/master.go:301 +0x18c
created by github.com/zhenghaoz/gorse/master.(*Master).RunPrivilegedTasksLoop
	/go/gorse/master/master.go:297 +0x85c

如果你愿意共享下数据的话就容易修复了,这个bug需要特定数据触发😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working irreproducible Something is irreproducible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants