-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
cpu使用率突然降到很低 #350
Comments
你可以修改源代码加一些 log , 所有的工作线程的主函数全部在 https://github.com/cloudwu/skynet/blob/master/skynet-src/skynet_start.c 这里, 这个文件并不复杂. ps. 可以先确认是不是网络不收消息了. |
好的,我先排除一下网络问题,再给skynet_start加log来看看 |
今天发生了第三次这样的情况,确认了不是没收网络包的问题,然后我发现每次出问题都是热更新之后 |
|
如果你怀疑死锁,直接 gdb attach 进去看调用栈就可以确认。 |
这里这两周又出现了两次,上周出现后我进去看了调用栈,其中一条线程卡在了解析域名时读取 hosts文件上,其它线程基本都是卡在socket的send_request上,于是我们将域名解析交给nginx反向代理去做,顺便完全解决了域名解析的阻塞问题。 Thread 4 (Thread 0x7f52303f2700 (LWP 27857)): 这么看来,有无可能是codecache.clear()之后,每个虚拟机重新open的时候文件被锁住了? |
|
查出来了,原因在于io.popen |
云风,我们的项目在线上跑了一段时间后,发生过两次这样的情况:skynet进程cpu使用率突然降到很低很低,1%~2%左右,正常是200%~300%,进程是没有挂掉的,看起来只是突然间基本不处理任何消息了。帮忙看看我应该如何去定位这里的问题
1.3是cpu,55.6是内存
The text was updated successfully, but these errors were encountered: