Skip to content
  • Charles Jacobsen's avatar
    pmfs: mount: Fixed heap exhaustion due to too many stacks. · 30b2f271
    Charles Jacobsen authored and Vikram Narayanan's avatar Vikram Narayanan committed
    You have to be careful where you put your asyncs, especially
    with poll recv. If you wrap the call to poll recv in an async,
    you will consume lots of memory. I moved the async so it surrounds
    the dispatch function only.
    
    In the process, to debug, I updated libasync with THCDumpAllStacks
    (I was trying to see what all the stacks were - they were all coming
    from poll recv).
    
    NOTE: While debugging, I tweaked the microkernel dump stack code
    to work for THCDumpAllStacks (continue walking until we hit a
    frame or return address). If you don't make this change,
    THCDumpAllStacks will not crash, but it won't be informative either
    (the stack walk will stop too soon).
    
    I'm able to run at least 100 iterations now of mount/unmount without
    any problems.
    30b2f271