Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out [v3]

2026-02-03 Thread SendaoYan
On Tue, 3 Feb 2026 02:41:41 GMT, SendaoYan  wrote:

>> Hi all,
>> 
>> Test java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out, 
>> because `lsof` invoke huast lots of time when the tested machine has many 
>> processes, and the processes open too many files.
>> 
>> This PR add parameter -p pid to `lsof`, which will only generate output from 
>> the wanted processes, rather than all the processes on the machine, this 
>> will make `lsof` use less time to finish significantly. And this PR also use 
>> `Process.waitFor(long timeout, TimeUnit unit)` instead of `waitFor()` which 
>> will avoid waitFor invoke cause test timed out. Delete the history lsof 
>> input and output files will make diagnosis more easy.
>> 
>> Change has been verifed locally. The imtermittent timed out do not observed 
>> anymore.
>
> SendaoYan has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Remove retry on destroyForcibly

Thanks for the reviews and suggestions.

-

PR Comment: https://git.openjdk.org/jdk/pull/29478#issuecomment-3844818356


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out [v3]

2026-02-03 Thread Roger Riggs
On Tue, 3 Feb 2026 02:41:41 GMT, SendaoYan  wrote:

>> Hi all,
>> 
>> Test java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out, 
>> because `lsof` invoke huast lots of time when the tested machine has many 
>> processes, and the processes open too many files.
>> 
>> This PR add parameter -p pid to `lsof`, which will only generate output from 
>> the wanted processes, rather than all the processes on the machine, this 
>> will make `lsof` use less time to finish significantly. And this PR also use 
>> `Process.waitFor(long timeout, TimeUnit unit)` instead of `waitFor()` which 
>> will avoid waitFor invoke cause test timed out. Delete the history lsof 
>> input and output files will make diagnosis more easy.
>> 
>> Change has been verifed locally. The imtermittent timed out do not observed 
>> anymore.
>
> SendaoYan has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Remove retry on destroyForcibly

fyi, The PR for the other PipelineLeadFD failure is in review: #29530.

-

PR Comment: https://git.openjdk.org/jdk/pull/29478#issuecomment-3843348247


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out [v3]

2026-02-03 Thread Roger Riggs
On Tue, 3 Feb 2026 02:41:41 GMT, SendaoYan  wrote:

>> Hi all,
>> 
>> Test java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out, 
>> because `lsof` invoke huast lots of time when the tested machine has many 
>> processes, and the processes open too many files.
>> 
>> This PR add parameter -p pid to `lsof`, which will only generate output from 
>> the wanted processes, rather than all the processes on the machine, this 
>> will make `lsof` use less time to finish significantly. And this PR also use 
>> `Process.waitFor(long timeout, TimeUnit unit)` instead of `waitFor()` which 
>> will avoid waitFor invoke cause test timed out. Delete the history lsof 
>> input and output files will make diagnosis more easy.
>> 
>> Change has been verifed locally. The imtermittent timed out do not observed 
>> anymore.
>
> SendaoYan has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Remove retry on destroyForcibly

Looks fine; thanks for the updates.

-

Marked as reviewed by rriggs (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/29478#pullrequestreview-3747265316


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out [v2]

2026-02-02 Thread SendaoYan
On Mon, 2 Feb 2026 14:44:21 GMT, Roger Riggs  wrote:

>> SendaoYan has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - Revert the change of lsof -p and only increase timeout value for test
>>  - Revert "8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java 
>> intermittent timed out"
>>
>>This reverts commit 23d6dd1ae20bdd8957826f443a95bd4e69000eab.
>
> test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java line 243:
> 
>> 241: .start()) {
>> 242: boolean status = p.waitFor(Utils.adjustTimeout(120), 
>> TimeUnit.SECONDS);
>> 243: if (!status) {
> 
> Retry on destroyForcibly isn't necessary or productive. On Linux its 
> equivalent to 'kill -9' and on Windows it isn't conditional.
> If there is a case where the a single call isn't effective, that should be 
> reported as a bug against `destroyForcibly`.

Thanks for the detail explanations. The retry destroyForcibly has been removed.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/29478#discussion_r2756912369


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out [v3]

2026-02-02 Thread SendaoYan
> Hi all,
> 
> Test java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out, 
> because `lsof` invoke huast lots of time when the tested machine has many 
> processes, and the processes open too many files.
> 
> This PR add parameter -p pid to `lsof`, which will only generate output from 
> the wanted processes, rather than all the processes on the machine, this will 
> make `lsof` use less time to finish significantly. And this PR also use 
> `Process.waitFor(long timeout, TimeUnit unit)` instead of `waitFor()` which 
> will avoid waitFor invoke cause test timed out. Delete the history lsof input 
> and output files will make diagnosis more easy.
> 
> Change has been verifed locally. The imtermittent timed out do not observed 
> anymore.

SendaoYan has updated the pull request incrementally with one additional commit 
since the last revision:

  Remove retry on destroyForcibly

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/29478/files
  - new: https://git.openjdk.org/jdk/pull/29478/files/c4522418..ad1dd3b3

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29478&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29478&range=01-02

  Stats: 4 lines in 1 file changed: 0 ins; 4 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/29478.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29478/head:pull/29478

PR: https://git.openjdk.org/jdk/pull/29478


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out [v2]

2026-02-02 Thread Roger Riggs
On Sat, 31 Jan 2026 04:40:13 GMT, SendaoYan  wrote:

>> Hi all,
>> 
>> Test java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out, 
>> because `lsof` invoke huast lots of time when the tested machine has many 
>> processes, and the processes open too many files.
>> 
>> This PR add parameter -p pid to `lsof`, which will only generate output from 
>> the wanted processes, rather than all the processes on the machine, this 
>> will make `lsof` use less time to finish significantly. And this PR also use 
>> `Process.waitFor(long timeout, TimeUnit unit)` instead of `waitFor()` which 
>> will avoid waitFor invoke cause test timed out. Delete the history lsof 
>> input and output files will make diagnosis more easy.
>> 
>> Change has been verifed locally. The imtermittent timed out do not observed 
>> anymore.
>
> SendaoYan has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Revert the change of lsof -p and only increase timeout value for test
>  - Revert "8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java 
> intermittent timed out"
>
>This reverts commit 23d6dd1ae20bdd8957826f443a95bd4e69000eab.

test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java line 243:

> 241: .start()) {
> 242: boolean status = p.waitFor(Utils.adjustTimeout(120), 
> TimeUnit.SECONDS);
> 243: if (!status) {

Retry on destroyForcibly isn't necessary or productive. On Linux its equivalent 
to 'kill -9' and on Windows it isn't conditional.
If there is a case where the a single call isn't effective, that should be 
reported as a bug against `destroyForcibly`.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/29478#discussion_r2754697692


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out [v2]

2026-01-30 Thread SendaoYan
On Fri, 30 Jan 2026 14:55:08 GMT, Roger Riggs  wrote:

>> Do you mean I should close this PR, and you will create a new one. That 
>> would be a good option.
>
> I would be ok with only increasing the timeout.
> That would avoid customizing the test to an older OS version and retain the 
> extra information useful for debugging.
> Since it is intermittent, the current timeout is in the ballpark, so doubling 
> it would be ok.
> Older OS versions will be replaced in time, but if we complicate the test 
> code, that will stay indefinitely.
> 
> Please wait to remove the test from the ProblemList. 
> When I fix: [JDK-8375585](https://bugs.openjdk.org/browse/JDK-8375585) I'll 
> take it off the problem list.

Thanks. I have revert the change of `lsof -p`, and increase the timeout value 
for this test.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/29478#discussion_r2748865771


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out [v2]

2026-01-30 Thread SendaoYan
> Hi all,
> 
> Test java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out, 
> because `lsof` invoke huast lots of time when the tested machine has many 
> processes, and the processes open too many files.
> 
> This PR add parameter -p pid to `lsof`, which will only generate output from 
> the wanted processes, rather than all the processes on the machine, this will 
> make `lsof` use less time to finish significantly. And this PR also use 
> `Process.waitFor(long timeout, TimeUnit unit)` instead of `waitFor()` which 
> will avoid waitFor invoke cause test timed out. Delete the history lsof input 
> and output files will make diagnosis more easy.
> 
> Change has been verifed locally. The imtermittent timed out do not observed 
> anymore.

SendaoYan has updated the pull request incrementally with two additional 
commits since the last revision:

 - Revert the change of lsof -p and only increase timeout value for test
 - Revert "8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent 
timed out"
   
   This reverts commit 23d6dd1ae20bdd8957826f443a95bd4e69000eab.

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/29478/files
  - new: https://git.openjdk.org/jdk/pull/29478/files/23d6dd1a..c4522418

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29478&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29478&range=00-01

  Stats: 22 lines in 1 file changed: 0 ins; 11 del; 11 mod
  Patch: https://git.openjdk.org/jdk/pull/29478.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29478/head:pull/29478

PR: https://git.openjdk.org/jdk/pull/29478


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out

2026-01-30 Thread Roger Riggs
On Fri, 30 Jan 2026 01:16:52 GMT, SendaoYan  wrote:

>> Having just updated this test, I would have been interested in fixing any 
>> follow on problems myself.
>
> Do you mean I should close this PR, and you will create a new one. That would 
> be a good option.

I would be ok with only increasing the timeout.
That would avoid customizing the test to an older OS version and retain the 
extra information useful for debugging.
Since it is intermittent, the current timeout is in the ballpark, so doubling 
it would be ok.
Older OS versions will be replaced in time, but if we complicate the test code, 
that will stay indefinitely.

Please wait to remove the test from the ProblemList. 
When I fix: [JDK-8375585](https://bugs.openjdk.org/browse/JDK-8375585) I'll 
take it off the problem list.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/29478#discussion_r2746676005


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out

2026-01-29 Thread SendaoYan
On Thu, 29 Jan 2026 14:32:59 GMT, Roger Riggs  wrote:

>> test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java line 246:
>> 
>>> 244: pids.forEach(pid -> command.append(",").append(pid));
>>> 245: System.out.println("Running lsof command: " + command);
>>> 246: try (Process p = new ProcessBuilder(command.toString().split(" 
>>> "))
>> 
>> The purpose of NOT using -p was to be able to identify the other processes 
>> that may be linked by their file descriptors/handles if the case of a 
>> failure.
>> Without a more complete list of file descriptors, the diagnostic information 
>> is not available to track down the other process.
>> I'd prefer that the timeout be increased.
>
> Having just updated this test, I would have been interested in fixing any 
> follow on problems myself.

Do you mean I should close this PR, and you will create a new one.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/29478#discussion_r2744210430


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out

2026-01-29 Thread Roger Riggs
On Thu, 29 Jan 2026 02:35:23 GMT, SendaoYan  wrote:

> Hi all,
> 
> Test java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out, 
> because `lsof` invoke huast lots of time when the tested machine has many 
> processes, and the processes open too many files.
> 
> This PR add parameter -p pid to `lsof`, which will only generate output from 
> the wanted processes, rather than all the processes on the machine, this will 
> make `lsof` use less time to finish significantly. And this PR also use 
> `Process.waitFor(long timeout, TimeUnit unit)` instead of `waitFor()` which 
> will avoid waitFor invoke cause test timed out. Delete the history lsof input 
> and output files will make diagnosis more easy.
> 
> Change has been verifed locally. The imtermittent timed out do not observed 
> anymore.

The previous version used /proc to determine file descriptors, but lsof was 
available on all platforms and common code was desirable (though the output 
format is different).
It might make more sense to go back to the /proc/self/fds on Linux.

-

PR Comment: https://git.openjdk.org/jdk/pull/29478#issuecomment-3818109815


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out

2026-01-29 Thread Roger Riggs
On Thu, 29 Jan 2026 14:30:18 GMT, Roger Riggs  wrote:

>> Hi all,
>> 
>> Test java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out, 
>> because `lsof` invoke huast lots of time when the tested machine has many 
>> processes, and the processes open too many files.
>> 
>> This PR add parameter -p pid to `lsof`, which will only generate output from 
>> the wanted processes, rather than all the processes on the machine, this 
>> will make `lsof` use less time to finish significantly. And this PR also use 
>> `Process.waitFor(long timeout, TimeUnit unit)` instead of `waitFor()` which 
>> will avoid waitFor invoke cause test timed out. Delete the history lsof 
>> input and output files will make diagnosis more easy.
>> 
>> Change has been verifed locally. The imtermittent timed out do not observed 
>> anymore.
>
> test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java line 246:
> 
>> 244: pids.forEach(pid -> command.append(",").append(pid));
>> 245: System.out.println("Running lsof command: " + command);
>> 246: try (Process p = new ProcessBuilder(command.toString().split(" 
>> "))
> 
> The purpose of NOT using -p was to be able to identify the other processes 
> that may be linked by their file descriptors/handles if the case of a failure.
> Without a more complete list of file descriptors, the diagnostic information 
> is not available to track down the other process.
> I'd prefer that the timeout be increased.

Having just updated this test, I would have been interested in fixing any 
follow on problems myself.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/29478#discussion_r2741961961


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out

2026-01-29 Thread Roger Riggs
On Thu, 29 Jan 2026 02:35:23 GMT, SendaoYan  wrote:

> Hi all,
> 
> Test java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out, 
> because `lsof` invoke huast lots of time when the tested machine has many 
> processes, and the processes open too many files.
> 
> This PR add parameter -p pid to `lsof`, which will only generate output from 
> the wanted processes, rather than all the processes on the machine, this will 
> make `lsof` use less time to finish significantly. And this PR also use 
> `Process.waitFor(long timeout, TimeUnit unit)` instead of `waitFor()` which 
> will avoid waitFor invoke cause test timed out. Delete the history lsof input 
> and output files will make diagnosis more easy.
> 
> Change has been verifed locally. The imtermittent timed out do not observed 
> anymore.

test/jdk/java/lang/ProcessBuilder/PipelineLeaksFD.java line 246:

> 244: pids.forEach(pid -> command.append(",").append(pid));
> 245: System.out.println("Running lsof command: " + command);
> 246: try (Process p = new ProcessBuilder(command.toString().split(" 
> "))

The purpose of NOT using -p was to be able to identify the other processes that 
may be linked by their file descriptors/handles if the case of a failure.
Without a more complete list of file descriptors, the diagnostic information is 
not available to track down the other process.
I'd prefer that the timeout be increased.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/29478#discussion_r2741948575


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out

2026-01-29 Thread SendaoYan
On Thu, 29 Jan 2026 06:40:56 GMT, Jaikiran Pai  wrote:

> It's possible that the system where this test is timing out for @sendaoYan 
> may have this same problem.

This timed out failure only observed on a linux-aarch64 machine, which has 
older linux kernel version. The lsof version is lsof 4.93.2, which same to 
ubuntu22. But ubuntu22 do not observed this issue for now on.


> cat /etc/os-release 
NAME="Kylin Linux Advanced Server"
VERSION="V10 (Halberd)"
ID="kylin"
VERSION_ID="V10"
PRETTY_NAME="Kylin Linux Advanced Server V10 (Halberd)"
ANSI_COLOR="0;31"

> uname -a
Linux KP57 4.19.90-89.11.v2401.ky10.aarch64 #1 SMP Thu Apr 25 18:20:10 CST 2024 
aarch64 aarch64 aarch64 GNU/Linux

-

PR Comment: https://git.openjdk.org/jdk/pull/29478#issuecomment-3816181556


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out

2026-01-28 Thread Jaikiran Pai
On Thu, 29 Jan 2026 02:35:23 GMT, SendaoYan  wrote:

> because lsof invoke huast lots of time when the tested machine has many 
> processes, and the processes open too many files.

More of a FYI - Some version(s) of `lsof` are known to take extremely long time 
when launched from within some other process. That issue has been addressed in 
newer versions of lsof https://github.com/lsof-org/lsof/issues/328. We had 
noticed a similar issue with `lsof` when investigating a test timeout in 
https://bugs.openjdk.org/browse/JDK-8347001?focusedId=14814531&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14814531.
 It's possible that the system where this test is timing out for @sendaoYan may 
have this same problem.

-

PR Comment: https://git.openjdk.org/jdk/pull/29478#issuecomment-3815788739


Re: RFR: 8376630: java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out

2026-01-28 Thread David Holmes
On Thu, 29 Jan 2026 02:35:23 GMT, SendaoYan  wrote:

> Hi all,
> 
> Test java/lang/ProcessBuilder/PipelineLeaksFD.java intermittent timed out, 
> because `lsof` invoke huast lots of time when the tested machine has many 
> processes, and the processes open too many files.
> 
> This PR add parameter -p pid to `lsof`, which will only generate output from 
> the wanted processes, rather than all the processes on the machine, this will 
> make `lsof` use less time to finish significantly. And this PR also use 
> `Process.waitFor(long timeout, TimeUnit unit)` instead of `waitFor()` which 
> will avoid waitFor invode cause test timed out. Delete the history lsof input 
> and output files will make diagnosis more easy.
> 
> Change has been verifed locally. The imtermittent timed out do not observed 
> anymore.

@sendaoYan we don't see this test timeout but we do see it fail - see 
[JDK-8375585](https://bugs.openjdk.org/browse/JDK-8375585). The test was just 
added to the ProblemList.

-

PR Comment: https://git.openjdk.org/jdk/pull/29478#issuecomment-3815399332