Skip to content

Investigate flaky test caused by ignore lastWork on selecting mining candidate  #12704

@masih

Description

@masih

I think this may have introduced a shutdown race that's caused at least one flaky test in CI: https://github.com/filecoin-project/lotus/actions/runs/11851664737/job/33028560392#step:9:1189

failed to create block:
    github.com/filecoin-project/lotus/miner.(*Miner).mineOne
        /home/runner/work/lotus/lotus/miner/miner.go:634
  - failed to process messages from block template:
    github.com/filecoin-project/lotus/chain/consensus/filcns.(*FilecoinEC).CreateBlock
        /home/runner/work/lotus/lotus/chain/consensus/filcns/mine.go:32
  - building bls amt:
    github.com/filecoin-project/lotus/chain/consensus.CreateBlockHeader
        /home/runner/work/lotus/lotus/chain/consensus/common.go:411
  - badger blockstore closed

I can't come up with a theory about why that might be new with this change because I can imagine how it could happen with the older code (not checking m.stop in at least one more place).

Originally posted by @rvagg in #12690 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    📌 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions