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

Bug: Add defer recover for all go routines to prevent abnormal crash of manager-api #838

Closed
1 of 5 tasks
gxthrj opened this issue Nov 20, 2020 · 5 comments · Fixed by #1419
Closed
1 of 5 tasks

Bug: Add defer recover for all go routines to prevent abnormal crash of manager-api #838

gxthrj opened this issue Nov 20, 2020 · 5 comments · Fixed by #1419
Assignees
Labels
Milestone

Comments

@gxthrj
Copy link
Contributor

gxthrj commented Nov 20, 2020

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • Bug
  • Requirements
  • Feature or performance improvement
  • Other

Bug

  • Which version of Apache APISIX Dashboard, OS, and Browser?
    2.0

  • What happened?
    Manager-api may crash without any logs.
    In gin, we use filter.RecoverHandler() to prevent crash.
    But we can not control the exceptions in other go-routines.
    Need to add defer recover() for all go routines to prevent abnormal crash of manager-api .

@tokers
Copy link
Contributor

tokers commented Nov 20, 2020

@juzhiyuan juzhiyuan added the wait for update 1. Solution 2. Due date 3. Assignees if needed label Nov 23, 2020
@juzhiyuan
Copy link
Member

Any update for this issue?

@gxthrj
Copy link
Contributor Author

gxthrj commented Jan 14, 2021

cc @nic-chen @starsz what do you think about this

@starsz
Copy link
Contributor

starsz commented Jan 14, 2021

cc @nic-chen @starsz what do you think about this

Agree +1. But what should we do if we catch the other goroutine panic?

@nic-chen
Copy link
Member

cc @nic-chen @starsz what do you think about this

sure, agree +1

@nic-chen nic-chen added this to the 2.4 milestone Jan 14, 2021
@nic-chen nic-chen added backend and removed wait for update 1. Solution 2. Due date 3. Assignees if needed labels Jan 14, 2021
@nic-chen nic-chen self-assigned this Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants