Re: RFR: 8274453: (sctp) com/sun/nio/sctp/SctpChannel/CloseDescriptors.java test should be resilient to lsof warnings

2021-09-29 Thread Aleksey Shipilev
On Tue, 28 Sep 2021 15:54:09 GMT, Aleksey Shipilev  wrote:

> Recently added test fails on my desktop in the course of newly added `tier4` 
> runs. The reason is simple: the test verifies that lsof outputs no more than 
> LIMIT_LINES (2) lines. And on my machine, lsof prints some warnings that blow 
> that limit. In the patch, lsof -w is used to suppress the warnings.
> 
> Additional testing:
>  - [x] Affected test now passes

All right, I am integrating soon then.

-

PR: https://git.openjdk.java.net/jdk/pull/5739


Re: RFR: 8274453: (sctp) com/sun/nio/sctp/SctpChannel/CloseDescriptors.java test should be resilient to lsof warnings

2021-09-29 Thread Alan Bateman
On Wed, 29 Sep 2021 15:05:21 GMT, Aleksey Shipilev  wrote:

> Ok, thanks. @AlanBateman, want to ack?

I don't have anything to add except to say that close and async close 
implementations in the SCTP classes needs to be re-written and brought into 
line with the implementation in NIO. Also I'm not a fan of using losf in tests 
because the file descriptor count can increase/decrease for many reasons.

-

PR: https://git.openjdk.java.net/jdk/pull/5739


Re: RFR: 8274453: (sctp) com/sun/nio/sctp/SctpChannel/CloseDescriptors.java test should be resilient to lsof warnings

2021-09-29 Thread Aleksey Shipilev
On Tue, 28 Sep 2021 15:54:09 GMT, Aleksey Shipilev  wrote:

> Recently added test fails on my desktop in the course of newly added `tier4` 
> runs. The reason is simple: the test verifies that lsof outputs no more than 
> LIMIT_LINES (2) lines. And on my machine, lsof prints some warnings that blow 
> that limit. In the patch, lsof -w is used to suppress the warnings.
> 
> Additional testing:
>  - [x] Affected test now passes

Ok, thanks. @AlanBateman, want to ack?

-

PR: https://git.openjdk.java.net/jdk/pull/5739


Re: RFR: 8274453: (sctp) com/sun/nio/sctp/SctpChannel/CloseDescriptors.java test should be resilient to lsof warnings

2021-09-29 Thread Daniel Fuchs
On Tue, 28 Sep 2021 15:54:09 GMT, Aleksey Shipilev  wrote:

> Recently added test fails on my desktop in the course of newly added `tier4` 
> runs. The reason is simple: the test verifies that lsof outputs no more than 
> LIMIT_LINES (2) lines. And on my machine, lsof prints some warnings that blow 
> that limit. In the patch, lsof -w is used to suppress the warnings.
> 
> Additional testing:
>  - [x] Affected test now passes

Marked as reviewed by dfuchs (Reviewer).

I saw the test failed once on a linux ARM 64 machine - but it didn't fail again 
after 50 more runs. I also believe that the failure has nothing to do with your 
changes, so from my perspective your good to go. In case you're interested here 
is the tail of the log file that shows the failure. I suspect this a one off 
where the OS hadn't reclaimed the file descriptor within the expected delay 
(maybe due to other activity occurring on the machine).


...
99
  0
  1
  2
  3
  4
  5
  6
  7
  8
  9
end
COMMAND PID  USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
java2958962 mach5-one5u  unix 0x  0t0 217247452 
type=STREAM
java2958962 mach5-one8u  unix 0x  0t0 217252225 
type=STREAM
--System.err:(13/835)--
java.lang.RuntimeException: Failed: detected unclosed FD.
at CloseDescriptors.main(CloseDescriptors.java:92)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at 
com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:833)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Failed: 
detected unclosed FD.
JavaTest Message: shutting down test

-

PR: https://git.openjdk.java.net/jdk/pull/5739


Re: RFR: 8274453: (sctp) com/sun/nio/sctp/SctpChannel/CloseDescriptors.java test should be resilient to lsof warnings

2021-09-28 Thread Daniel Fuchs
On Tue, 28 Sep 2021 15:54:09 GMT, Aleksey Shipilev  wrote:

> Recently added test fails on my desktop in the course of newly added `tier4` 
> runs. The reason is simple: the test verifies that lsof outputs no more than 
> LIMIT_LINES (2) lines. And on my machine, lsof prints some warnings that blow 
> that limit. In the patch, lsof -w is used to suppress the warnings.
> 
> Additional testing:
>  - [x] Affected test now passes

@shipilev I will send your patch to our CI and come back with results.

-

PR: https://git.openjdk.java.net/jdk/pull/5739