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

error thrown from sleep: attempt to call a userdata value #234

Open
pspacek opened this issue Feb 24, 2020 · 3 comments
Open

error thrown from sleep: attempt to call a userdata value #234

pspacek opened this issue Feb 24, 2020 · 3 comments

Comments

@pspacek
Copy link

pspacek commented Feb 24, 2020

Occasionally I receive mystical errors from cqueues:

error: attempt to call a userdata value stack traceback:
	[C]: in function 'poll'
	/usr/share/lua/5.1/cqueues.lua:62: in function 'sleep'
	/usr/lib/knot-resolver/kres_modules/prometheus.lua:91: in function </usr/lib/knot-resolver/kres_modules/prometheus.lua:39>

This happens asynchronously and I cannot see any explanation in my code, it just calls sleep.

The only wild idea that came to my mind is a problem with premature termination of syscalls but I do not have sufficient knowledge of cqueues and coroutines to dig deeper.

Any ideas what it might be and how to fix that?

@pspacek pspacek changed the title error thrown from sleep: attempt to call a userdata value stack traceback error thrown from sleep: attempt to call a userdata value Feb 24, 2020
@daurnimator
Copy link
Collaborator

I'd probably start by printing off the stack just before the lua_pcall?

@pspacek
Copy link
Author

pspacek commented Feb 25, 2020

Hmm, I do not undestand what you mean. My code is calling .sleep(1) ... do you mean adding a pcall to someplace in cqueues?

@daurnimator
Copy link
Collaborator

do you mean adding a pcall to someplace in cqueues?

if (LUA_OK != (status = lua_pcall(L, 1, 1, 0))) {

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