GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — common: initialize SystemTicker at runtime in native images by Asthenia0412 · Pull Request #17677 · netty/netty

Conversation

@Asthenia0412

@Asthenia0412 Asthenia0412 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #17655

Motivation

SystemTicker captures System.nanoTime() in a static field. If GraalVM initializes the class while building a native image, running that image after a reboot can produce a negative ticker value and cause scheduled timeouts to fire immediately.

Changes

Add SystemTicker to Netty common's native-image runtime initialization list and add a regression test that checks the configuration entry.

Verification

The focused Maven test and the common reactor validation passed. A GraalVM native-image build was not run because native-image is not installed in this environment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Asthenia0412
common: initialize SystemTicker at runtime in native images
2c957f5
Fixes netty#17655

Signed-off-by: Stochastic <[email protected]>
@normanmaurer
normanmaurer requested review from franz1981, violetagg and yawkat September 30, 2026 13:24
violetagg
violetagg approved these changes Sep 30, 2026
View reviewed changes
@normanmaurer

normanmaurer commented Oct 1, 2026

Copy link
Copy Markdown
Member

@Asthenia0412 did you sign our icla yet ? https://netty.io/s/icla

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@testlens-app

testlens-app Bot commented Oct 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

🚨 All tests passed but jobs failed 🚨

Failed Jobs without Test Failures

❌ Auto-port to 4.1 / Auto-porting to 4.1

🏷️ Commit: 2c957f5
▶️ Tests: 455193 executed
🟡 Checks: 31/32 completed

Rerun Controls

Click the checkbox to trigger a rerun:

☑️ Rerun jobs


Learn more about TestLens at testlens.app/docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer normanmaurer added this to the 4.2.19.Final milestone Oct 2, 2026
@normanmaurer normanmaurer added needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. labels Oct 2, 2026
@normanmaurer
normanmaurer merged commit 658b570 into netty:4.2 Oct 2, 2026
29 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@netty-project-bot

netty-project-bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Could not create auto-port PR.
Got conflicts when cherry-picking onto 4.1.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@netty-project-bot

netty-project-bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #17731

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@netty-project-bot netty-project-bot mentioned this pull request Oct 2, 2026
Auto-port 5.0: common: initialize SystemTicker at runtime in native images #17731
Merged
@github-actions github-actions Bot removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Oct 2, 2026
@normanmaurer normanmaurer removed the needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. label Oct 2, 2026
@normanmaurer

normanmaurer commented Oct 2, 2026

Copy link
Copy Markdown
Member

Doesn't exists in 4.1 so no port needed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

normanmaurer added a commit that referenced this pull request Oct 24, 2026
@netty-project-bot @Asthenia0412 @normanmaurer
Auto-port 5.0: common: initialize SystemTicker at runtime in native i…
4385934
…mages (#17731)

Auto-port of #17677 to 5.0
Cherry-picked commit: 658b570

---
Fixes #17655

## Motivation

`SystemTicker` captures `System.nanoTime()` in a static field. If
GraalVM initializes the class while building a native image, running
that image after a reboot can produce a negative ticker value and cause
scheduled timeouts to fire immediately.

## Changes

Add `SystemTicker` to Netty common's native-image runtime initialization
list and add a regression test that checks the configuration entry.

## Verification

The focused Maven test and the `common` reactor validation passed. A
GraalVM native-image build was not run because `native-image` is not
installed in this environment.

---------

Signed-off-by: Stochastic <[email protected]>
Co-authored-by: Stochastic <[email protected]>
Co-authored-by: Norman Maurer <[email protected]>
This was referenced Oct 26, 2026
native-image で Netty の SystemTicker を実行時に初期化する matsudamper/KMP-ActivityPub#83
Merged
Netty の SystemTicker 実行時初期化の回避策を外せるか定期的に確認する matsudamper/KMP-ActivityPub#84
Open
Netty の SystemTicker 実行時初期化の回避策を外せるか定期的に確認する matsudamper/kake-bo#1125
Open
native-image で Netty の SystemTicker を実行時初期化にする matsudamper/kake-bo#1126
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@violetagg violetagg violetagg approved these changes
@yawkat yawkat Awaiting requested review from yawkat
@franz1981 franz1981 Awaiting requested review from franz1981

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.2.19.Final

Development

Successfully merging this pull request may close these issues.

netty-common 4.2: SystemTicker.START_TIME missing from --initialize-at-run-time (native-image regression of #9928)

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@Asthenia0412 @normanmaurer @netty-project-bot @violetagg
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.