As far as I can understand, we don’t have anything in our codebase that would explain a call chain this long. Is there anything around Ray Serve that would explain this?
It seems likely that the depth field in Ray task logs represents the call stack depth, incremented each time a task or actor submits another task/actor, starting from the driver at depth 0. A very high depth (e.g., 660,407) is unusual and typically indicates deeply nested or recursive task/actor submissions, but Ray Serve itself does not inherently create such deep chains unless your application logic does so (e.g., deployments calling each other in a loop or recursion) [common.proto, see int64 depth = 27;][task_spec.cc, see stream << ", depth=" << GetDepth()].
My understanding is that unless your code or a library you use is recursively submitting tasks/actors, this depth should not grow so large. There is no documentation or Ray Serve mechanism that would automatically cause such high depth values. Would you like a step-by-step breakdown of how depth is tracked or suggestions for debugging where this might be happening in your code?