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

graphd might block at exit #3441

Closed
kikimo opened this issue Dec 9, 2021 · 0 comments · Fixed by #3542
Closed

graphd might block at exit #3441

kikimo opened this issue Dec 9, 2021 · 0 comments · Fixed by #3542
Assignees
Labels
type/bug Type: something is unexpected
Milestone

Comments

@kikimo
Copy link
Contributor

kikimo commented Dec 9, 2021

Please check the FAQ documentation before raising an issue

Describe the bug (required)

Take a look at this issue #3434 , after reviewing GraphDaemon's code, we suspect that it may suffer from the same problem since it call gServer->stop() in signal handler(gServer is a ThriftServer instance, if the handler is triggered and scheduled to execute in one of the ThriftServer's worker thread, it may block forever):

void signalHandler(int sig) {
switch (sig) {
case SIGINT:
case SIGTERM:
FLOG_INFO("Signal %d(%s) received, stopping this server", sig, ::strsignal(sig));
gServer->stop();
break;
default:
FLOG_ERROR("Signal %d(%s) received but ignored", sig, ::strsignal(sig));
}
}

Your Environments (required)

  • OS: uname -a
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id (e.g. a3ffc7d8)

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Step 1
  2. Step 2
  3. Step 3

Expected behavior

Additional context

@kikimo kikimo added the type/bug Type: something is unexpected label Dec 9, 2021
@Sophie-Xie Sophie-Xie added this to the v3.0.0 milestone Dec 9, 2021
@Sophie-Xie Sophie-Xie assigned heroicNeZha and unassigned yixinglu Dec 17, 2021
@heroicNeZha heroicNeZha linked a pull request Dec 28, 2021 that will close this issue
7 tasks
yixinglu pushed a commit to yixinglu/nebula that referenced this issue Mar 21, 2022
#### What type of PR is this?
- [x] bug
- [ ] feature
- [ ] enhancement

#### What does this PR do?
closes vesoft-inc#3441 
simplify graphd signal handler:Set stop condition instead of waiting all workers stop

#### Which issue(s)/PR(s) this PR relates to?
In vesoft-inc#3437 , it simplify storage SIGINT signal handler
  
#### Special notes for your reviewer, ex. impact of this fix, etc:


#### Additional context/ Design document:


#### Checklist:
- [ ] Documentation affected (Please add the label if documentation needs to be modified.)
- [ ] Incompatibility (If it breaks the compatibility, please describe it and add the corresponding label.)
- [ ] If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
- [ ] Performance impacted: Consumes more CPU/Memory

#### Release notes:

Please confirm whether to be reflected in release notes and how to describe:
>                                                                 `


Migrated from vesoft-inc#3542

Co-authored-by: endy.li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants