Skip to content

Bugfix: TaskTracer deadlocks due to ABA problem#3115

Merged
chenBright merged 1 commit into
apache:masterfrom
chenBright:fix_tracer_aba
Oct 14, 2025
Merged

Bugfix: TaskTracer deadlocks due to ABA problem#3115
chenBright merged 1 commit into
apache:masterfrom
chenBright:fix_tracer_aba

Conversation

@chenBright

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number:

Problem Summary:
#2983 (comment)
#2983 (comment)

What is changed and the side effects?

Changed:

  1. 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.
  2. Taskmeta has its lock for waiting for tracing, to avoid starvation of bthread jumping caused by new tracing.
  3. WaitForTracing acquire the lock, indicating that tracing is complete, so no condition variable is needed.

Side effects:

  • Performance effects:

  • Breaking backward compatibility:


Check List:

@chenBright

chenBright commented Oct 12, 2025

Copy link
Copy Markdown
Contributor Author

CC @ZhengweiZhu @wwbmmm

@wwbmmm

wwbmmm commented Oct 13, 2025

Copy link
Copy Markdown
Contributor

LGTM

1 similar comment
@ZhengweiZhu

Copy link
Copy Markdown
Contributor

LGTM

@ZhengweiZhu

Copy link
Copy Markdown
Contributor

I have an irrelevant doubt. The cur_ending parameter seems not used?
static void sched_to(TaskGroup** pg, TaskMeta* next_meta, bool cur_ending);

@chenBright

Copy link
Copy Markdown
Contributor Author

I have an irrelevant doubt. The cur_ending parameter seems not used? static void sched_to(TaskGroup** pg, TaskMeta* next_meta, bool cur_ending);

cur_ending was used before, but is no longer used. You can delete it.

@chenBright chenBright merged commit 0708333 into apache:master Oct 14, 2025
16 checks passed
@chenBright chenBright deleted the fix_tracer_aba branch October 14, 2025 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants