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

Server crashed under stress test #69

Closed
puqing opened this issue Mar 5, 2014 · 2 comments
Closed

Server crashed under stress test #69

puqing opened this issue Mar 5, 2014 · 2 comments

Comments

@puqing
Copy link
Contributor

puqing commented Mar 5, 2014

With the default configuration, the server crashed by this test:

$ while true; do echo -e "SET abc 1 \nGET abc"; done | ./client 127.0.0.1 8888

It seems the function 'expand_queue' failed to allocate enough memory.

An assertion on the return value of malloc(3) was put in the function, and the call-stack is like this:
#0 0x00007f8bda192475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f8bda1956f0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f8bda18b621 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00000000004055da in expand_queue (q=0x135ee00)

at skynet-src/skynet_mq.c:153

#4 0x00000000004058c3 in skynet_mq_push (q=0x135ee00, message=0x7f8bd8846c40)

at skynet-src/skynet_mq.c:211

#5 0x000000000040600d in skynet_context_push (handle=16777240,

message=0x7f8bd8846c40) at skynet-src/skynet_server.c:170

#6 0x0000000000407631 in skynet_send (context=0x7f8bd405c670,

source=16777232, destination=16777240, type=65539, session=0, 
data=0xca60e70, sz=50331655) at skynet-src/skynet_server.c:631

#7 0x00007f8bd9858f9b in _forward (g=0x7f8bd405c610, c=0x7f8bd4079ae0, size=7)

at service-src/service_gate.c:175

#8 0x00007f8bd9859131 in dispatch_message (g=0x7f8bd405c610,

c=0x7f8bd4079ae0, id=13, data=0x7f8bc3c52410, sz=16384)
at service-src/service_gate.c:199

#9 0x00007f8bd9859208 in dispatch_socket_message (g=0x7f8bd405c610,

message=0x7f8bc3c00a90, sz=0) at service-src/service_gate.c:214

#10 0x00007f8bd985964b in _cb (ctx=0x7f8bd405c670, ud=0x7f8bd405c610, type=6,

session=0, source=0, msg=0x7f8bc3c00a90, sz=24)
at service-src/service_gate.c:297

#11 0x0000000000406333 in _dispatch_message (ctx=0x7f8bd405c670,

msg=0x7f8bd8846e60) at skynet-src/skynet_server.c:250

#12 0x0000000000406481 in skynet_context_message_dispatch (sm=0x12fbcb0)

at skynet-src/skynet_server.c:288

#13 0x0000000000407b5c in _worker (p=0x7fff5de06dd0)

at skynet-src/skynet_start.c:122

#14 0x00007f8bdadb1b50 in start_thread ()

from /lib/x86_64-linux-gnu/libpthread.so.0
#15 0x00007f8bda23c0ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
#16 0x0000000000000000 in ?? ()

The system is a 64-bit and 4-core computer running Linux.

@cloudwu
Copy link
Owner

cloudwu commented Mar 5, 2014

See Issue #63

@cloudwu cloudwu closed this as completed Mar 5, 2014
@cloudwu
Copy link
Owner

cloudwu commented Mar 5, 2014

And read readme.md, you should launch Global logger server for this test

./skynet config_log # Launch second skynet node (Global logger server)

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