Skip to content

StackOverflowError when using Role-Based Strategy plugin on Jenkins 2.568.1 with Java 21 #767

Description

@lunxian8

Jenkins and plugins versions report

Jenkins version: 2.568.1

Java version: 21.0.7

Role-Based Strategy plugin version: 898.vc050ed2424ca

Servlet container: Jetty 12.1.8

Installation type: Jenkins WAR running on Jetty

What Operating System are you using (both controller, and any agents involved in the problem)?

After switching Jenkins authorization strategy to "Role-Based Strategy", Jenkins starts successfully and login works normally.

However, when opening administration pages (for example Manage Jenkins), Jenkins returns an internal error.

If I switch authorization strategy to "Logged-in users can do anything", everything works correctly:

  • Manage Jenkins page loads normally
  • Save buttons appear
  • No backend errors occur

The problem only happens when using Role-Based Strategy.

Reproduction steps

java.lang.StackOverflowError

The error happens when accessing Jenkins administration pages after enabling Role-Based Strategy.

Relevant stack trace:

java.lang.StackOverflowError
at org.codehaus.groovy.antlr.parser.GroovyRecognizer
at org.kohsuke.stapler.jelly.groovy.GroovyClassLoaderTearOff.parseScript
at org.kohsuke.stapler.MetaClass.buildDispatchers

Jenkins startup is successful, but the page rendering fails.

Expected Results

Ubuntu Linux x86_64

Actual Results

  1. Install Jenkins 2.568.1.

  2. Install Role-Based Strategy plugin version 898.vc050ed2424ca.

  3. Enable Role-Based Strategy:
    Manage Jenkins -> Security -> Authorization -> Role-Based Strategy

  4. Restart Jenkins.

  5. Login as administrator.

  6. Open Manage Jenkins page.

Result:
The page throws StackOverflowError.

Anything else?

Manage Jenkins and other administration pages should load normally when Role-Based Strategy is enabled.

Users with correct permissions should be able to access and save configuration pages.

Are you interested in contributing a fix?

The administration page fails with an internal error.

The backend throws java.lang.StackOverflowError.

The UI cannot render correctly and some buttons such as Save are missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions