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

SwoftEvent::COROUTINE_COMPLETE 事件有bug #1146

Closed
aslackers opened this issue Dec 7, 2019 · 5 comments
Closed

SwoftEvent::COROUTINE_COMPLETE 事件有bug #1146

aslackers opened this issue Dec 7, 2019 · 5 comments
Assignees
Milestone

Comments

@aslackers
Copy link

swoole文档上写着

发生致命错误或者代码中主动调用exit时,Worker/Task进程会退出,管理进程会重新创建新的进程。这可能导致死循环,不停地创建销毁进程

目前已发现的事件SwoftEvent::COROUTINE_COMPLETE,未做错误异常捕获,会导致进程不断的被杀死、创建,进入死循环,导致CPU飙升

@inhere inhere changed the title 事件管理有bug SwoftEvent::COROUTINE_COMPLETE 事件管理有bug Dec 7, 2019
@inhere inhere changed the title SwoftEvent::COROUTINE_COMPLETE 事件管理有bug SwoftEvent::COROUTINE_COMPLETE 事件有bug Dec 7, 2019
@inhere inhere added the unconfirmed waiting for confirmation label Dec 7, 2019
@inhere inhere added this to the v2.0.8 milestone Dec 7, 2019
@inhere
Copy link
Member

inhere commented Dec 7, 2019

@aslackers 我们检查验证下

@aslackers
Copy link
Author

项目启动后,将runtime目录下的logs目录删除,发送一个HTTP请求。这种方式必然会出现这个问题。

@inhere
Copy link
Member

inhere commented Dec 7, 2019

好的

@inhere inhere added bug bug: waiting fix kind: core and removed unconfirmed waiting for confirmation labels Dec 7, 2019
@inhere inhere modified the milestones: v2.0.8, v2.0.9 Feb 16, 2020
@herenet
Copy link

herenet commented Feb 20, 2020

我也遇到同样的问题了,我这边不能肯定是否是因为删除Log文件引起的。程序启动后,我有个健康检测1秒钟一次。运行个一天左右,就不返回数据了,只有500错误码,日志也没有,我看notice日志还在打,自定义的记录SQL的日志也正常打印着。。仔细观察发现有一个worker进程的ID一直在变,说明一直在重新创建进程。strace了一个manager进程返回如下:

wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 23484
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=23484, si_uid=0, si_status=0, si_utime=1, si_stime=1} ---
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5839709b10) = 23496
@inhere

@herenet
Copy link

herenet commented Feb 20, 2020

补充:
image
@inhere

@inhere inhere added bug: fixed bug fixed and removed bug: waiting fix labels Apr 13, 2020
inhere added a commit to swoft-cloud/swoft-bean that referenced this issue Apr 13, 2020
inhere added a commit to swoft-cloud/swoft-framework that referenced this issue Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants