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

skynet升级到1.5.0后,skynet服务退出时,偶现crash. #1543

Closed
cfanzp008 opened this issue Feb 24, 2022 · 3 comments
Closed

skynet升级到1.5.0后,skynet服务退出时,偶现crash. #1543

cfanzp008 opened this issue Feb 24, 2022 · 3 comments

Comments

@cfanzp008
Copy link

cfanzp008 commented Feb 24, 2022

云大,请教一下,希望您能解答这个问题,skynet升级到1.5.0后,skynet服务退出时,偶现crash,目前出现一次。

  1. 进程crash的相关信息:
gdb skynet/skynet core.11691
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /data/mybonline/skynet/skynet...done.
...
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/data/mybonline/sh/subgame/../../skynet/skynet /data/mybonline/sh/subgame/gameserver/'.
Program terminated with signal 11, Segmentation fault.
#0  0x000000000042faa3 in luaS_remove (L=0x7f727d1dff08, ts=ts@entry=0x7f727d7d0640) at lstring.c:210
210         p = &(*p)->u.hnext;
Missing separate debuginfos, use: debuginfo-install glibc-2.17-324.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64
(gdb) bt
#0  0x000000000042faa3 in luaS_remove (L=0x7f727d1dff08, ts=ts@entry=0x7f727d7d0640) at lstring.c:210
#1  0x000000000042828a in freeobj (L=L@entry=0x7f727d1dff08, o=0x7f727d7d0640) at lgc.c:795
#2  0x000000000042a43f in deletelist (limit=0x7f727d1dff08, p=<optimized out>, L=0x7f727d1dff08) at lgc.c:1499
#3  luaC_freeallobjects (L=L@entry=0x7f727d1dff08) at lgc.c:1515
#4  0x000000000042eb97 in close_state (L=0x7f727d1dff08) at lstate.c:275
#5  0x000000000042f320 in lua_close (L=<optimized out>) at lstate.c:412
#6  0x00007f7284ee64ec in snlua_release (l=0x7f727ce38680) at service-src/service_snlua.c:515
#7  0x000000000041a2cf in delete_context (ctx=0x7f727c1e4480) at skynet-src/skynet_server.c:214
#8  skynet_context_release (ctx=ctx@entry=0x7f727c1e4480) at skynet-src/skynet_server.c:224
#9  0x000000000041a8c0 in skynet_context_message_dispatch (sm=sm@entry=0x7f7283808100, q=0x7f727ac9edc0, weight=weight@entry=-1) at skynet-src/skynet_server.c:350
#10 0x000000000041b0ab in thread_worker (p=<optimized out>) at skynet-src/skynet_start.c:163
#11 0x00007f7284ac1ea5 in start_thread () from /lib64/libpthread.so.0
#12 0x00007f7283ec69fd in clone () from /lib64/libc.so.6
  1. 进程crash前的相关日志:
[:000084d4] [2022-02-24 02:41:07.988] [info] Nt204534_ai_next_1974_Don't Break My Heart_lv3, circle_finish,table_srvid: 34003 tableid: 204534 ai_serverid: 34004 uid: 1974
[:000084d4] [2022-02-24 02:41:07.998] [warning] service/subgame/base/ai_service.lua:230:Wt204534_ai_next_1974_Don't Break My Heart_lv3, destroy_ai_other
[:000084d4] [2022-02-24 02:41:07.998] KILL self
[:000084d3] [2022-02-24 02:41:07.998] KILL self
  1. 之前用的旧版本的skynet,lua版本是5.3 一直很稳定,升级后才出现的这个问题。不太确定是否是业务流程有问题导致的。希望能指导一下,谢谢!
@cloudwu
Copy link
Owner

cloudwu commented Feb 24, 2022

  1. 看看 markdown 文档,把文本重新排版一下。
  2. 打开 memory check https://github.com/cloudwu/skynet/wiki/MemoryHook 检查一下。
  3. 去掉 jemalloc , 使用 AddressSanitizer 查一下问题。

@cfanzp008
Copy link
Author

好的,谢谢。

@cfanzp008
Copy link
Author

感谢云大指导,已排查出是第三方库原因导致的,问题已解决,最近5个月左右都很稳定。

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