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

8266761: AssertionError in sun.net.httpserver.ServerImpl.responseCompleted #3923

Closed
wants to merge 3 commits into from

Conversation

@dfuch
Copy link
Member

@dfuch dfuch commented May 7, 2021

Hi,

Please find here a fix to prevent an assertion error from firing in the com.sun.net.httpserver.

The issue occurs systematically when all of these conditions are met:

  1. System assertions are enabled
  2. The handler doesn't read or close the request input stream
  3. The handler sends a reply with no content (just headers, but no body)
  4. The handler doesn't close the response output stream
  5. The handler doesn't close the HttpExchange

The test fails with the assertion error when run without the fix (provided system assertions are enabled) and passes with the fix.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8266761: AssertionError in sun.net.httpserver.ServerImpl.responseCompleted

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3923/head:pull/3923
$ git checkout pull/3923

Update a local copy of the PR:
$ git checkout pull/3923
$ git pull https://git.openjdk.java.net/jdk pull/3923/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3923

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3923.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 7, 2021

👋 Welcome back dfuchs! 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 label May 7, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 7, 2021

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

  • net

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 net label May 7, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented May 7, 2021

Webrevs

@openjdk
Copy link

@openjdk openjdk bot commented May 11, 2021

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

8266761: AssertionError in sun.net.httpserver.ServerImpl.responseCompleted

Reviewed-by: chegar

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

  • 18e9d28: 8266676: G1: Remove dead code init_node_id_to_index_map()
  • 0e7bdae: 8265062: Remove duplication constant MaxTextureSize
  • 10a049e: 8265956: JVM crashes when matching LShiftVB Node
  • 9713152: 8262092: vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java SIGSEGV in memmove_ssse3
  • 23446f1: 8265128: [REDO] Optimize Vector API slice and unslice operations
  • e5d3ee3: 8266802: Shenandoah: Round up region size to page size unconditionally
  • 8851cb6: 8266779: Use instead of ZERO_WIDTH_SPACE
  • 0cc7833: 8265208: [JEP-356] : SplittableRandom and SplittableGenerators - splits() methods does not throw NullPointerException when source is null
  • f78440a: 8266440: Shenandoah: TestReferenceShortcutCycle.java test failed on AArch64
  • de78431: 8241502: C2: Migrate x86_64.ad to MacroAssembler
  • ... and 41 more: https://git.openjdk.java.net/jdk/compare/2dcbedf92a31da55299607c006821f22cc72ac0a...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.

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

@openjdk openjdk bot added the ready label May 11, 2021
@dfuch
Copy link
Member Author

@dfuch dfuch commented May 11, 2021

/integrate

@openjdk openjdk bot closed this May 11, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels May 11, 2021
@openjdk
Copy link

@openjdk openjdk bot commented May 11, 2021

@dfuch Since your change was applied there have been 57 commits pushed to the master branch:

  • 9c9c47e: 8266813: Shenandoah: Use shorter instruction sequence for checking if marking in progress
  • 0344e75: 8266794: Remove dead code notify_allocation_jvmti_allocation_event
  • 9e6e222: 8266892: avoid maybe-uninitialized gcc warnings on linux s390x
  • 6575566: 8266787: Potential overflow of pointer arithmetic in G1ArchiveAllocator
  • 8468001: 8263452: Javac slow compilation due to algorithmic complexity
  • 67cb22a: 8266601: Fix bugs in AddLNode::Ideal transformations
  • 18e9d28: 8266676: G1: Remove dead code init_node_id_to_index_map()
  • 0e7bdae: 8265062: Remove duplication constant MaxTextureSize
  • 10a049e: 8265956: JVM crashes when matching LShiftVB Node
  • 9713152: 8262092: vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java SIGSEGV in memmove_ssse3
  • ... and 47 more: https://git.openjdk.java.net/jdk/compare/2dcbedf92a31da55299607c006821f22cc72ac0a...master

Your commit was automatically rebased without conflicts.

Pushed as commit 2d2cd78.

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

@dfuch dfuch deleted the httpserver-assert branch May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants