Skip to content

8285915: failure_handler: gather the contents of /etc/hosts file#8466

Closed
jaikiran wants to merge 2 commits intoopenjdk:masterfrom
jaikiran:8285915
Closed

8285915: failure_handler: gather the contents of /etc/hosts file#8466
jaikiran wants to merge 2 commits intoopenjdk:masterfrom
jaikiran:8285915

Conversation

@jaikiran
Copy link
Copy Markdown
Member

@jaikiran jaikiran commented Apr 29, 2022

Can I please get a review of this change which addresses https://bugs.openjdk.java.net/browse/JDK-8285915?

With this change, the environment details collected by the failure handler will now include the contents of the /etc/hosts/ file, which can be useful in certain cases when debugging network tests that fail.

Testing done (on macOS):

cd test/failure_handler 
make test

Then verified that the generated environment.html had the /etc/hosts file content


Progress

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

Issue

  • JDK-8285915: failure_handler: gather the contents of /etc/hosts file

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8466

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

Using diff file

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

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Apr 29, 2022

👋 Welcome back jpai! 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 Apr 29, 2022
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 29, 2022

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

  • core-libs

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 core-libs core-libs-dev@openjdk.org label Apr 29, 2022
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Apr 29, 2022

Webrevs

@jaikiran
Copy link
Copy Markdown
Member Author

/label add infra, build

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 29, 2022

@jaikiran
The label infra is not a valid label.
These labels are valid:

  • serviceability
  • hotspot
  • hotspot-compiler
  • ide-support
  • kulla
  • i18n
  • shenandoah
  • jdk
  • javadoc
  • security
  • hotspot-runtime
  • jmx
  • build
  • nio
  • client
  • core-libs
  • compiler
  • net
  • hotspot-gc
  • hotspot-jfr

@jaikiran
Copy link
Copy Markdown
Member Author

/label add build

@openjdk openjdk bot added the build build-dev@openjdk.org label Apr 29, 2022
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 29, 2022

@jaikiran
The build label was successfully added.

Copy link
Copy Markdown
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.

Thanks for doing this Jaikiran! That should be helpful. Please get approval from someone from build-dev before integrating.

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 29, 2022

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

8285915: failure_handler: gather the contents of /etc/hosts file

Reviewed-by: dfuchs, erikj

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

  • 7020595: 8284435: Add dedicated filler objects for known dead Java heap areas
  • 1f9f873: 8285980: Several tests in compiler/c2/irTests miss @requires vm.compiler2.enabled
  • cf81f6c: 8285712: LogMessageBuffer doesn't check vsnprintf return value
  • 9795ef5: 8285851: Cleanup C2AtomicParseAccess::needs_pinning()
  • 3eb661b: 8285890: Fix some @param tags
  • d9541c5: 8276202: LogFileOutput.invalid_file_vm asserts when being executed from a read only working directory
  • df7fba1: 8284981: Support the vectorization of some counting-down loops in SLP
  • e54f26a: 8284992: Fix misleading Vector API doc for LSHR operator
  • 2dd882a: 8254759: [TEST_BUG] [macosx] javax/swing/JInternalFrame/4202966/IntFrameCoord.html fails
  • 23f022b: 8285945: [BACKOUT] JDK-8285802 AArch64: Consistently handle offsets in MacroAssembler as 64-bit quantities
  • ... and 10 more: https://git.openjdk.java.net/jdk/compare/669ac611b269bbda5c53d84173e5c9d0eb4ce919...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 Pull request is ready to be integrated label Apr 29, 2022
@erikj79
Copy link
Copy Markdown
Member

erikj79 commented Apr 29, 2022

Not sure if it's relevant, but did you consider doing this for Windows as well? The file is located at "$WINDIR/System32/drivers/etc/hosts".

@jaikiran
Copy link
Copy Markdown
Member Author

Hello Erik,

Not sure if it's relevant, but did you consider doing this for Windows as well? The file is located at "$WINDIR/System32/drivers/etc/hosts".

I hadn't investigated what the corresponding command would be for Windows, so had left it out. Quick question - the path you note, is that even applicable for x64? I see that it has a "System32" so just curious. I'll experiment a bit shortly against some CI setups to see how this goes on Windows.

@erikj79
Copy link
Copy Markdown
Member

erikj79 commented Apr 29, 2022

Quick question - the path you note, is that even applicable for x64? I see that it has a "System32" so just curious.

Yes, System32 is not related to 32 vs 64 bit. As I understand it, that name was introduced when moving from 16 to 32 bit.

@jaikiran
Copy link
Copy Markdown
Member Author

jaikiran commented May 2, 2022

Hello Erik, I've updated the PR to include capturing the contents of hosts file even on Windows. I've tested this against an internal Windows system where it correct shows the content:

----------------------------------------
[2022-05-02 06:08:52] [C:\cygwin\bin\bash.exe, -c, cat $WINDIR/System32/drivers/etc/hosts] timeout=20000
----------------------------------------
# ....

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
----------------------------------------
[2022-05-02 06:08:52] exit code: 0 time: 57 ms
----------------------------------------

@jaikiran
Copy link
Copy Markdown
Member Author

jaikiran commented May 3, 2022

Thank you Erik and Daniel for the reviews.

@jaikiran
Copy link
Copy Markdown
Member Author

jaikiran commented May 3, 2022

/integrate

@openjdk
Copy link
Copy Markdown

openjdk bot commented May 3, 2022

Going to push as commit 45ca81f.
Since your change was applied there have been 29 commits pushed to the master branch:

  • 3420a1a: 8286013: Incorrect test configurations for compiler/stable/TestStableShort.java
  • fbcd874: 8285979: G1: G1SegmentedArraySegment::header_size() is incorrect since JDK-8283368
  • 50a4df8: 8286024: PKCS12 keystore shows "DES/CBC" as the algorithm of a DES SecretKeyEntry
  • f973b78: 8286028: Some -Xlint keys are missing in javac man page
  • 9d8c3bf: 8285745: Re-examine PushbackInputStream mark/reset
  • 41de506: 8285507: revert fix for JDK-8282704 now that JDK-8282952 is fixed
  • 7a95a40: 8285970: gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java still fails after JDK-8285011
  • 4a79270: 8284632: runtime/Thread/StopAtExit.java possibly leaking memory again
  • cfcba1f: 8285827: Describe the keystore.pkcs12.legacy system property in the java.security file
  • 7020595: 8284435: Add dedicated filler objects for known dead Java heap areas
  • ... and 19 more: https://git.openjdk.java.net/jdk/compare/669ac611b269bbda5c53d84173e5c9d0eb4ce919...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 3, 2022
@openjdk openjdk bot closed this May 3, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 3, 2022
@openjdk
Copy link
Copy Markdown

openjdk bot commented May 3, 2022

@jaikiran Pushed as commit 45ca81f.

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

@jaikiran jaikiran deleted the 8285915 branch November 8, 2024 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build build-dev@openjdk.org core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants