Skip to content

[fix] make the Windows native collector start, and smoke test the packages in CI - #4379

Merged
Aias00 merged 3 commits into
apache:masterfrom
Duansg:fix-native-collector
Sep 13, 2026
Merged

[fix] make the Windows native collector start, and smoke test the packages in CI#4379
Aias00 merged 3 commits into
apache:masterfrom
Duansg:fix-native-collector

Conversation

@Duansg

@Duansg Duansg commented Sep 12, 2026

Copy link
Copy Markdown
Member

Problem

The windows-amd64 native collector still fails to start after #4375, in two separate places. Linux and macOS are unaffected — same commit, same build args.

NotCompliantMBeanException: com.sun.management.ThreadMXBean ... ServiceConfigurationError: RedisCommonCollectImpl could not be instantiated → NullPointerException at sun.net.dns.ResolverConfigurationImpl.stringToList

Cause 1 — the JMX option does nothing on Windows

#4375 relied on --enable-monitoring=jmxclient, a no-op there (oracle/graal#9563). Strings in the CI Windows binary vs a macOS build of commit 3089f72:

marker Windows macOS
JMXConnectorFactory 0 8
getLockedMonitors 0 1

Fix: register ThreadInfo, LockInfo, MonitorInfo, StackTraceElement, MemoryUsage and GcInfo in reachability-metadata.json; drop the option.

Cause 2 — netty's DNS resolver is unavailable on Windows

DefaultClientResources holds netty's DNS address resolver group in a static field that cannot initialize in a native image on Windows (oracle/graal#11280, #4304). Using builder() does not avoid it — the failure is in the class initializer. Every collector is constructed eagerly by the ServiceLoader, so this killed the whole process.

Fix: create the resources lazily through a holder class. Redis monitoring from a Windows native collector still will not work (needs a GraalVM fix), but the failure is now scoped to Redis at collect time.

CI smoke test

All four startup bugs found so far shipped as green builds, because the workflow builds the packages but never runs them. Each package is now started before upload and must register its collect strategies and still be alive ten seconds later. Requiring Started Collector alone would not be enough — the MXBean crash happened right after that line.

Verification

  • macos-arm64 built from this branch: starts, 37 collect strategies registered including redis, online, heartbeats OK
  • windows-amd64 not verified yet — please run collector-native-build.yml on this branch
  • the smoke test step itself has not executed yet; this PR's own CI run is its first trial

@Aias00
Aias00 merged commit a85bd46 into apache:master Sep 13, 2026
5 checks passed
@Duansg
Duansg deleted the fix-native-collector branch September 13, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants