Re: RFR: 8325567: jspawnhelper without args fails with segfault [v8]

2024-03-08 Thread Evgeny Astigeevich
On Fri, 8 Mar 2024 17:24:24 GMT, Elif Aslan wrote: >> This change is intended to address the segmentation fault issue that occurs >> when jspawnhelper is called without arguments,. >> There is a new test added to verify the behavior in such cases. >> >> `[ec2-user@ip-172-16-0-10 jdk]$ make CON

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v8]

2024-03-08 Thread Roger Riggs
On Fri, 8 Mar 2024 17:24:24 GMT, Elif Aslan wrote: >> This change is intended to address the segmentation fault issue that occurs >> when jspawnhelper is called without arguments,. >> There is a new test added to verify the behavior in such cases. >> >> `[ec2-user@ip-172-16-0-10 jdk]$ make CON

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v7]

2024-03-08 Thread Magnus Ihse Bursie
On Fri, 8 Mar 2024 10:10:23 GMT, Magnus Ihse Bursie wrote: >> I think what matters for this test test most is which platforms we build >> `jspawnhelper` for, and those platforms indeed are: >> >> >> ifeq ($(call isTargetOs, macosx aix linux), true) >> $(eval $(call SetupJdkExecutable, BUILD_

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v8]

2024-03-08 Thread Elif Aslan
> This change is intended to address the segmentation fault issue that occurs > when jspawnhelper is called without arguments,. > There is a new test added to verify the behavior in such cases. > > `[ec2-user@ip-172-16-0-10 jdk]$ make CONF=linux-x86_64-server-fastdebug test > TEST=test/jdk/java

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v7]

2024-03-08 Thread Magnus Ihse Bursie
On Fri, 8 Mar 2024 09:19:43 GMT, Aleksey Shipilev wrote: >> Yes indeed, it is used for all Unix OSes (that is, everything but Windows). > > I think what matters for this test test most is which platforms we build > `jspawnhelper` for, and those platforms indeed are: > > > ifeq ($(call isTarget

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v7]

2024-03-08 Thread Aleksey Shipilev
On Fri, 8 Mar 2024 07:35:27 GMT, Magnus Ihse Bursie wrote: >> test/jdk/java/lang/ProcessBuilder/JspawnhelperWarnings.java line 29: >> >>> 27: * @test >>> 28: * @bug 8325567 >>> 29: * @requires (os.family == "linux") | (os.family == "aix") >> >> Unless I'm mistaken, jspawn helper is used on M

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v7]

2024-03-08 Thread Aleksey Shipilev
On Thu, 7 Mar 2024 20:04:13 GMT, Vladimir Petko wrote: > I wonder if it would make sense to add a test with a correct argument format? I would say that is what current jspawnhelper tests already test, and it is also tested implicitly with `Process` tests. Let's keep this test for testing that

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v7]

2024-03-07 Thread Magnus Ihse Bursie
On Thu, 7 Mar 2024 19:47:55 GMT, Roger Riggs wrote: >> Elif Aslan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add args[0] back > > test/jdk/java/lang/ProcessBuilder/JspawnhelperWarnings.java line 29: > >> 27: * @test >> 28: * @bug

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v7]

2024-03-07 Thread Vladimir Petko
On Thu, 7 Mar 2024 19:44:11 GMT, Roger Riggs wrote: >> Elif Aslan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add args[0] back > > test/jdk/java/lang/ProcessBuilder/JspawnhelperWarnings.java line 56: > >> 54: public static void

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v7]

2024-03-07 Thread Roger Riggs
On Thu, 7 Mar 2024 17:13:12 GMT, Elif Aslan wrote: >> This change is intended to address the segmentation fault issue that occurs >> when jspawnhelper is called without arguments,. >> There is a new test added to verify the behavior in such cases. >> >> `[ec2-user@ip-172-16-0-10 jdk]$ make CON

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-07 Thread Vladimir Petko
On Tue, 5 Mar 2024 17:56:21 GMT, Roger Riggs wrote: >> This change is intended to address the segmentation fault issue that occurs >> when jspawnhelper is called without arguments,. >> There is a new test added to verify the behavior in such cases. >> >> `[ec2-user@ip-172-16-0-10 jdk]$ make CO

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v7]

2024-03-07 Thread Vladimir Petko
On Thu, 7 Mar 2024 17:13:12 GMT, Elif Aslan wrote: >> This change is intended to address the segmentation fault issue that occurs >> when jspawnhelper is called without arguments,. >> There is a new test added to verify the behavior in such cases. >> >> `[ec2-user@ip-172-16-0-10 jdk]$ make CON

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-07 Thread Aleksey Shipilev
On Tue, 5 Mar 2024 17:56:21 GMT, Roger Riggs wrote: >> This change is intended to address the segmentation fault issue that occurs >> when jspawnhelper is called without arguments,. >> There is a new test added to verify the behavior in such cases. >> >> `[ec2-user@ip-172-16-0-10 jdk]$ make CO

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v7]

2024-03-07 Thread Aleksey Shipilev
On Thu, 7 Mar 2024 17:13:12 GMT, Elif Aslan wrote: >> This change is intended to address the segmentation fault issue that occurs >> when jspawnhelper is called without arguments,. >> There is a new test added to verify the behavior in such cases. >> >> `[ec2-user@ip-172-16-0-10 jdk]$ make CON

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v7]

2024-03-07 Thread Elif Aslan
> This change is intended to address the segmentation fault issue that occurs > when jspawnhelper is called without arguments,. > There is a new test added to verify the behavior in such cases. > > `[ec2-user@ip-172-16-0-10 jdk]$ make CONF=linux-x86_64-server-fastdebug test > TEST=test/jdk/java

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v6]

2024-03-07 Thread Elif Aslan
> This change is intended to address the segmentation fault issue that occurs > when jspawnhelper is called without arguments,. > There is a new test added to verify the behavior in such cases. > > `[ec2-user@ip-172-16-0-10 jdk]$ make CONF=linux-x86_64-server-fastdebug test > TEST=test/jdk/java

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v5]

2024-03-07 Thread Elif Aslan
> This change is intended to address the segmentation fault issue that occurs > when jspawnhelper is called without arguments,. > There is a new test added to verify the behavior in such cases. > > `[ec2-user@ip-172-16-0-10 jdk]$ make CONF=linux-x86_64-server-fastdebug test > TEST=test/jdk/java

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v3]

2024-03-07 Thread Aleksey Shipilev
On Thu, 7 Mar 2024 16:29:12 GMT, Elif Aslan wrote: >> This change is intended to address the segmentation fault issue that occurs >> when jspawnhelper is called without arguments,. >> There is a new test added to verify the behavior in such cases. >> >> `[ec2-user@ip-172-16-0-10 jdk]$ make CON

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v4]

2024-03-07 Thread Aleksey Shipilev
On Thu, 7 Mar 2024 16:33:11 GMT, Elif Aslan wrote: >> This change is intended to address the segmentation fault issue that occurs >> when jspawnhelper is called without arguments,. >> There is a new test added to verify the behavior in such cases. >> >> `[ec2-user@ip-172-16-0-10 jdk]$ make CON

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v4]

2024-03-07 Thread Elif Aslan
> This change is intended to address the segmentation fault issue that occurs > when jspawnhelper is called without arguments, and it includes an updated > test to verify the behavior in such cases. > > Existing tests passes since it does not check behavior without args. > After test update the

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v3]

2024-03-07 Thread Elif Aslan
> This change is intended to address the segmentation fault issue that occurs > when jspawnhelper is called without arguments, and it includes an updated > test to verify the behavior in such cases. > > Existing tests passes since it does not check behavior without args. > After test update the

Re: RFR: 8325567: jspawnhelper without args fails with segfault [v2]

2024-03-07 Thread Elif Aslan
> This change is intended to address the segmentation fault issue that occurs > when jspawnhelper is called without arguments, and it includes an updated > test to verify the behavior in such cases. > > Existing tests passes since it does not check behavior without args. > After test update the

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-06 Thread Vladimir Petko
On Wed, 6 Mar 2024 09:26:08 GMT, Aleksey Shipilev wrote: > ``` > Process p = ProcessTools.startProcess(...); > OutputAnalyzer oa = new OutputAnalyzer(p); > oa.shouldNotHaveExitValue(0); > oa.shouldContain("This command is not for general use"); > ``` Thank you! This shortens things quite

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-06 Thread Aleksey Shipilev
On Tue, 5 Mar 2024 20:34:47 GMT, Vladimir Petko wrote: > > The change in jspawnhelper looks good. > > I think it would be simpler to have a separate > > `jdk/java/lang/ProcessBuilder/JspawnhelperMisuse.java` test that simply > > invokes the `jspawnhelper` and verifies the proper message is prin

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-05 Thread Vladimir Petko
On Tue, 5 Mar 2024 10:39:31 GMT, Aleksey Shipilev wrote: > The change in jspawnhelper looks good. > > I think it would be simpler to have a separate > `jdk/java/lang/ProcessBuilder/JspawnhelperMisuse.java` test that simply > invokes the `jspawnhelper` and verifies the proper message is printed

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-05 Thread Vladimir Petko
On Tue, 5 Mar 2024 17:56:21 GMT, Roger Riggs wrote: > I'm curious why this test is requires `vm.debug`? That means it generally > won't get run on release builds. This is due to the tests of the crash scenarios that are guarded with #ifdef DEBUG in jspawnhelper. Moving the test in the separa

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-05 Thread Roger Riggs
On Mon, 4 Mar 2024 23:54:38 GMT, Vladimir Petko wrote: >> test/jdk/java/lang/ProcessBuilder/JspawnhelperProtocol.java line 111: >> >>> 109: if (p.exitValue() != 1) >>> 110: System.exit(ERROR + 2); >>> 111: System.exit(0); >> >> Its bad form to System.exit from not at

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-05 Thread Roger Riggs
On Mon, 4 Mar 2024 21:19:26 GMT, Elif Aslan wrote: > This change is intended to address the segmentation fault issue that occurs > when jspawnhelper is called without arguments, and it includes an updated > test to verify the behavior in such cases. > > Existing tests passes since it does not

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-05 Thread Aleksey Shipilev
On Mon, 4 Mar 2024 21:19:26 GMT, Elif Aslan wrote: > This change is intended to address the segmentation fault issue that occurs > when jspawnhelper is called without arguments, and it includes an updated > test to verify the behavior in such cases. > > Existing tests passes since it does not

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-04 Thread Vladimir Petko
On Mon, 4 Mar 2024 23:23:04 GMT, Roger Riggs wrote: >> This change is intended to address the segmentation fault issue that occurs >> when jspawnhelper is called without arguments, and it includes an updated >> test to verify the behavior in such cases. >> >> Existing tests passes since it doe

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-04 Thread Roger Riggs
On Mon, 4 Mar 2024 21:19:26 GMT, Elif Aslan wrote: > This change is intended to address the segmentation fault issue that occurs > when jspawnhelper is called without arguments, and it includes an updated > test to verify the behavior in such cases. > > Existing tests passes since it does not

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-04 Thread Evgeny Astigeevich
On Mon, 4 Mar 2024 21:19:26 GMT, Elif Aslan wrote: > This change is intended to address the segmentation fault issue that occurs > when jspawnhelper is called without arguments, and it includes an updated > test to verify the behavior in such cases. > > Existing tests passes since it does not

RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-04 Thread Elif Aslan
This change is intended to address the segmentation fault issue that occurs when jspawnhelper is called without arguments, and it includes an updated test to verify the behavior in such cases. Existing tests passes since it does not check behavior without args. After test update the test fails w

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-03-04 Thread Vladimir Petko
On Fri, 1 Mar 2024 07:37:22 GMT, Alan Bateman wrote: > Would it be possible to expand a bit on what is going on here? Are you saying > that in the course of upgrading a JDK that you somehow get into a state where > jspawnhelper has been replaced with a version from a newer JDK? Is the real > i

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-02-29 Thread Alan Bateman
On Fri, 1 Mar 2024 01:50:46 GMT, Vladimir Petko wrote: > This MR fixes segsegv in jspawnhelper when it is called without args. > This scenario happens when a long running Java process is not restarted > during upgrade. > > It updates test/jdk/java/lang/ProcessBuilder/JspawnhelperProtocol.java

RFR: 8325567: jspawnhelper without args fails with segfault

2024-02-29 Thread Vladimir Petko
This MR fixes segsegv in jspawnhelper when it is called without args. This scenario happens when a long running Java process is not restarted during upgrade. It updates test/jdk/java/lang/ProcessBuilder/JspawnhelperProtocol.java to check that jspawnhelper exits with code 1: After test update:

Re: RFR: 8325567: jspawnhelper without args fails with segfault

2024-02-29 Thread Vladimir Petko
On Fri, 1 Mar 2024 01:50:46 GMT, Vladimir Petko wrote: > This MR fixes segsegv in jspawnhelper when it is called without args. > This scenario happens when a long running Java process is not restarted > during upgrade. > > It updates test/jdk/java/lang/ProcessBuilder/JspawnhelperProtocol.java