#8749: Recursive dependency waiting in the job/worker mechanism can easily result in stack overflows -------------------------------------+---------------------------- Reporter: anevilyak | Owner: bonefish Type: bug | Status: new Priority: normal | Milestone: R1 Component: Applications/Debugger | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All -------------------------------------+---------------------------- Comment (by bonefish): As a first step it would be worthwhile to examine, if certain jobs make heavy use of the stack. If so, the code could be converted to heap allocations. Also, increasing the stack size for the worker threads would be possible, though only after decreasing the stack use. Obviously this is only an acceptable solution, if the amount of jobs we're talking about, is still manageable. The more consequent solution is to rewrite the jobs to wait asynchronously. I.e. `Do()` would have to return indicating that the job is waiting and needs to be re-called when the job it is waiting for is done. This requires a bit more overhead in the job implementations, since the ones that can wait would need to be stateful. -- Ticket URL: <http://dev.haiku-os.org/ticket/8749#comment:1> Haiku <http://dev.haiku-os.org> Haiku - the operating system.