astitcher commented on PR #421: URL: https://github.com/apache/qpid-proton/pull/421#issuecomment-1981610822
There is a clear thread safety violation in ```run_timer_jobs`` use of ```is_active_``` without using the appropriate lock - in fact this is so obvious that I'm puzzled we haven't seen it in the TSAN or even static analyzer runs - maybe we just missed it! Unfortunately this fix has changed the previous semantics of task cancellation: An important way to cancel a task is from a previous task callback. However this change makes that unreliable as it only checks for task cancellation before executing the entire batch of tasks that are runable at the point where ```run_timer_jobs``` is called. So if an earlier task in the batch cancels a later task in the batch then that cancellation would not be honored. I'm looking at a fix that should work correctly now and I'll post it here when I'm done. -- 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: dev-unsubscr...@qpid.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org