You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
changed the title [-]🐞 Setting `--oci-max-parallelism 2` can cause deadlocks[/-][+]🐞 Setting `--oci-max-parallelism 2` causes deadlocks[/+]on Mar 16, 2024
I think this is expected - suppose the following module structure:
Module A starts (running a container)
Module A calls a function in Module B
Module B start (running a container)
Module B calls dag.Container() (running a container)
This hangs forever! There are already 2 containers running in parallel, so no more can be scheduled.
I think with modules, this effectively means that max-parallelism is pretty much just completely broken - it just fits very badly with the idea of nested containers.
Not sure what the right fix is here:
Don't use max-parallelism (generally, my preference, you should enforce max usage using different mechanisms instead, since a single job-step could use anywhere from 0% to 100% of available resources - they're not just replaceable)
When using a nested step, don't have this "consume a resource" (this prevents deadlocks, but isn't great, since there's now more containers running than the user asked for)
I don't think there's a clear way forwards here, but to me this kind of highlights that we need a better way of constraining resources - max-parallelism is just really not fit for the shape that pipelines tend to take these days. Maybe we should provide some cgroup config options instead (if the end desire is to constrain CPU usage/etc).
Bleh, shifting this one out of the milestone - I think we've got some rough consensus to take option 2 in #6894 (comment), which is actually a backwards compatible change, so we can work on this at another point.
Activity
[-]🐞 Setting `--oci-max-parallelism 2` can cause deadlocks[/-][+]🐞 Setting `--oci-max-parallelism 2` causes deadlocks[/+]Scalahansolo commentedon Mar 28, 2024
The team over here at Motion have seen this happen to us as well on 0.10.3
jedevc commentedon Mar 28, 2024
I think this is expected - suppose the following module structure:
dag.Container()(running a container)I think with modules, this effectively means that
max-parallelismis pretty much just completely broken - it just fits very badly with the idea of nested containers.Not sure what the right fix is here:
max-parallelism(generally, my preference, you should enforce max usage using different mechanisms instead, since a single job-step could use anywhere from 0% to 100% of available resources - they're not just replaceable)I don't think there's a clear way forwards here, but to me this kind of highlights that we need a better way of constraining resources -
max-parallelismis just really not fit for the shape that pipelines tend to take these days. Maybe we should provide some cgroup config options instead (if the end desire is to constrain CPU usage/etc).jedevc commentedon May 15, 2024
Adding this to the v0.12.0 milestone since by that release we should probably either:
As is, with modules, this flag can cause huge performance issues, so should be avoided.
jedevc commentedon May 16, 2024
x-linking to #6465 as well.
helm: Allow disabling --oci-max-parallelism num-cpu (#7596)
jedevc commentedon Jul 11, 2024
Bleh, shifting this one out of the milestone - I think we've got some rough consensus to take option 2 in #6894 (comment), which is actually a backwards compatible change, so we can work on this at another point.