Skip to content

Conversation

udesou
Copy link
Contributor

@udesou udesou commented Aug 20, 2025

This PR aims to fix multithreaded tests as noted in #179.
To fix the issue, we needed to:

  • Capture all tasks in the shadow stack of other tasks;
  • Scan/conservatively process scopes and references in __jmpbuf in task.eh.

@udesou udesou changed the base branch from master to mmtk-support-moving-upstream August 20, 2025 00:14
@udesou udesou force-pushed the fix/fix-multithreaded-tests branch 2 times, most recently from 7b6378d to bbbd583 Compare August 20, 2025 00:15
@udesou udesou force-pushed the fix/fix-multithreaded-tests branch from dce04bf to 8e6b075 Compare August 22, 2025 01:45
@udesou udesou force-pushed the fix/fix-multithreaded-tests branch from 664f418 to b006bf1 Compare August 22, 2025 08:37
@udesou udesou marked this pull request as ready for review August 22, 2025 21:11
@udesou udesou changed the title WIP: trying to fix multithreaded tests Fixing multithreaded tests Aug 24, 2025
@udesou udesou requested a review from qinsoon August 24, 2025 23:49
Copy link
Member

@qinsoon qinsoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some reviews. However, before addressing any of them, I think we should make sure what we do in the PR is reasonable and sound. In particular, there are two questions:

  1. Why are there tasks that appear in the shadow stack but do not appear in live_tasks?
  2. For prev in jl_handler_t, why can't we follow it until we see a null pointer?

@qinsoon
Copy link
Member

qinsoon commented Aug 25, 2025

I saw the discussion on Slack.

Why are there tasks that appear in the shadow stack but do not appear in live_tasks?

live_tasks means tasks that are running. If a task is not scheduled, it won't appear in the live_tasks. This sounds reasonable. We probably want keep an eye on this in terms of performance. What we are doing now is possibly expensive, and we may want to maintain a list of all the tasks in the runtime.

For prev in jl_handler_t, why can't we follow it until we see a null pointer?

Though you asked, this question was not answered.

@udesou
Copy link
Contributor Author

udesou commented Aug 28, 2025

julia-version
JULIA_REPO=udesou/julia
JULIA_REF=fix/capture-all-tasks

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.

2 participants