alf5 opened a new issue #941:
URL: https://github.com/apache/apisix-ingress-controller/issues/941


   ### Issue description
   
   Pod crashes when ingress resource is deleted (i.e. kubectl delete ingress 
http-bin).
   
   
   ### Environment
   
   - your apisix-ingress-controller version (output of 
apisix-ingress-controller version --long):
   Version: 1.4.0
   Git SHA: no-git-module
   Go Version: go1.16.12
   Building OS/Arch: linux/amd64
   Running OS/Arch: linux/amd64
   
   - your Kubernetes cluster version (output of kubectl version): 1.21.1 - 
running in a kind cluster
   
   - if you run apisix-ingress-controller in Bare-metal environment, also show 
your OS version (uname -a): 
   Linux dev-amd 5.13.0-37-generic #42-Ubuntu SMP Tue Mar 15 14:34:06 UTC 2022 
x86_64 x86_64 x86_64 GNU/Linux
   
   ### Minimal test code / Steps to reproduce
   
   1. Follow 
https://apisix.apache.org/docs/ingress-controller/practices/proxy-the-httpbin-service-with-ingress
   2. execute - kubectl delete ingress httpserver-ingress
   
   ### Actual result
   
   apisix ingress controller pod crashes.
   
   Kubernetes restarts it and route and backend are then removed.
   
   ### Error log
   
   from pod's logs:
   ```
   2022-03-28T20:12:42+08:00    warn    ingress/ingress.go:231    sync ingress 
failed, will retry    {"object": 
{"Type":3,"Object":{"Key":"keycloak/keycloak","GroupVersion":"networking/v1","OldObject":null},"Tombstone":{}},
 "error": "ingr │
   │ ess.networking.k8s.io \"keycloak\" not found"}                             
                                                                                
                                                                                
 │
   │ panic: runtime error: invalid memory address or nil pointer dereference    
                                                                                
                                                                                
 │
   │ [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x18cb92c]   
                                                                                
                                                                                
 │
   │                                                                            
                                                                                
                                                                                
 │
   │ goroutine 174 [running]:                                                   
                                                                                
                                                                                
 │
   │ 
github.com/apache/apisix-ingress-controller/pkg/ingress.(*ingressController).handleSyncErr(0xc0006b4a80,
 0x198c020, 0xc00060e960, 0x1f9e100, 0xc000356fa0)                              
                                                    │
   │     /build/controller/pkg/ingress/ingress.go:237 +0x7ac                    
                                                                                
                                                                                
 │
   │ 
github.com/apache/apisix-ingress-controller/pkg/ingress.(*ingressController).runWorker(0xc0006b4a80,
 0x1fd9bf0, 0xc000358500)                                                       
                                                        │
   │     /build/controller/pkg/ingress/ingress.go:81 +0xcc                      
                                                                                
                                                                                
 │
   │ created by 
github.com/apache/apisix-ingress-controller/pkg/ingress.(*ingressController).run
                                                                                
                                                                 │
   │     /build/controller/pkg/ingress/ingress.go:68 +0x230 ```
   
   ### Expected result
   
   pod not to crash


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to