Closed
Description
I found a bug that can cause a crash. In the directory sizeBelowThreshold function, we call the EnumLinksAsync function, then call parallelShardWalk, and the sizeBelowThreshold function may be end if we have already fetched enough shards to assert we are above the threshold. At this time, parallelShardWalk may still running the nextShard.walkChildren.
Next, because sizeBelowThreshold has been completed, we can continue to modify direcotry. At this time, walkChildren will cause a crash because the hamt ds.childer has been modified.
An example is:
Call direcotry.unlink(), and then immediately call direcotry.addChild(). If run many times, it may trigger a crash.