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

retain设置为false后启动崩溃,有人遇到过吗? #1438

Closed
princeyuaner opened this issue Jul 10, 2021 · 3 comments
Closed

retain设置为false后启动崩溃,有人遇到过吗? #1438

princeyuaner opened this issue Jul 10, 2021 · 3 comments

Comments

@princeyuaner
Copy link

princeyuaner commented Jul 10, 2021

image

@cloudwu
Copy link
Owner

cloudwu commented Jul 10, 2021

  1. 发完贴后自己讀一遍,问问自己别人读得懂吗?
  2. 请表述清楚:什么 retain ?问题如何出现?
  3. 文本不要放在(截图)图片里,学学 markdown 。

@princeyuaner
Copy link
Author

  1. 发完贴后自己讀一遍,问问自己别人读得懂吗?
  2. 请表述清楚:什么 retain ?问题如何出现?
  3. 文本不要放在(截图)图片里,学学 markdown 。

jemalloc 的retain 参数设置为 false后,启动时候崩溃,以下是堆栈信息:

Program terminated with signal 6, Aborted.
#0 0x00007fd25082f387 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-317.el7.x86_64 libgcc-4.8.5-44.el7.x86_64 libuuid-2.23.2-63.el7.x86_64 zlib-1.2.7-18.el7.x86_64
(gdb) bt
#0 0x00007fd25082f387 in raise () from /lib64/libc.so.6
#1 0x00007fd250830a78 in abort () from /lib64/libc.so.6
#2 0x0000000000408635 in malloc_oom (size=size@entry=57757) at skynet-src/malloc_hook.c:152
#3 0x0000000000410c93 in malloc (size=size@entry=57757) at skynet-src/malloc_hook.c:217
#4 0x00007fd23afcd561 in seri (len=57757, b=0x7fd2451f4cc0, L=0x7fd1df24a808) at lualib-src/lua-seri.c:675
#5 luaseri_pack (L=0x7fd1df24a808) at lualib-src/lua-seri.c:746
#6 0x00000000004154f0 in luaD_precall (L=L@entry=0x7fd1df24a808, func=func@entry=0x7fd00f712d50, nresults=nresults@entry=-1) at ldo.c:434
#7 0x00000000004209fe in luaV_execute (L=L@entry=0x7fd1df24a808) at lvm.c:1130
#8 0x0000000000415270 in unroll (L=0x7fd1df24a808, ud=) at ldo.c:556
#9 0x0000000000414c5c in luaD_rawrunprotected (L=L@entry=0x7fd1df24a808, f=f@entry=0x4156c0 , ud=ud@entry=0x7fd2451f4f9c) at ldo.c:142
#10 0x00000000004158b7 in lua_resume (L=L@entry=0x7fd1df24a808, from=from@entry=0x7fd1ea0f8208, nargs=, nargs@entry=3) at ldo.c:664
#11 0x0000000000428d37 in auxresume (L=L@entry=0x7fd1ea0f8208, co=co@entry=0x7fd1df24a808, narg=3) at lcorolib.c:39
#12 0x0000000000429051 in luaB_coresume (L=0x7fd1ea0f8208) at lcorolib.c:60
#13 0x00000000004154f0 in luaD_precall (L=L@entry=0x7fd1ea0f8208, func=func@entry=0x7fd1e73111b0, nresults=nresults@entry=-1) at ldo.c:434
#14 0x0000000000420880 in luaV_execute (L=L@entry=0x7fd1ea0f8208) at lvm.c:1146
#15 0x00000000004157bf in luaD_call (L=L@entry=0x7fd1ea0f8208, func=, nResults=) at ldo.c:499
#16 0x0000000000415811 in luaD_callnoyield (L=0x7fd1ea0f8208, func=, nResults=) at ldo.c:509
#17 0x0000000000414c5c in luaD_rawrunprotected (L=L@entry=0x7fd1ea0f8208, f=f@entry=0x411990 <f_call>, ud=ud@entry=0x7fd2451f5280) at ldo.c:142
#18 0x0000000000415b1d in luaD_pcall (L=L@entry=0x7fd1ea0f8208, func=func@entry=0x411990 <f_call>, u=u@entry=0x7fd2451f5280, old_top=176, ef=) at ldo.c:729
#19 0x0000000000412ef1 in lua_pcallk (L=L@entry=0x7fd1ea0f8208, nargs=5, nresults=nresults@entry=-1, errfunc=errfunc@entry=0, ctx=ctx@entry=0, k=k@entry=0x427dc0 )
at lapi.c:972
#20 0x0000000000427f50 in luaB_pcall (L=0x7fd1ea0f8208) at lbaselib.c:424
#21 0x00000000004154f0 in luaD_precall (L=L@entry=0x7fd1ea0f8208, func=func@entry=0x7fd1e7311090, nresults=nresults@entry=2) at ldo.c:434
---Type to continue, or q to quit---
#22 0x00000000004209fe in luaV_execute (L=L@entry=0x7fd1ea0f8208) at lvm.c:1130
#23 0x00000000004157bf in luaD_call (L=L@entry=0x7fd1ea0f8208, func=, nResults=) at ldo.c:499
#24 0x0000000000415811 in luaD_callnoyield (L=0x7fd1ea0f8208, func=, nResults=) at ldo.c:509
#25 0x0000000000414c5c in luaD_rawrunprotected (L=L@entry=0x7fd1ea0f8208, f=f@entry=0x411990 <f_call>, ud=ud@entry=0x7fd2451f5530) at ldo.c:142
#26 0x0000000000415b1d in luaD_pcall (L=L@entry=0x7fd1ea0f8208, func=func@entry=0x411990 <f_call>, u=u@entry=0x7fd2451f5530, old_top=48, ef=) at ldo.c:729
#27 0x0000000000412ef1 in lua_pcallk (L=L@entry=0x7fd1ea0f8208, nargs=nargs@entry=5, nresults=nresults@entry=0, errfunc=errfunc@entry=1, ctx=ctx@entry=0, k=k@entry=0x0) at lapi.c:972
#28 0x00007fd23afc8da8 in _cb (context=0x7fd1ea10f580, ud=0x7fd1ea0f8208, type=1, session=3443, source=170, msg=0x7fd0da199960, sz=73) at lualib-src/lua-skynet.c:75
#29 0x000000000040a427 in dispatch_message (ctx=ctx@entry=0x7fd1ea10f580, msg=msg@entry=0x7fd2451f5610) at skynet-src/skynet_server.c:275
#30 0x000000000040afd4 in skynet_context_message_dispatch (sm=sm@entry=0x7fd251b202c0, q=0x7fd1ea0a9340, weight=weight@entry=1) at skynet-src/skynet_server.c:336
#31 0x000000000040b815 in thread_worker (p=) at skynet-src/skynet_start.c:163
#32 0x00007fd2516f7ea5 in start_thread () from /lib64/libpthread.so.0
#33 0x00007fd2508f796d in clone () from /lib64/libc.so.6

@princeyuaner princeyuaner changed the title retain设置为false后崩溃,有人遇到过吗? retain设置为false后启动崩溃,有人遇到过吗? Jul 12, 2021
@cloudwu
Copy link
Owner

cloudwu commented Jul 12, 2021

malloc_oom : https://github.com/cloudwu/skynet/blob/master/skynet-src/malloc_hook.c#L122-L127 内存分配返回了 NULL 。

@cloudwu cloudwu closed this as completed Aug 10, 2021
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