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

when rpc client closed by server, the cpu 100% #762

Open
hiseyxhp opened this issue Jun 23, 2020 · 5 comments
Open

when rpc client closed by server, the cpu 100% #762

hiseyxhp opened this issue Jun 23, 2020 · 5 comments

Comments

@hiseyxhp
Copy link

when rpc client closed by server, the cpu 100%,the epoll-wait return and evt.events=0
the pstack is
#0 0x00007fcd31b4ade7 in epoll_pwait () from /usr/lib64/libc.so.6
#1 0x00000000007af40e in seastar::reactor_backend_epoll::wait_and_process (this=0x6000002e0000, timeout=, active_sigmask=) at ../../src/core/reactor_backend.cc:652
#2 0x000000000061ece5 in poll_once (this=) at ../../src/core/reactor.cc:2818
#3 operator() (__closure=0x7fff3369a820) at ../../src/core/reactor.cc:2716
#4 std::_Function_handler<bool(), seastar::reactor::run()::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/local/include/c++/7.2.0/bits/std_function.h:302
#5 0x000000000064b4fd in operator() (this=0x7fff3369a820) at /usr/local/include/c++/7.2.0/bits/std_function.h:706
#6 seastar::reactor::run (this=0x600000296000) at ../../src/core/reactor.cc:2742
#7 0x000000000060a2e3 in seastar::app_template::run_deprecated(int, char**, std::function<void ()>&&) (this=0x7fff3369ade0, ac=, av=, func=) at ../../src/core/app-template.cc:202
#8 0x0000000000572f56 in main ()

@avikivity
Copy link
Member

There is not enough infomation in the bug report. I have no idea what code you are running.

@hiseyxhp
Copy link
Author

thank you for your answer! I just run the rpc-test and my system is centos7。
rpc_sample.tar.gz

this is my test project code , when the client connect to the server, and then close the server by Ctrl+C, the client occupy cpu 100%

@avikivity
Copy link
Member

I guess no one ran the rpc sample application since it was written.

/cc @gleb-cloudius

@hiseyxhp
Copy link
Author

I also test with seastar-18.08.0, this does not have this problem, when use seastar-20.05.0, this problem occured.

@hiseyxhp
Copy link
Author

hiseyxhp commented Jul 2, 2020

I have look into this question,find that in the file reactor_backend.cc:660。
if (evt.events & (EPOLLHUP | EPOLLERR)) {
// treat the events as required events when error occurs, let
// send/recv/accept/connect handle the specific error.
evt.events = pfd->events_requested;
}
when pfd->events_requested = 0,witch mean all events were handled, this line should lead epoll-event can not remove。this lead the client occupy cpu 100%。

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