-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8300939: sun/security/provider/certpath/OCSP/OCSPNoContentLength.java fails due to network errors #12370
Conversation
… fails due to network errors
/label security |
/issue 8300939 |
👋 Welcome back jnimeh! A progress list of the required criteria for merging this PR into |
@jnimeh |
@jnimeh This issue is referenced in the PR title - it will now be updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not clear to me what is causing this test failure, but your fix is to drain the input stream and flush the output?
@@ -56,7 +56,7 @@ public class OCSPNoContentLength { | |||
static String EE_ALIAS = "endentity"; | |||
|
|||
// Enable debugging for additional output | |||
static final boolean debug = false; | |||
static final boolean debug = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you intend to leave this true
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I would like to leave this in the off chance this does rear its ugly head again. I've done hundreds upon hundreds of iterations of this test both by itself and as part of tier2 runs and no failures occur. If it did fail though, I'd like to have the extra logging. It doesn't add very much to the output, but the info is useful.
Yes, that's the gist of it. I didn't realize originally that I was leaving unread data in the input stream, so draining that and making sure everything was flushed definitely improved things. The other changes were just minor extras (additional logging, etc.) that made sense while I was in this class. |
@jnimeh this pull request can not be integrated into git checkout JDK-8300939
git fetch https://git.openjdk.org/jdk master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Draining the input stream is the right fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine. Just one comment.
private static String dumpHexBytes(byte[] data, int itemsPerLine, | ||
String lineDelim, String itemDelim) { | ||
private static String dumpHexBytes(byte[] data, int dataLen, | ||
int itemsPerLine, String lineDelim, String itemDelim) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You always call with dataLen = data.length
. Is it still necessary to add this argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I would prefer to keep this. I made the change in order to help me debug draining the input stream and I felt it prudent to leave it in place, along with the main test's debug flag just in case.
@jnimeh 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:
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 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
/integrate |
Hello all,
This addresses a test bug where the SimpleOCSPServer would reset the connections made by a client CertPathValidator. I've made some minor changes to how the network data is read and sent from OCSP HTTP GET URLs and on responses, respectively. This will take the test off the problem list as well.
This has been taken through hundreds of test runs and does not see the failure any longer where there used to be intermittent failures. Also multiple tier2 runs have been executed with no failures.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/12370/head:pull/12370
$ git checkout pull/12370
Update a local copy of the PR:
$ git checkout pull/12370
$ git pull https://git.openjdk.org/jdk pull/12370/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 12370
View PR using the GUI difftool:
$ git pr show -t 12370
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12370.diff