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

how to use uv.loop_close() #260

Closed
besich opened this issue May 22, 2017 · 2 comments
Closed

how to use uv.loop_close() #260

besich opened this issue May 22, 2017 · 2 comments
Labels

Comments

@besich
Copy link

besich commented May 22, 2017

In luv example, the every example invoke uv.loop_close() in the end, and the lua engine is core dump.
the loop_close is release some resource, and the loop_gc is also release.
and dont invoke uv.loop_close, the example is good.
how to use it? it's luv bug? or example bug?

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff72f4fff in uv_walk () from ./luv.so
(gdb) bt
#0 0x00007ffff72f4fff in uv_walk () from ./luv.so
#1 0x00007ffff72f19d7 in loop_gc () from ./luv.so
#2 0x000000000040cd2f in luaD_precall ()
#3 0x000000000040d35e in luaD_call ()
#4 0x000000000040d3cc in luaD_callnoyield ()
#5 0x0000000000410a47 in dothecall ()
#6 0x000000000040c371 in luaD_rawrunprotected ()
#7 0x000000000040db5c in luaD_pcall ()
#8 0x0000000000410b98 in GCTM ()
#9 0x0000000000410ce4 in callallpendingfinalizers ()
#10 0x0000000000411035 in luaC_freeallobjects ()
#11 0x0000000000417adc in close_state ()
#12 0x0000000000417fcf in lua_close ()
#13 0x0000000000404d80 in main ()

@zhaozg zhaozg added the ? label May 31, 2019
@zhaozg
Copy link
Member

zhaozg commented May 31, 2019

Are this bug exists now?

@zhaozg zhaozg closed this as completed May 31, 2019
@zhaozg zhaozg reopened this May 31, 2019
@zhaozg
Copy link
Member

zhaozg commented Jun 1, 2019

Same thing to #244. Have to be aware of is loop_close must be end of luv apis. If you call loop_close(), you should never call luv api anymore. And in usually loop_close should not be call, because loop object will automate gc by lua.

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

No branches or pull requests

2 participants