Skip to content

Crash in sizeBelowThreshold #675

Closed
@wenyue

Description

@wenyue

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.

Metadata

Metadata

Assignees

Labels

need/analysisNeeds further analysis before proceedingneed/triageNeeds initial labeling and prioritization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions