Closed losinggeneration closed 11 years ago
Hi, thanks for the report.
I can't repro on Ubuntu 12.04 x86_64. It may be a GC race as you have don't have the tcp socket object anchored (no local variable).
Could you change line 27 of ./src/luv.h from
to
and recompile.
It's pretty noisy, but it'd be great if you could send me the output from the client code and I'll take a look
Thanks! Richard
On Oct 8, 2012, at 11:54 PM, Harley Laue wrote:
local luv = require('luv') luv.net.tcp():connect('127.0.0.1', 8080)
lua tcp_echoclient.lua luv_thread.c: 26: luvL_thread_suspend: loop top luv_thread.c: 5: luvL_thread_ready: SET READY luv_thread.c: 29: luvL_thread_suspend: uv_run_once returned, active: 0 luv_thread.c: 31: luvL_thread_suspend: main ready, breaking luv_thread.c: 36: luvL_thread_suspend: back in main luv_object.c: 23: luvL_object_close: object closing 0x926828, type: 12 luv_stream.c: 277: luvL_stream_free: free stream: 0x926828 luv_object.c: 23: luvL_object_close: object closing 0x923868, type: 7 zsh: segmentation fault lua tcp_echoclient.lua
This was a bug in libuv - git HEAD is now fixed.
On Oct 9, 2012, at 1:59 AM, Harley Laue wrote:
lua tcp_echoclient.lua luv_thread.c: 26: luvL_thread_suspend: loop top luv_thread.c: 5: luvL_thread_ready: SET READY luv_thread.c: 29: luvL_thread_suspend: uv_run_once returned, active: 0 luv_thread.c: 31: luvL_thread_suspend: main ready, breaking luv_thread.c: 36: luvL_thread_suspend: back in main luv_object.c: 23: luvL_object_close: object closing 0x926828, type: 12 luv_stream.c: 277: luvL_stream_free: free stream: 0x926828 luv_object.c: 23: luvL_object_close: object closing 0x923868, type: 7 zsh: segmentation fault lua tcp_echoclient.lua
— Reply to this email directly or view it on GitHub.
This code causes a segfault on cleanup:
OS: Arch Linux 64 bit Lua: 5.1.5 git head: e48f475e8d98efafcf39b17e059d3dac98b1fa5e
Let me know if you need more info to reproduce the crash.
-- update to indicate that it's not on connect, but rather on cleanup