liushv0 commented on PR #2168:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/2168#issuecomment-1980500350

   
![image](https://github.com/apache/apisix-ingress-controller/assets/19424192/2f290aa1-a131-4fb8-b680-87f64bb2b2c0)
   
   
   sorry for late  :( 
   
   apisix-route sync goroutine(gr1)will get test-ar from MemDB,
   apisix-plugin-config sync goroutine (gr2 )will get test-apc from MemDB,
   test-apc has be refered by test-ar。
   
   
   now  gr1 begin to sync CR test-apc,func `PluginConfig.DeepCopyInto` will be 
called,in this function,`Plugins#DeepCopyInto` be called。
   <img width="1057" alt="image" 
src="https://github.com/apache/apisix-ingress-controller/assets/19424192/958ede1c-62d5-4e2d-bd35-d51e3ec1ef12";>
   
   
   
   at the same time, gr2 begin to sync CR test-apc,func  `Route#DeepCopyInto`  
will be called,in this function,`Plugins#DeepCopyInto`  also be called。 
   <img width="980" alt="image" 
src="https://github.com/apache/apisix-ingress-controller/assets/19424192/c4d8ea4c-3891-4f17-8fdb-d605e58f07b9";>
   
   
   Plugins in test-apc and Plugins in test-ar  pointer to same instance,so two 
goroutine concurrent  marshal  this Plugins instance,and panic
   
   
   
   
   
   
   
   
   
   


-- 
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