Since JDK13, executing commands in a sub-process defaults to the so called
`POSIX_SPAWN` launching mechanism (i.e.
`-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by using
`posix_spawn(3)` to firstly start a tiny helper program called `jspawnhelper`
in a subprocess. In a
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote:
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote:
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a
On Fri, 12 May 2023 21:37:36 GMT, Roger Riggs wrote:
> Looks ok.
>
> Is it practical to write a test for this situation? Can I assume you've
> validated the improvement as a remedy for the observed hangs?
I thought about a test but couldn't come up with a practical way to write it.
The JVM ha
On Sun, 14 May 2023 17:28:33 GMT, Thomas Stuefe wrote:
> Trying to understand this, and the scope of the problem:
>
> * Parent process opens "in" pipe.
>
> * Now owns read and write end of pipe.
>
> * Parent forks jspawnhelper.
>
> * jspawnhelper inherits handles. Now there ar
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote:
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a
On Mon, 15 May 2023 12:31:49 GMT, Volker Simonis wrote:
> > Looks ok.
> > Is it practical to write a test for this situation? Can I assume you've
> > validated the improvement as a remedy for the observed hangs?
>
> I thought about a test but couldn't come up with a practical way to write it.
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote:
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote:
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote:
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a
On Mon, 15 May 2023 16:31:38 GMT, Thomas Stuefe wrote:
> The fact that this error is in there since JDK 13 is scary.
The error is there since ten years since the `posix_spawn` mechanism was
initially introduced with
[JDK-5049299](https://bugs.openjdk.org/browse/JDK-5049299) for JDK 8 and
down
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote:
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote:
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote:
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote:
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a
On Mon, 15 May 2023 18:45:24 GMT, Roger Riggs wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly start
On Tue, 16 May 2023 07:24:31 GMT, David Holmes wrote:
> I wonder if @Martin-Buchholz is able to look at this one?
>
> My concern with changes like this is that they fix an issue but then have
> unexpected side-effects themselves.
Are there any specific concerns you have?
-
PR Com
On Mon, 15 May 2023 16:11:46 GMT, Volker Simonis wrote:
> > 2. I think you don't actually have to hand in the in-pipe-read-end fd
> > number via command line arg, just to have the child to close it. You could
> > just, in the parent, set the fd to FD_CLOEXEC. Since posix_spawn() exec's
> > the
On Tue, 16 May 2023 07:56:35 GMT, Thomas Stuefe wrote:
> > I wonder if @Martin-Buchholz is able to look at this one?
> > My concern with changes like this is that they fix an issue but then have
> > unexpected side-effects themselves.
>
> Are there any specific concerns you have?
There seems t
On Tue, 16 May 2023 12:07:10 GMT, David Holmes wrote:
> > > I wonder if @Martin-Buchholz is able to look at this one?
> > > My concern with changes like this is that they fix an issue but then have
> > > unexpected side-effects themselves.
> >
> >
> > Are there any specific concerns you have?
On Tue, 16 May 2023 12:32:44 GMT, Thomas Stuefe wrote:
> > > > I wonder if @Martin-Buchholz is able to look at this one?
> > > > My concern with changes like this is that they fix an issue but then
> > > > have unexpected side-effects themselves.
> > >
> > >
> > > Are there any specific concer
On Mon, 15 May 2023 18:45:24 GMT, Roger Riggs wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly start
On Mon, 15 May 2023 20:00:28 GMT, Joe Darcy wrote:
> Should this issue have a CSR for any behavioral changes?
Well, you can certainly argue that every bug fix is a behavioral changes, right
:)
But seriously, I don't see how this PR could require a CSR. The only behavioral
change is really tha
On Mon, 15 May 2023 19:55:45 GMT, Bernd wrote:
> Independent of the actual fix, it was mentioned that it can block listening
> sockets, aren’t those close on exec? Also should a write and read timeout be
> used in addition? At least to call the close descriptor code before retrying?
While the
On Wed, 17 May 2023 12:48:17 GMT, Volker Simonis wrote:
> > Should this issue have a CSR for any behavioral changes?
>
> Well, you can certainly argue that every bug fix is a behavioral changes,
> right :)
>
> But seriously, I don't see how this PR could require a CSR. The only
> behavioral c
On Wed, 17 May 2023 12:40:58 GMT, Volker Simonis wrote:
> If we do a short read we will work with corrupted `ChildStuff` and
> `SpawnInfo` structures.
i would agree failing after readFully returns short reads is fine. It won’t
stop the method from retrying/completing endlessly in a pathologica
On Wed, 17 May 2023 14:42:45 GMT, Roger Riggs wrote:
> if parent process dies prematurely
@RogerRiggs , I've created a release note for the issue based on your
suggestions. Please feel free to proof-read and enhance it :)
-
PR Comment: https://git.openjdk.org/jdk/pull/13956#issuec
On Wed, 17 May 2023 14:42:45 GMT, Roger Riggs wrote:
> > Should this issue have a CSR for any behavioral changes?
>
> Well, you can certainly argue that every bug fix is a behavioral changes,
> right :)
>
> But seriously, I don't see how this PR could require a CSR. The only
> behavioral chan
On Wed, 17 May 2023 12:40:58 GMT, Volker Simonis wrote:
> Sorry, but I don't understand this argument. If we do a short read we will
> work with corrupted ChildStuff and SpawnInfo
> structures. This can in the extreme case execute arbitrary code (e.g. if
> ChildStuff.argv is not fully read fro
On Fri, 19 May 2023 06:28:47 GMT, David Holmes wrote:
> > Sorry, but I don't understand this argument. If we do a short read we will
> > work with corrupted ChildStuff and SpawnInfo
> > structures. This can in the extreme case execute arbitrary code (e.g. if
> > ChildStuff.argv is not fully rea
On Fri, 19 May 2023 15:43:30 GMT, Roger Riggs wrote:
> Given the purpose and implementation of the readFully function, I don't see
> how it can return anything other than an error or the full requested read
> length.
@RogerRiggs it will return < requested read length if it encounters EOF - i.e
On Wed, 17 May 2023 20:03:37 GMT, Joe Darcy wrote:
> > > Should this issue have a CSR for any behavioral changes?
> >
> >
> > Well, you can certainly argue that every bug fix is a behavioral changes,
> > right :)
> > But seriously, I don't see how this PR could require a CSR. The only
> > beh
On Fri, 19 May 2023 15:43:30 GMT, Roger Riggs wrote:
>>> Sorry, but I don't understand this argument. If we do a short read we will
>>> work with corrupted ChildStuff and SpawnInfo
>>> structures. This can in the extreme case execute arbitrary code (e.g. if
>>> ChildStuff.argv is not fully rea
On Fri, 19 May 2023 15:43:30 GMT, Roger Riggs wrote:
>>> Sorry, but I don't understand this argument. If we do a short read we will
>>> work with corrupted ChildStuff and SpawnInfo
>>> structures. This can in the extreme case execute arbitrary code (e.g. if
>>> ChildStuff.argv is not fully rea
On Wed, 24 May 2023 14:30:10 GMT, Volker Simonis wrote:
>>> > Sorry, but I don't understand this argument. If we do a short read we
>>> > will work with corrupted ChildStuff and SpawnInfo
>>> > structures. This can in the extreme case execute arbitrary code (e.g. if
>>> > ChildStuff.argv is not
On Fri, 19 May 2023 15:43:30 GMT, Roger Riggs wrote:
>>> Sorry, but I don't understand this argument. If we do a short read we will
>>> work with corrupted ChildStuff and SpawnInfo
>>> structures. This can in the extreme case execute arbitrary code (e.g. if
>>> ChildStuff.argv is not fully rea
On Thu, 1 Jun 2023 10:55:26 GMT, Volker Simonis wrote:
>>> > Sorry, but I don't understand this argument. If we do a short read we
>>> > will work with corrupted ChildStuff and SpawnInfo
>>> > structures. This can in the extreme case execute arbitrary code (e.g. if
>>> > ChildStuff.argv is not
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a tiny helper program called
> `jspawnhelper` in a subproc
On Wed, 17 May 2023 12:33:48 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Wed, 17 May 2023 12:33:48 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Wed, 17 May 2023 14:55:00 GMT, Roger Riggs wrote:
>> Volker Simonis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Added test case
>
> src/java.base/unix/native/libjava/childproc.c line 408:
>
>> 406: * or the newly created jspawnh
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a tiny helper program called
> `jspawnhelper` in a subproc
On Wed, 17 May 2023 13:46:29 GMT, Thomas Stuefe wrote:
>> Volker Simonis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Added test case
>
> src/java.base/unix/native/jspawnhelper/jspawnhelper.c line 140:
>
>> 138: struct stat buf;
On Wed, 17 May 2023 14:10:59 GMT, Thomas Stuefe wrote:
>> Volker Simonis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Added test case
>
> src/java.base/unix/native/libjava/ProcessImpl_md.c line 490:
>
>> 488: pid_t resultPid;
>>
On Wed, 17 May 2023 16:05:58 GMT, Volker Simonis wrote:
>> src/java.base/unix/native/jspawnhelper/jspawnhelper.c line 140:
>>
>>> 138: struct stat buf;
>>> 139: /* argv[0] contains the fd number to read all the child info */
>>> 140: int r, fdinr, fdinw, fdout;
>>
>> Since you are h
On Wed, 17 May 2023 16:00:23 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Wed, 17 May 2023 16:00:23 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Wed, 17 May 2023 16:12:15 GMT, Volker Simonis wrote:
>> src/java.base/unix/native/libjava/ProcessImpl_md.c line 490:
>>
>>> 488: pid_t resultPid;
>>> 489: int i, offset, rval, bufsize, magic;
>>> 490: char *buf, buf1[24];
>>
>> Since you are here could you please increase buffer
On Wed, 17 May 2023 17:08:34 GMT, Roger Riggs wrote:
>> Volker Simonis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> REALLY adding the test :)
>
> test/jdk/java/lang/ProcessBuilder/JspawnhelperProtocol.java line 116:
>
>> 114:
On Wed, 17 May 2023 17:01:53 GMT, Roger Riggs wrote:
>> Volker Simonis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> REALLY adding the test :)
>
> test/jdk/java/lang/ProcessBuilder/JspawnhelperProtocol.java line 63:
>
>> 61: i
On Wed, 17 May 2023 17:05:54 GMT, Roger Riggs wrote:
>> Volker Simonis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> REALLY adding the test :)
>
> test/jdk/java/lang/ProcessBuilder/JspawnhelperProtocol.java line 78:
>
>> 76: p
On Wed, 17 May 2023 17:07:13 GMT, Roger Riggs wrote:
>> Volker Simonis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> REALLY adding the test :)
>
> test/jdk/java/lang/ProcessBuilder/JspawnhelperProtocol.java line 106:
>
>> 104:
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a tiny helper program called
> `jspawnhelper` in a subproc
On Thu, 18 May 2023 05:58:26 GMT, Thomas Stuefe wrote:
>> Volker Simonis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> REALLY adding the test :)
>
> src/java.base/unix/native/libjava/childproc.c line 413:
>
>> 411: const char* env
On Mon, 22 May 2023 10:22:16 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Mon, 22 May 2023 10:22:16 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Mon, 22 May 2023 10:22:16 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Mon, 22 May 2023 10:22:16 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Mon, 22 May 2023 10:22:16 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Tue, 23 May 2023 05:34:15 GMT, Thomas Stuefe wrote:
>> Volker Simonis has updated the pull request with a new target base due to a
>> merge or a rebase. The pull request now contains five commits:
>>
>> - Merge branch 'master' into JDK-8307990
>> - Address comments from tstuefe and RogerRi
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a tiny helper program called
> `jspawnhelper` in a subproc
On Tue, 23 May 2023 14:21:06 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a tiny helper program called
> `jspawnhelper` in a subproc
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a tiny helper program called
> `jspawnhelper` in a subproc
On Thu, 25 May 2023 15:25:40 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Thu, 25 May 2023 15:25:40 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Thu, 25 May 2023 15:25:40 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
> Since JDK13, executing commands in a sub-process defaults to the so called
> `POSIX_SPAWN` launching mechanism (i.e.
> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
> using `posix_spawn(3)` to firstly start a tiny helper program called
> `jspawnhelper` in a subproc
On Thu, 25 May 2023 15:25:40 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
On Fri, 26 May 2023 17:23:01 GMT, Thomas Stuefe wrote:
> Still think it would be cleaner and simpler to set the FD in the parent to
> CLOEXEC, before doing posix_spawn, and at the same time set the childStuff
> variable to -1 to prevent the child from attempting to re-close it.
> Reconsider?
On Tue, 30 May 2023 13:19:37 GMT, Volker Simonis wrote:
>> Since JDK13, executing commands in a sub-process defaults to the so called
>> `POSIX_SPAWN` launching mechanism (i.e.
>> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by
>> using `posix_spawn(3)` to firstly sta
71 matches
Mail list logo