You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
你好,我是昨天晚上在群里提问题的Dalton,因为今天公司空调坏了,所以到现在才去分析问题。
昨晚的问题是在query_string的地方出现了一次lua crash,内存问题比较难以定位,昨晚去掉了jemalloc后,帮助我更快的找到了问题点,是double free导致的,gdb到core文件中定位到了问题原因。
(gdb) bt
#0 0x00007fd904ea8625 in raise () from /lib/libc.so.6 #1 0x00007fd904ea9e05 in abort () from /lib/libc.so.6 #2 0x00007fd904ee6537 in __libc_message () from /lib/libc.so.6 #3 0x00007fd904eebf4e in malloc_printerr () from /lib/libc.so.6 #4 0x00007fd904eeecad in _int_free () from /lib/libc.so.6 #5 0x00007fd8fc523886 in ltostring (L=0x7fd8f40a6798) at lualib-src/lua-netpack.c:460
去掉jemalloc后,glibc在之前crash之前已经定位到了double free,最近有用的堆栈是在5,然后我去看了下我的lua代码,是这样的一份代码,当时为了临时打印东西写的。
184 local function dispatch_msg(fd, msg, sz)
185 print(string.format("recv message from fd (%d) : %s", fd, crypt.hexencode(netpack.tostring(msg,sz))))
186 messages:pushBack(netpack.tostring(msg,sz))
也就是我调用了两次netpack.tostring出现了double free,我注释了print代码就ok了,看了netpack.tostring中确有free代码。
The text was updated successfully, but these errors were encountered:
你好,我是昨天晚上在群里提问题的Dalton,因为今天公司空调坏了,所以到现在才去分析问题。
昨晚的问题是在query_string的地方出现了一次lua crash,内存问题比较难以定位,昨晚去掉了jemalloc后,帮助我更快的找到了问题点,是double free导致的,gdb到core文件中定位到了问题原因。
(gdb) bt
#0 0x00007fd904ea8625 in raise () from /lib/libc.so.6
#1 0x00007fd904ea9e05 in abort () from /lib/libc.so.6
#2 0x00007fd904ee6537 in __libc_message () from /lib/libc.so.6
#3 0x00007fd904eebf4e in malloc_printerr () from /lib/libc.so.6
#4 0x00007fd904eeecad in _int_free () from /lib/libc.so.6
#5 0x00007fd8fc523886 in ltostring (L=0x7fd8f40a6798) at lualib-src/lua-netpack.c:460
去掉jemalloc后,glibc在之前crash之前已经定位到了double free,最近有用的堆栈是在5,然后我去看了下我的lua代码,是这样的一份代码,当时为了临时打印东西写的。
184 local function dispatch_msg(fd, msg, sz)
185 print(string.format("recv message from fd (%d) : %s", fd, crypt.hexencode(netpack.tostring(msg,sz))))
186 messages:pushBack(netpack.tostring(msg,sz))
也就是我调用了两次netpack.tostring出现了double free,我注释了print代码就ok了,看了netpack.tostring中确有free代码。
The text was updated successfully, but these errors were encountered: