fix(jetty): vendor patched upstream/etc/jetty.xml to silence 'Ignored arg' warning - #207
Merged
natechadwick merged 1 commit intoSep 8, 2026
Conversation
…arg warning
The bundled Jetty 9.4.58.v20250814 distribution's upstream/etc/jetty.xml
emits one WARN per startup:
WARN [org.eclipse.jetty.xml.XmlConfiguration] Ignored arg
<Arg name="threadpool"><Ref refid="threadPool"/></Arg>
in file:///.../upstream/etc/jetty.xml
Root cause: org.eclipse.jetty.server.Server in 9.4.58 has a single
ThreadPool-typed constructor parameter named 'pool' (not 'threadpool'),
and the compiled bytecode does not carry the MethodParameters attribute
(verified with `javap -p -v`). Jetty's XmlConfiguration matches <Arg
name="..."> to constructor parameters by name; with no parameter name
available at runtime, the arg is logged as ignored and the Server() no-arg
constructor is used instead, creating a default QueuedThreadPool.
The line is benign in the sense that startup succeeds and the server runs
the same QueuedThreadPool it would have anyway, but the WARN is noisy and
the root cause is real (the upstream file's name does not match the
constructor's parameter name in 9.4.58+).
This change vendors a patched copy of upstream/etc/jetty.xml at
system/Tools/jetty/upstream/etc/jetty.xml, with the offending <Arg> line
replaced by a comment block explaining the why and pointing back to this
issue. The antrun copy task in modules/perc-jetty/pom.xml (phase
process-resources, third sub-task) overlays system/Tools/jetty/ onto
${assembly-directory} after the upstream Jetty distribution is unpacked, so
the vendored file wins. The pattern matches the existing
system/Tools/jetty/upstream/lib/jetty-webapp-9.4.26.v20200117.jar
vendoring for the CMS-6724 fix.
Side finding (NOT changed in this fix): because the <Arg> was being
ignored, the threadpool Jetty module's custom-configured threadPool bean
(minThreads=10, maxThreads=200, idleTimeout=60000, ...) was not actually
bound to the Server. The Server is silently using a default
QueuedThreadPool (minThreads=8, maxThreads=200). If the threadpool
module's config should take effect, the right XML change is to drop the
name attribute (<Arg><Ref refid="threadPool"/></Arg>) so XmlConfiguration
matches by position. That's a deliberate behavior change and is tracked
as a follow-up opportunity in the issue body.
Refs #206
> Co-Authored by Mavis Mavis-Code using MiniMax-M3 with agent mavis.
natechadwick
approved these changes
Sep 8, 2026
natechadwick
deleted the
bugfix/206-suppress-jetty-threadpool-ignored-arg
branch
September 8, 2026 16:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Silences the
Ignored arg <Arg name="threadpool"><Ref refid="threadPool"/></Arg>WARN that the bundled Jetty 9.4.58.v20250814 distribution emits on every startup, by vendoring a patchedupstream/etc/jetty.xmlintosystem/Tools/jetty/upstream/etc/jetty.xml.Why
The line is in the file the upstream Jetty distribution itself ships — it's not something our security/hardening work added.
org.eclipse.jetty.server.Serverin 9.4.58 declares its onlyThreadPoolconstructor parameter aspool, notthreadpool, and the bytecode doesn't carryMethodParameters(verified withjavap -p -v). Jetty'sXmlConfigurationmatches<Arg name="...">to constructor parameters by name; with no parameter name available at runtime the arg is logged as ignored and theServer()no-arg constructor is used instead, creating a defaultQueuedThreadPool.The WARN is benign in the sense that startup succeeds and the server runs, but it's noisy and the root cause is real (the upstream file's
name="threadpool"does not match the constructor'spoolparameter in 9.4.58+).How
upstream/etc/jetty.xmlatsystem/Tools/jetty/upstream/etc/jetty.xmlwith the offending<Arg>replaced by a comment block explaining the why (so a future Jetty upgrade reader doesn't re-add it).copytask inmodules/perc-jetty/pom.xml(phaseprocess-resources, third sub-task) overlayssystem/Tools/jetty/onto${assembly-directory}after the upstream Jetty distribution is unpacked, so the vendored file wins. The pattern matches the existingsystem/Tools/jetty/upstream/lib/jetty-webapp-9.4.26.v20200117.jarvendoring for the CMS-6724 fix.Behavior
Ignored arg ...WARN is logged, theServer()no-arg constructor is used, a defaultQueuedThreadPoolis created (minThreads=8, maxThreads=200). ThethreadpoolJetty module'sthreadPoolbean is created but not bound to the Server.Server()no-arg constructor is used (same as before), a defaultQueuedThreadPoolis created (same as before).No runtime behavior change. The vendoring is purely cosmetic from a runtime standpoint; the substantive change is the documentation of why the line isn't there.
Side finding (separate, NOT in this PR)
The
threadpoolJetty module's custom-configuredthreadPoolbean (minThreads=10, maxThreads=200, idleTimeout=60000, detailedDump=false) is not currently bound to the Server — it was never being applied, even before this fix, because the upstream<Arg>was being ignored. If we want the module's config to actually take effect, the right XML change is to drop thenameattribute (<Arg><Ref refid="threadPool"/></Arg>) soXmlConfigurationmatches by position. That's a deliberate behavior change (minThreads goes from 8 to 10) and should be a separate, focused PR with its own verification.Verification
python3 -c "import xml.etree.ElementTree as ET; ET.parse('system/Tools/jetty/upstream/etc/jetty.xml')"→ well-formed.diffbetween vendored and upstream is only the one<Arg>line and its 17-line replacement comment.modules/perc-jettyand redeploy:grep "Ignored arg" jetty/base/logs/server.logreturns no matches. The startup log is otherwise unchanged.Refs #206