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

Add nil check for controller when agent is shutting down #357

Merged
merged 3 commits into from
Jul 3, 2023

Conversation

dhurley
Copy link
Collaborator

@dhurley dhurley commented Jun 28, 2023

Proposed changes

Add nil check for controller when agent is shutting down to prevent the follow error from happening.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x10087d12a]

goroutine 45 [running]:
main.handleSignals.func1()
        /Users/d.hurley/go/src/github.com/nginx/agent/main.go:141 +0x2ca
created by main.handleSignals
        /Users/d.hurley/go/src/github.com/nginx/agent/main.go:126 +0x1f8
exit status 2
make: *** [run] Error 1

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@netlify
Copy link

netlify bot commented Jun 28, 2023

Deploy Preview for agent-public-docs canceled.

Name Link
🔨 Latest commit f2d42c9
🔍 Latest deploy log https://app.netlify.com/sites/agent-public-docs/deploys/649d9ac61391e4000769c2b9

@github-actions github-actions bot added the chore Pull requests for routine tasks label Jun 28, 2023
@dhurley dhurley added bug Something isn't working and removed chore Pull requests for routine tasks labels Jun 28, 2023
main.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.15 ⚠️

Comparison is base (4716d2a) 67.31% compared to head (8d0331a) 67.16%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #357      +/-   ##
==========================================
- Coverage   67.31%   67.16%   -0.15%     
==========================================
  Files         113      113              
  Lines       12731    12738       +7     
==========================================
- Hits         8570     8556      -14     
- Misses       3588     3609      +21     
  Partials      573      573              

see 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions github-actions bot added the chore Pull requests for routine tasks label Jun 28, 2023
@dhurley dhurley removed the chore Pull requests for routine tasks label Jun 29, 2023
@dhurley dhurley merged commit 62e480f into main Jul 3, 2023
@dhurley dhurley deleted the fix-error-during-agent-shutdown branch July 3, 2023 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants