Skip to content
This repository was archived by the owner on Nov 19, 2026. It is now read-only.
This repository was archived by the owner on Nov 19, 2026. It is now read-only.

Broken loop condition in store.Shutdown #1429

Closed

Description

@mtrmac

In store.Shutdown, layers is initialized by

storage/store.go

Line 3192 in 67e9778

layers, err := rlstore.Layers()
, which creates copies of the layer objects:
layers[i] = *copyLayer(r.layers[i])
.

So, the contents of layers[] will not change by itself.

That means that after after

storage/store.go

Line 3197 in 67e9778

if layer.MountCount == 0 {
,

storage/store.go

Line 3202 in 67e9778

for layer.MountCount > 0 {
is equivalent to for true .

AFAICS that means

  • the loop will only terminate if the driver happens to react to to over-unmount by something matching os.IsNotExist(err)
  • even assuming the above, store.Shutdown will never call s graphDriver.Cleanup().

Activity

  1. linked a pull request that will close this issueIn-process exclusion of readers and writers #1346on Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions