Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8329013: StackOverflowError when starting Apache Tomcat with signed jar #2429

Closed
wants to merge 2 commits into from

Conversation

amosshi
Copy link
Contributor

@amosshi amosshi commented Apr 26, 2024

Backport of JDK-8329013

  • In this PR we added the src/java.base/share/classes/jdk/internal/misc/ThreadTracker.java file, needed by this PR
  • The ThreadTracker.java class was added by openjdk/jdk@9583e36 , which is pretty big for Virtual Threads (JDK-8284161) and we have no intention to back this change to Java 17 right now
  • So here we simply copy the current code of ThreadTracker.java to jdk17u-dev

Testing

  • Local: Test passed
    • RecursiveEventHelper.java: Test results: passed: 1
  • Pipeline: All checks have passed
  • Testing Machine: SAP nightlies passed on 2024-04-27
    • Automated jtreg test: jtreg_jdk_tier2
    • jdk/security/logging/RecursiveEventHelper.java: SUCCESSFUL GitHub 📊⏲ - [543 msec]

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8329013 needs maintainer approval

Issue

  • JDK-8329013: StackOverflowError when starting Apache Tomcat with signed jar (Bug - P4 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/2429/head:pull/2429
$ git checkout pull/2429

Update a local copy of the PR:
$ git checkout pull/2429
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/2429/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2429

View PR using the GUI difftool:
$ git pr show -t 2429

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/2429.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 26, 2024

👋 Welcome back ashi! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Apr 26, 2024

@amosshi This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8329013: StackOverflowError when starting Apache Tomcat with signed jar

Reviewed-by: mdoerr

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 3 new commits pushed to the master branch:

  • 54e0120: 8301753: AppendFile/WriteFile has differences between make 3.81 and 4+
  • 3f5e536: 8305931: jdk/jfr/jcmd/TestJcmdDumpPathToGCRoots.java failed with "Expected chains but found none"
  • bcc83cd: 8328166: Epsilon: 'EpsilonHeap::allocate_work' misuses the parameter 'size' as size in bytes

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title Backport 925d82931c09dc11ea5a3bc410ea5cfd67ee14aa 8329013: StackOverflowError when starting Apache Tomcat with signed jar Apr 26, 2024
@openjdk
Copy link

openjdk bot commented Apr 26, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Apr 26, 2024
@mlbridge
Copy link

mlbridge bot commented Apr 26, 2024

Webrevs

@@ -42,7 +42,7 @@ public class ThreadTracker {
private record ThreadRef(Thread thread) {
@Override
public int hashCode() {
return Long.hashCode(thread.threadId());
return Long.hashCode(thread.getId());
}
Copy link
Contributor Author

@amosshi amosshi Apr 26, 2024

Choose a reason for hiding this comment

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

Fix compile error on jdk17u-dev

    @Deprecated(since="19")
    public long getId() {
        return threadId();
    }

    public final long threadId() {
        return tid;
    }

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Choose a reason for hiding this comment

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

Ok, you have taken ThreadTracker.java from upstream which makes sense. LGTM.

@openjdk
Copy link

openjdk bot commented Apr 26, 2024

⚠️ @amosshi This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@amosshi
Copy link
Contributor Author

amosshi commented Apr 28, 2024

/approval request "Backporting for parity with 17.0.12-oracle. Un-Clean backport. SAP nightlies passed on 2024-04-27”

@openjdk
Copy link

openjdk bot commented Apr 28, 2024

@amosshi
8329013: The approval request has been created successfully.

@openjdk openjdk bot added approval ready Pull request is ready to be integrated and removed approval labels Apr 28, 2024
@amosshi
Copy link
Contributor Author

amosshi commented Apr 28, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Apr 28, 2024

Going to push as commit 52d1f0c.
Since your change was applied there have been 7 commits pushed to the master branch:

  • 9682314: 8318809: java/util/concurrent/ConcurrentLinkedQueue/WhiteBox.java shows intermittent failures on linux ppc64le and aarch64
  • 71630eb: 8327989: java/net/httpclient/ManyRequest.java should not use "localhost" in URIs
  • e51f176: 8324733: [macos14] Problem list tests which fail due to macOS bug described in JDK-8322653
  • 9b2f521: 8159927: Add a test to verify JMOD files created in the images do not have debug symbols
  • 54e0120: 8301753: AppendFile/WriteFile has differences between make 3.81 and 4+
  • 3f5e536: 8305931: jdk/jfr/jcmd/TestJcmdDumpPathToGCRoots.java failed with "Expected chains but found none"
  • bcc83cd: 8328166: Epsilon: 'EpsilonHeap::allocate_work' misuses the parameter 'size' as size in bytes

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 28, 2024
@openjdk openjdk bot closed this Apr 28, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 28, 2024
@openjdk
Copy link

openjdk bot commented Apr 28, 2024

@amosshi Pushed as commit 52d1f0c.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@amosshi amosshi deleted the backport-8329013 branch April 28, 2024 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants