chenBright commented on issue #2983:
URL: https://github.com/apache/brpc/issues/2983#issuecomment-3394061697

   I think there is an ABA problem here. The timeline of this bug is:
   t1: The first time as traced is false so **other sched_to A** and 
g->_control->_task_tracer.set_status(TASK_STATUS_JUMPING, cur_meta) succeeds. 
   t2: The tracer starts to trace bthread A (which is in TASK_STATUS_JUMPING) 
and set A->traced to true.
   t3: A is sched_to other and 
g->_control->_task_tracer.set_status(TASK_STATUS_JUMPING, next_meta) blocks at 
WaitForTracing.
   t4: The tracer  blocks at WaitForJumping.
   
   > The easy workaround is not to support the tracing of bthread in 
TASK_STATUS_JUMPING status and just return an error msg like below, instead of 
waiting for jumping. 
   
   I think so too, this can simplify the jumping design here.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to