SolidWallOfCode opened a new pull request #8443: URL: https://github.com/apache/trafficserver/pull/8443
We have seen crashes in `PluginVC` due to race conditions on the pending action. My proposed fix is * Use `PendingAction` to hold the pending action, instead of raw pointers. * Make `PendingAction` assignments thread safe. * Enable scheduling from `PendingAction`. For `PluginVC` the pending action is updated only when lock acquisition fails, which guarantees it is done near a concurrency race. Essentially if the instance can't be locked, an event is scheduled for future access and this needs to be stored in the instance. Beyond that, the wake up event is scheduled and then assigned to the member, which is yet another race condition. The observed crashes appear to be due to the scheduled event being handled on another thread before the assignment completes, leading to an assertion failure that the handled event is stored in the `PluginVC` instance. There are several approaches to this, but I think the best option is to using `PendingAction` to schedule the pending action in a way that updates the instance before the event is scheduled. This will require access to event internals because currently there does not appear to be a way to generically create an `Event` without scheduling it. -- 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]
