msg="Error exhausting result iterator" error="context canceled"

I have a simple downsampling task, copied just about verbatim from the example documentation. For several of the measurements, this works well, but for “disk” and “net”, this code results in an error

... msg="Error exhausting result iterator" error="context canceled"...

Flailing, wildly, I tried adding a |> fill(usePrevious: true) before the aggregateWindow statement, as that seemed to have helped someone else downsampling with a similar problem, but to no avail. There is about 3 days of data collected in the bucket, with data from [[inputs.system]] only. I have a hard time imagining I am exhausting any resources doing this, does anyone have any clues as to what is going on?

option task = {name: "cq-disk-data-1w", every: 1w, offset: 6h}

data = from(bucket: "bucket")
    |> range(start: -duration(v: int(v: task.every) * 2), stop: -5m)
    |> filter(fn: (r) => r["_measurement"] == "disk")

    |> aggregateWindow(fn: mean, every: 1m)
    |> to(bucket: "ds-bucket", org: "myorg")