-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delay marking of finished tasks #48037
base: master
Are you sure you want to change the base?
Conversation
So it turns the fields of the tasks into a kind of weak reference? |
c2c7778
to
8fc4724
Compare
Not quite, it turns the |
8fc4724
to
0809b18
Compare
@nanosoldier |
The problem is that the tests are very indirect. The issue is that
Would have worked in my previous attempt, but does not test the issue at hand since |
Your package evaluation job has completed - possible new issues were detected. |
0809b18
to
09e1a92
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems possibly not quite sound yet, since one deferred-marked task might refer to another task, making it so you cannot sweep and mark at the same time
@vtjnash: If the two tasks you mention here are both non-runnable, meaning that they are only referenced through what we now consider a weak-reference, doesn't it not matter if one references the other? They can both be collected now since the only reference to them is weak? I'm also not following what you mean by "sweep and mark at the same time" - is that specific to the implementation details in the PR? I didn't read it closely yet. |
This wouldn't work due to weakref behavior (bug ?). If you get value from a weakref, it keeps it.
|
I currently don't have the availability to continue work on this. |
Alternative proposal to #47829 intending to fix #40626
The idea is to skip non-runnable tasks during the inital
roots gathering phase. If someone has a reference to a finished
task we won't mess with the task fields.
After we are done with the primary marking phase, we check the
finished tasks and if they have not yet been marked we
set some of the fields we care about to nothing and then
enqueue the other fields.
I briefly thought about not enqueueing the other fields,
but thats much more invasive.
@JeffBezanson One field I would like to zero is the current
stkbuf, but that might be one we actually have to use?