Skip to content

Backport macOS CI fixes to 3.27.x - #6364

Merged
larsewi merged 2 commits into
3.27.xfrom
pr-backport-macos-ci-fixes-3.27
Sep 24, 2026
Merged

larsewi merged 2 commits into
3.27.xfrom
pr-backport-macos-ci-fixes-3.27

Conversation

@claude

@claude claude Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Requested by Ole Herman · Slack thread

The macos-26 unit-test job fails on 3.27.x-based PRs because Homebrew now ships LMDB >= 1.0.0, and 3.27.x still has the old assert(mdb_env_get_maxkeysize(env) == 511) in libpromises/dbm_lmdb.c, which aborts under LMDB 1.x. Master fixed this in 0e31cc1. This backport unblocks green CI on nova PR https://github.com/cfengine/nova/pull/2710 (backport of the memory-safety fixes), whose macos-26 unit-test job builds core at the PR's base branch.

Cherry-picked commits (with -x):

  • 0e31cc1 — Fixed lmdb maxkeysize assertion for macos
  • aae13c5 — Fixed flakey macos processes tests

🤖 Generated with Claude Code

https://claude.ai/code/session_01GRomi2LQjL5yBJjado36eg

Changelog: title
Signed-off-by: Victor Moene <victor.moene@northern.tech>

As of LMDB 1.0.0, MDB_MAXKEYSIZE defaults to 0 (computed from the page size) instead of the fixed compile-time 511 used by LMDB <1.0.0, and mdb_env_get_maxkeysize() only returns the correct value once the environment has actually been opened (env->me_maxkey is populated by mdb_env_open()). So this can only be checked after a successful open, not beforehand like it could with older LMDB versions.

The assertion breaks on macos because the environement there uses a newer lmdb package.

(cherry picked from commit 0e31cc1)
Ticket: ENT-14471
Signed-off-by: Victor Moene <victor.moene@northern.tech>
Changelog: Fixed macOS process start-time/state detection (process_macos.c) and the macOS ps syntax bug in mon_processes_test.c
(cherry picked from commit aae13c5)
@claude

claude Bot commented Sep 23, 2026

Copy link
Copy Markdown
Author

Note for reviewers: the first commit here (cherry-pick of 0e31cc1, "Fixed lmdb maxkeysize assertion for macos") is also carried by #6363 (as 6ed5868). Whichever PR merges second can drop its copy — both are identical -x cherry-picks of the same master commit, so merge order doesn't matter otherwise.


Generated by Claude Code

@larsewi
larsewi merged commit 2a8171d into 3.27.x Sep 24, 2026
9 checks passed
@larsewi
larsewi deleted the pr-backport-macos-ci-fixes-3.27 branch September 24, 2026 07:33
@larsewi

larsewi commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@claude please backport to 3.24.x also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants