Skip to content

Interrupted package set upgrades can leave partial compiler output and block further updates #808

Closed

Description

@thomashoneyman

I noticed today that package set updates are failing each day, saying that the baseline package set doesn't compile:
https://www.purescript.org/registry-dev/#/jobs/bc3b5361-ee24-4328-a72e-64848fcec3af

That job is trying to update node-sqlite and puregrain but fails without applying either change, which is weird because the baseline is package set 81.5.0 and of course any released package set must have succeeded. That package set pins web-html@4.1.1, yet in this job the compiler reports errors in web-html@4.1.2/src/Web/HTML/History.purs:

Unknown module Web.HTML.ScrollRestoration

Poking around I realized that an earlier upgrade was interrupted by an OOM kill (still not sure why), and left this inconsistent state:

  • The installed package sources are web-html@4.1.1.
  • The compiler cache records the installed 4.1.1 source hashes.
  • history's compiled externs and JavaScript are from 4.1.2 and still reference ScrollRestoration.

The root cause here is that on October 13, an upgrade installed web-html@4.1.2 and began compilation before the kernel killed the compiler. After restarting, the server deleted the leftover output-backup directory and synchronized installed packages back to the baseline, but it retained the partially updated compiler output. That means our recovery isn't totally clean.

I don't yet know why the OOM kill happened and if it will happen again. I only found evidence of this single occurrence. Regardless, recovery should not keep around partially-updated compiler output.

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