Skip to content

Fix configure unknown --enable-foo detection bug caused by recursive configure - #5462

Merged
graydon merged 1 commit into
stellar:masterfrom
graydon:config-args-redux
Sep 21, 2026
Merged

graydon merged 1 commit into
stellar:masterfrom
graydon:config-args-redux

Conversation

@graydon

@graydon graydon commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

In PR #5395 I modified configure to notice and complain if you pass an unknown --enable-foo command.

Unfortunately this revealed a quirk in the way our configure.ac was already working that was previously being ignored, that breaks the build: configure modified its own ac_configure_args when invoking gperftools sub-configure (recursively) to contain flags known to gperftools configure, but not the outer configure. This modified ac_configure_args then got written into the config.status file that re-runs configure automatically when autotools files change, re-invoking the top-level configure with the arguments for gperftools configure. Before #5395 that was fine, they were silently ignored. But after they cause the self-auto-reconfiguration steps of already-configured builds to break.

The symptom is that you type make in an already-configured build, and you get a complaint about some unknown weird --enable-foo commands you never even passed to configure. Not great!

The "fix" for this (if you can stand to call it that) is to only update ac_configure_args after config.status has been emitted, but before we start launching recursive sub-configures. Disgusting. I feel ashamed even posting this, but here we are.

Copilot AI balanced review requested due to automatic review settings September 18, 2026 07:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused change correctly preserves recursive options without polluting top-level reconfiguration.

Pull request overview

Prevents automatic top-level reconfiguration from receiving gperftools-only options.

Changes:

  • Stores gperftools options separately.
  • Appends them only after config.status captures top-level arguments.
File summaries
File Description
configure.ac Separates recursive gperftools options from recheck arguments.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@graydon
graydon added this pull request to the merge queue Sep 21, 2026
Merged via the queue into stellar:master with commit 9813166 Sep 21, 2026
76 of 78 checks passed
@graydon
graydon deleted the config-args-redux branch September 21, 2026 18:40
graydon added a commit to graydon/stellar-core that referenced this pull request Oct 8, 2026
@graydon graydon mentioned this pull request Oct 8, 2026
graydon added a commit to graydon/stellar-core that referenced this pull request Oct 10, 2026
dappcupsoap pushed a commit to dappcupsoap/stellar-core that referenced this pull request Oct 13, 2026
We've had a flaky overlay test breaking CI runs for a while now (most
recently
https://github.com/stellar/stellar-core/actions/runs/37384282444/job/112013606376?pr=5479
in stellar#5479). The root cause is
a test helper that's used in a bunch of places that tries to bypass
outbound flow control -- basically to emulate a misbehaving peer sending
stuff they shouldn't send -- but doesn't necessarily maintain invariants
expected by the flow control subsystem. As a result, one recently-added
test has a nondeterministic/racy break of one of the invariants, so the
test aborts with an assert failure from time to time.

This change renames the test helper method to clarify what it's supposed
to be doing, and then modifies what it _does_ to explicitly mark (in
test-only code) outgoing messages that are supposed to bypass flow
control and then .. just bypasses the flow control including the
book-keeping code that has invariants to maintain.

At least, this is what sol-and-I discussed and implemented. I am
_fairly_ convinced it's correct. It also does seem to get rid of the
failure (I ran the test in a loop, crashes before, no more crashes
after). But I wouldn't mind careful and conceptual review!

I also included here a new, different workaround for the bug I tried but
failed to fix in stellar#5462 -- config.status getting stuck reconfiguring with
unknown arguments accidentally promoted from gperftools. The previous
fix didn't work, but hopefully this one does!

I **also** included a fix for **another** flaky test, "ledger state
update flow with parallel apply", which has been periodically failing
with a simulation timeout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants