Skip to content

8301306: java/net/httpclient/* fail with -Xcomp #12282

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

Closed
wants to merge 4 commits into from

Conversation

sunny868
Copy link
Contributor

@sunny868 sunny868 commented Jan 30, 2023

Hi all,
I think BackgroundCompilation should not be set to false when -Xcomp be used, which causes the java thread to block for longer, then causing the following tests failed frequently on the AArch64 and LoongArch64 architecture.

java/net/vthread/HttpALot.java (release -Xcomp)
java/net/httpclient/ByteArrayPublishers.java (fastdebug -Xcomp)
java/net/httpclient/ManyRequestsLegacy.java (fastdebug -Xcomp)
java/net/httpclient/HttpClientLocalAddrTest.java (fastdebug -Xcomp)
java/net/httpclient/SpecialHeadersTest.java (fastdebug -Xcomp)

This PR fix the issue, Please help review it.

Thanks.


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

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/12282/head:pull/12282
$ git checkout pull/12282

Update a local copy of the PR:
$ git checkout pull/12282
$ git pull https://git.openjdk.org/jdk pull/12282/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12282

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12282.diff

…ion: HTTP/1.1 header parser received no bytes
@bridgekeeper
Copy link

bridgekeeper bot commented Jan 30, 2023

👋 Welcome back sunny868! 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 openjdk bot added the rfr Pull request is ready for review label Jan 30, 2023
@openjdk
Copy link

openjdk bot commented Jan 30, 2023

@sunny868 The following label will be automatically applied to this pull request:

  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Jan 30, 2023
@mlbridge
Copy link

mlbridge bot commented Jan 30, 2023

Webrevs

@sunny868 sunny868 changed the title JDK-8301306: java/net/httpclient/* fail with -Xcomp: java.io.IOException: HTTP/1.1 header parser received no bytes 8301306: java/net/httpclient/* fail with -Xcomp: java.io.IOException: HTTP/1.1 header parser received no bytes Jan 30, 2023
@dcubed-ojdk
Copy link
Member

/label core-libs

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Jan 30, 2023
@openjdk
Copy link

openjdk bot commented Jan 30, 2023

@dcubed-ojdk
The core-libs label was successfully added.

Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Choose a reason for hiding this comment

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

This is not the right fix for this kind of problem.

@@ -1437,7 +1437,6 @@ void Arguments::set_mode_flags(Mode mode) {
break;
case _comp:
UseInterpreter = false;
BackgroundCompilation = false;
Copy link
Member

Choose a reason for hiding this comment

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

Disabling BackgroundCompilation when -Xcomp is specified is not the right
answer here. When -Xcomp is specified, -Xbatch needs to be turned off
and I believe that's what old L1440 is doing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Dan is right, you can't change the definition of -Xcomp.

But -Xbatch is -XX:-BackgroundCompilation. So the second Dan's statement is incorrect.

@dcubed-ojdk
Copy link
Member

/label add hotspot-compiler

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Jan 30, 2023
@openjdk
Copy link

openjdk bot commented Jan 30, 2023

@dcubed-ojdk
The hotspot-compiler label was successfully added.

@AlanBateman
Copy link
Contributor

There was some discussion about these test failures in the JBS issue and I think @sunny868 has accepted that they need to be investigated to see if they are test reliability issues or something else. As always, running tests with -Xcomp can often challenge timeouts and assumption of progress in tests.

@vnkozlov
Copy link
Contributor

There was some discussion about these test failures in the JBS issue and I think @sunny868 has accepted that they need to be investigated to see if they are test reliability issues or something else. As always, running tests with -Xcomp can often challenge timeouts and assumption of progress in tests.

Yes, -Xcomp can cause long time execution since it we compile all executed methods. But it should not affect execution unless Java code depends on time itself which it should not do.

@sunny868 sunny868 changed the title 8301306: java/net/httpclient/* fail with -Xcomp: java.io.IOException: HTTP/1.1 header parser received no bytes 8301306: java/net/httpclient/* fail with -Xcomp Feb 2, 2023
@openjdk openjdk bot changed the title 8301306: java/net/httpclient/* fail with -Xcomp 8301306: java/net/httpclient/* fail with -Xcomp: java.io.IOException: HTTP/1.1 header parser received no bytes Feb 2, 2023
@AlanBateman
Copy link
Contributor

/label add net
/label remove core-libs
/label remove hotspot-runtime
/label remove hotspot-compiler

@openjdk openjdk bot added the net net-dev@openjdk.org label Feb 2, 2023
@openjdk
Copy link

openjdk bot commented Feb 2, 2023

@AlanBateman
The net label was successfully added.

@openjdk openjdk bot removed the core-libs core-libs-dev@openjdk.org label Feb 2, 2023
@openjdk
Copy link

openjdk bot commented Feb 2, 2023

@AlanBateman
The core-libs label was successfully removed.

@openjdk openjdk bot removed the hotspot-runtime hotspot-runtime-dev@openjdk.org label Feb 2, 2023
@openjdk
Copy link

openjdk bot commented Feb 2, 2023

@AlanBateman
The hotspot-runtime label was successfully removed.

@openjdk openjdk bot removed the hotspot-compiler hotspot-compiler-dev@openjdk.org label Feb 2, 2023
@openjdk
Copy link

openjdk bot commented Feb 2, 2023

@AlanBateman
The hotspot-compiler label was successfully removed.

@@ -35,7 +35,7 @@
* @run main/othervm/timeout=600
* -Dsun.net.httpserver.nodelay=true
* -Dsun.net.client.defaultConnectTimeout=5000
* -Dsun.net.client.defaultReadTimeout=5000
* -Dsun.net.client.defaultReadTimeout=50000
Copy link
Contributor

Choose a reason for hiding this comment

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

For this one, it might be simpler to just drop the setting of the defaultReadTimeout.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll test it on my local machine later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@sunny868
Copy link
Contributor Author

sunny868 commented Feb 2, 2023

The following two tests have the same issue, can I submit the fix code to the same patch?
java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java and jdk/incubator/concurrent/StructuredTaskScope/StructuredTaskScopeTest.java

@AlanBateman
Copy link
Contributor

The following two tests have the same issue, can I submit the fix code to the same patch?
java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java and jdk/incubator/concurrent/StructuredTaskScope/StructuredTaskScopeTest.java

StructuredTaskScopeTest runs 46 tests, and runs them for both platform and virtual threads. Which test is failing? There is no information in the JBS issue on this.

Copy link
Member

@dfuch dfuch left a comment

Choose a reason for hiding this comment

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

The proposed changes look reasonable to me.

@sunny868 sunny868 closed this Feb 3, 2023
@sunny868 sunny868 reopened this Feb 3, 2023
@sunny868
Copy link
Contributor Author

sunny868 commented Feb 3, 2023

The following two tests have the same issue, can I submit the fix code to the same patch?
java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java and jdk/incubator/concurrent/StructuredTaskScope/StructuredTaskScopeTest.java

StructuredTaskScopeTest runs 46 tests, and runs them for both platform and virtual threads. Which test is failing? There is no information in the JBS issue on this.

test StructuredTaskScopeTest.testInterruptJoinUntil1(java.lang.ThreadBuilders$PlatformThreadFactory@6e8e0c75): failure
I had set up JDK-8301736 and JDK-8301737 to fix these two test cases.

@sunny868 sunny868 changed the title 8301306: java/net/httpclient/* fail with -Xcomp: java.io.IOException: HTTP/1.1 header parser received no bytes 8301306: java/net/httpclient/* fail with -Xcomp Feb 3, 2023
@sunny868
Copy link
Contributor Author

sunny868 commented Feb 3, 2023

RFR, thanks

Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

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

Thanks for the update and creating JBS issues/PRs for the -Xcomp vs. timeout issues in tests in other areas.

@openjdk
Copy link

openjdk bot commented Feb 3, 2023

⚠️ @sunny868 the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout 8301306
$ git commit --author='Preferred Full Name <you@example.com>' --allow-empty -m 'Update full name'
$ git push

@openjdk
Copy link

openjdk bot commented Feb 3, 2023

@sunny868 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:

8301306: java/net/httpclient/* fail with -Xcomp

Reviewed-by: dfuchs, alanb

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 101 new commits pushed to the master branch:

  • cf68d9f: 8299155: C2: SubTypeCheckNode::verify() should not produce dependencies / oop pool entries
  • 11804b2: 8301050: Detect Xen Virtualization on Linux aarch64
  • b504c94: 8300235: Use VarHandle access in Image(Input | Output)StreamImpl classes
  • 406021a: 8300929: Avoid unnecessary array fill after creation in java.awt.image
  • 7f313b0: 8180266: Convert sun/security/provider/KeyStore/DKSTest.sh to Java Jtreg Test
  • 3ad6aef: 8301313: RISC-V: C2: assert(false) failed: bad AD file due to missing match rule
  • 4c9de87: 8301655: Problemlist jdk/jdk/nio/zipfs/TestLocOffsetFromZip64EF.java on Linux
  • 04278e6: 8301564: Non-C-heap allocated ResourceHashtable keys and values must have trivial destructor
  • b00b70c: 8286907: keytool should warn about weak PBE algorithms
  • ee0f5b5: 8301392: Port fdlibm log1p to Java
  • ... and 91 more: https://git.openjdk.org/jdk/compare/64b25ea0b410542635b6d99a92ec290da47c85ce...master

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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dcubed-ojdk, @dfuch, @AlanBateman) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 3, 2023
@sunny868
Copy link
Contributor Author

sunny868 commented Feb 3, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Feb 3, 2023
@openjdk
Copy link

openjdk bot commented Feb 3, 2023

@sunny868
Your change (at version 215b5b7) is now ready to be sponsored by a Committer.

@sunny868
Copy link
Contributor Author

sunny868 commented Feb 3, 2023

@AlanBateman Could you please sponsor it for me?

Copy link
Member

@dfuch dfuch left a comment

Choose a reason for hiding this comment

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

LGTM

@DamonFool
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Feb 3, 2023

Going to push as commit 6f9106e.
Since your change was applied there have been 102 commits pushed to the master branch:

  • ac9e046: 8301479: Replace NULL with nullptr in os/linux
  • cf68d9f: 8299155: C2: SubTypeCheckNode::verify() should not produce dependencies / oop pool entries
  • 11804b2: 8301050: Detect Xen Virtualization on Linux aarch64
  • b504c94: 8300235: Use VarHandle access in Image(Input | Output)StreamImpl classes
  • 406021a: 8300929: Avoid unnecessary array fill after creation in java.awt.image
  • 7f313b0: 8180266: Convert sun/security/provider/KeyStore/DKSTest.sh to Java Jtreg Test
  • 3ad6aef: 8301313: RISC-V: C2: assert(false) failed: bad AD file due to missing match rule
  • 4c9de87: 8301655: Problemlist jdk/jdk/nio/zipfs/TestLocOffsetFromZip64EF.java on Linux
  • 04278e6: 8301564: Non-C-heap allocated ResourceHashtable keys and values must have trivial destructor
  • b00b70c: 8286907: keytool should warn about weak PBE algorithms
  • ... and 92 more: https://git.openjdk.org/jdk/compare/64b25ea0b410542635b6d99a92ec290da47c85ce...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 3, 2023
@openjdk openjdk bot closed this Feb 3, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Feb 3, 2023
@openjdk
Copy link

openjdk bot commented Feb 3, 2023

@DamonFool @sunny868 Pushed as commit 6f9106e.

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

@@ -30,6 +30,7 @@
* @build jdk.httpclient.test.lib.common.HttpServerAdapters
* jdk.httpclient.test.lib.http2.Http2TestServer
* jdk.test.lib.net.SimpleSSLContext
* @requests (vm.compMode != "Xcomp")
Copy link
Member

Choose a reason for hiding this comment

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

I didn't notice this change while reviewing - it is causing trouble in the CI.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is PR #12399 related?

Copy link
Member

@dfuch dfuch Feb 3, 2023

Choose a reason for hiding this comment

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

Looks like it - is that RMI test in #12399 using an HttpServer?

Copy link
Member

Choose a reason for hiding this comment

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

It seems that here @requests should have been @requires ; proposed fix #12409

Copy link
Contributor

Choose a reason for hiding this comment

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

WRT #12399: FilterUROTest does NOT use an HttpServer.
It runs as "testng/othervm" so perhaps if jtreg uses an HttpServer there may be a connection.

Copy link
Member

Choose a reason for hiding this comment

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

I doubt that what is proposed in #12399 is the right fix for the issue then. I commented there. Still looking for a reviewer for #12409 BTW ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm sorry for my low-level typo ;-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated net net-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

7 participants