Re: RFR: 8289643: File descriptor leak with ProcessBuilder.startPipeline [v4]

2022-07-11 Thread Jaikiran Pai
On Mon, 11 Jul 2022 15:31:46 GMT, Roger Riggs wrote: >> The `ProcessBuilder.pipelineStart()` implementation does not close all of >> the file descriptors it uses to create the pipeline of processes. >> >> The process calling `pipelineStart()` is creating the pipes between the >> stages. >> As

Re: RFR: 8289643: File descriptor leak with ProcessBuilder.startPipeline [v4]

2022-07-11 Thread Jaikiran Pai
On Mon, 11 Jul 2022 15:31:46 GMT, Roger Riggs wrote: >> The `ProcessBuilder.pipelineStart()` implementation does not close all of >> the file descriptors it uses to create the pipeline of processes. >> >> The process calling `pipelineStart()` is creating the pipes between the >> stages. >> As

Re: [jdk19] RFR: 8288850: SegmentAllocator:allocate() can return null some cases

2022-07-11 Thread Paul Sandoz
On Mon, 11 Jul 2022 15:05:34 GMT, Maurizio Cimadamore wrote: > This patch fixes an issue where the arena allocator does not detect an > overflow when attempting to allocate a new slice. Marked as reviewed by psandoz (Reviewer). - PR: https://git.openjdk.org/jdk19/pull/133

Re: [jdk19] RFR: 8289365: SegmentAllocator:allocateArray(MemoryLayout, count) does not throw IAEx when count is -1

2022-07-11 Thread Paul Sandoz
On Mon, 11 Jul 2022 14:45:42 GMT, Maurizio Cimadamore wrote: > The default implementation for `SegmentAllocator:allocateArray(MemoryLayout, > count)` is missing a check for negative array size. > In the past this used to be caught in the `SequenceLayout` factory, but not > anymore, as now

Re: [jdk19] RFR: 8290071: Javadoc for MemorySegment/MemoryAddress getter/setters contains some typos

2022-07-11 Thread Paul Sandoz
On Mon, 11 Jul 2022 09:46:11 GMT, Maurizio Cimadamore wrote: > Some of the accessors in `MemorySegment` and `MemoryAddress` (esp. setters) > have typos - e.g. they use `from` instead of `into`. > > I've tried to simplify the text and made it more regular. Marked as reviewed by psandoz

Re: RFR: JDK-8289106: Add model of class file versions to core reflection [v2]

2022-07-11 Thread Mandy Chung
On Wed, 29 Jun 2022 21:32:29 GMT, Joe Darcy wrote: >> JDK-8289106: Add model of class file versions to core reflection > > Joe Darcy has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the

[jdk19] Integrated: 8287902: UnreadableRB case in MissingResourceCauseTest is not working reliably on Windows

2022-07-11 Thread Christoph Langer
On Mon, 11 Jul 2022 15:07:28 GMT, Christoph Langer wrote: > Hi all, > > This pull request contains a backport of > [JDK-8287902](https://bugs.openjdk.org/browse/JDK-8287902), commit > [975316e3](https://github.com/openjdk/jdk/commit/975316e3e5f1208e4e15eadc2493d25c15554647) > from the

Re: RFR: 8289643: File descriptor leak with ProcessBuilder.startPipeline [v4]

2022-07-11 Thread Alan Bateman
On Mon, 11 Jul 2022 15:31:46 GMT, Roger Riggs wrote: >> The `ProcessBuilder.pipelineStart()` implementation does not close all of >> the file descriptors it uses to create the pipeline of processes. >> >> The process calling `pipelineStart()` is creating the pipes between the >> stages. >> As

Integrated: Merge jdk19

2022-07-11 Thread Jesper Wilhelmsson
On Mon, 11 Jul 2022 12:38:11 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 19 -> JDK 20 This pull request has now been integrated. Changeset: c79baaa8 Author:Jesper Wilhelmsson URL: https://git.openjdk.org/jdk/commit/c79baaa811971c43fbdbc251482d0e40903588cc Stats: 411 lines

Re: RFR: 8289643: File descriptor leak with ProcessBuilder.startPipeline [v4]

2022-07-11 Thread Roger Riggs
> The `ProcessBuilder.pipelineStart()` implementation does not close all of the > file descriptors it uses to create the pipeline of processes. > > The process calling `pipelineStart()` is creating the pipes between the > stages. > As each process is launched, the file descriptor is inherited

[jdk19] RFR: 8287902: UnreadableRB case in MissingResourceCauseTest is not working reliably on Windows

2022-07-11 Thread Christoph Langer
Hi all, This pull request contains a backport of [JDK-8287902](https://bugs.openjdk.org/browse/JDK-8287902), commit [975316e3](https://github.com/openjdk/jdk/commit/975316e3e5f1208e4e15eadc2493d25c15554647) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being

[jdk19] Withdrawn: 8288697: Clarify lifecycle of buffer segments and loader lookup

2022-07-11 Thread Maurizio Cimadamore
On Fri, 17 Jun 2022 21:39:16 GMT, Maurizio Cimadamore wrote: > This is a dependent PR containing a cleanup of the so called *heap sessions*. > Heap sessions are used in two cases: > > * when a buffer segment is created, to keep the original buffer instance > reachable > * when a loader

Re: [jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM [v4]

2022-07-11 Thread Jorn Vernee
> This patch changes all VaList implementations to throw > `NoSuchElementException` when out of bounds reads occur on a VaList that is > created using the Java builder API. The docs are updated accordingly. > > For VaLists that are created from native addresses, we don't know their > bounds,

[jdk19] RFR: 8288850: SegmentAllocator:allocate() can return null some cases

2022-07-11 Thread Maurizio Cimadamore
This patch fixes an issue where the arena allocator does not detect an overflow when attempting to allocate a new slice. - Commit messages: - Initial push Changes: https://git.openjdk.org/jdk19/pull/133/files Webrev: https://webrevs.openjdk.org/?repo=jdk19=133=00 Issue:

Re: [JMH results for IndexedLinkedList]

2022-07-11 Thread Jens Lideström
I think you are coming at this in the wrong way, Rodion. I am not a JDK contributor, but these are my thoughts on how this works. The people that are responsible for the Java collections framework are well aware of the existence of alternative data structures such as finger trees. There are

Re: RFR: 8066859: java/lang/ref/OOMEInReferenceHandler.java failed with java.lang.Exception: Reference Handler thread died

2022-07-11 Thread Doug Lea
On Mon, 11 Jul 2022 04:10:49 GMT, David Holmes wrote: >> 8066859 : java/lang/ref/OOMEInReferenceHandler.java failed with >> java.lang.Exception: Reference Handler thread died > > src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java > line 296: > >> 294:

Re: RFR: 8289643: File descriptor leak with ProcessBuilder.startPipeline [v2]

2022-07-11 Thread Roger Riggs
On Sat, 9 Jul 2022 02:43:55 GMT, David Schlosnagle wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Cleanup of PipelineLeaksFD test improving error messages and source >> cleanup. > >

Re: RFR: 8066859: java/lang/ref/OOMEInReferenceHandler.java failed with java.lang.Exception: Reference Handler thread died

2022-07-11 Thread David Holmes
On Mon, 11 Jul 2022 04:16:44 GMT, David Holmes wrote: >> 8066859 : java/lang/ref/OOMEInReferenceHandler.java failed with >> java.lang.Exception: Reference Handler thread died > > src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java line > 463: > >> 461: * Preallocated

Re: RFR: 8066859: java/lang/ref/OOMEInReferenceHandler.java failed with java.lang.Exception: Reference Handler thread died

2022-07-11 Thread David Holmes
On Fri, 8 Jul 2022 11:44:53 GMT, Doug Lea wrote: > 8066859 : java/lang/ref/OOMEInReferenceHandler.java failed with > java.lang.Exception: Reference Handler thread died src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java line 296: > 294: byte

Re: RFR: 8066859: java/lang/ref/OOMEInReferenceHandler.java failed with java.lang.Exception: Reference Handler thread died

2022-07-11 Thread Alan Bateman
On Fri, 8 Jul 2022 22:42:28 GMT, Doug Lea wrote: > I keep trying but failing to change commit message to something jcheck likes? There should be an "Edit" button in the top right that allows you to edit the title and change it to "8066859 : java/lang/ref/OOMEInReferenceHandler.java failed

Re: RFR: 8289643: File descriptor leak with ProcessBuilder.startPipeline [v3]

2022-07-11 Thread Roger Riggs
> The `ProcessBuilder.pipelineStart()` implementation does not close all of the > file descriptors it uses to create the pipeline of processes. > > The process calling `pipelineStart()` is creating the pipes between the > stages. > As each process is launched, the file descriptor is inherited

RFR: 8066859: java/lang/ref/OOMEInReferenceHandler.java failed with java.lang.Exception: Reference Handler thread died

2022-07-11 Thread Doug Lea
8066859 : java/lang/ref/OOMEInReferenceHandler.java failed with java.lang.Exception: Reference Handler thread died - Commit messages: - Also update Xcomp problem list - Merge branch 'master' of https://git.openjdk.org/jdk into JDK-8066859 - Address review comments - Disable

Re: RFR: 8066859: java/lang/ref/OOMEInReferenceHandler.java failed with java.lang.Exception: Reference Handler thread died

2022-07-11 Thread Doug Lea
On Fri, 8 Jul 2022 11:44:53 GMT, Doug Lea wrote: > 8066859 : java/lang/ref/OOMEInReferenceHandler.java failed with > java.lang.Exception: Reference Handler thread died Thanks to @AlanBateman for suggesting to disable possibly misleading stack traces in pre-allocated exceptions; now updated I

[jdk19] RFR: 8289365: SegmentAllocator:allocateArray(MemoryLayout, count) does not throw IAEx when count is -1

2022-07-11 Thread Maurizio Cimadamore
The default implementation for `SegmentAllocator:allocateArray(MemoryLayout, count)` is missing a check for negative array size. In the past this used to be caught in the `SequenceLayout` factory, but not anymore, as now `SequenceLayout` accepts `-1` as special size where the sequence element

Re: [jdk19] RFR: 8288697: Clarify lifecycle of buffer segments and loader lookup [v2]

2022-07-11 Thread Maurizio Cimadamore
> This is a dependent PR containing a cleanup of the so called *heap sessions*. > Heap sessions are used in two cases: > > * when a buffer segment is created, to keep the original buffer instance > reachable > * when a loader symbol lookup is created, to keep the classloader instance >

[jdk19] Integrated: 8287809: Revisit implementation of memory session

2022-07-11 Thread Maurizio Cimadamore
On Wed, 15 Jun 2022 18:06:44 GMT, Maurizio Cimadamore wrote: > This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 This pull request has now been integrated. Changeset: fed3af8a Author:Maurizio Cimadamore URL:

RFR: 8290079: Reduce interaction with volatile in static initializer of BigInteger

2022-07-11 Thread Сергей Цыпанов
`BigInteger.powerCache` is volatile and should be assigned only once in static initializer. - Commit messages: - 8290079: Reduce interaction with volatile in static initializer of BigInteger Changes: https://git.openjdk.org/jdk/pull/9451/files Webrev:

RFR: Merge jdk19

2022-07-11 Thread Jesper Wilhelmsson
Forwardport JDK 19 -> JDK 20 - Commit messages: - Merge - 8290004: [PPC64] JfrGetCallTrace: assert(_pc != nullptr) failed: must have PC - 8289692: JFR: Thread checkpoint no longer enforce mutual exclusion post Loom integration - 8289894: A NullPointerException thrown from guard

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v3]

2022-07-11 Thread Сергей Цыпанов
On Mon, 11 Jul 2022 08:02:43 GMT, Сергей Цыпанов wrote: >> The new constructor looks very odd, especially when it does not have an >> explanation and doesn't describe the required preconditions for calling it. >> Is there a better way than adding a non-functional argument? >> The "unused"

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v3]

2022-07-11 Thread Сергей Цыпанов
> We can skip bounds check and null check for Charset in case we use the array > entirely and the Charset is either default one or proven to be non-null. > > Benchmark results: > > before > > Benchmark Mode Cnt Score > Error Units >

Re: JMH results for IndexedLinkedList

2022-07-11 Thread Maurizio Cimadamore
ConcurrentLinkedDeque was tested and it has similar thoughput to what we use, slightly higher memory footprint per element added, so we opted against it (but might re-eval in the future). In the specific case of the FFM API, it is not uncommon to have a session with just 1-2 resources

Re: JMH results for IndexedLinkedList

2022-07-11 Thread John Hendrikx
I'm curious, why isn't ArrayDeque or ConcurrentLinkedDeque used instead? Or is there another requirement? ArrayDeque has amortized O(1) for inserts at head and tail (and faster and more memory efficient than LinkedList as it doesn't use nodes). ConcurrentLinkedDeque would be useful in the

Re: [jdk19] RFR: 8290071: Javadoc for MemorySegment/MemoryAddress getter/setters contains some typos

2022-07-11 Thread Uwe Schindler
On Mon, 11 Jul 2022 09:46:11 GMT, Maurizio Cimadamore wrote: > Some of the accessors in `MemorySegment` and `MemoryAddress` (esp. setters) > have typos - e.g. they use `from` instead of `into`. > > I've tried to simplify the text and made it more regular. Marked as reviewed by uschindler

Re: JMH results for IndexedLinkedList

2022-07-11 Thread Maurizio Cimadamore
The implementation of the Foreign Function & Memory API uses an internal custom linked list to add native resources to a "memory session" abstraction (things that need to be cleaned up at a later point). Linked list is quite critical in our use case because we need something that has a very

[jdk19] RFR: 8290071: Javadoc for MemorySegment/MemoryAddress getter/setters contains some typos

2022-07-11 Thread Maurizio Cimadamore
Some of the accessors in `MemorySegment` and `MemoryAddress` (esp. setters) have typos - e.g. they use `from` instead of `into`. I've tried to simplify the text and made it more regular. - Commit messages: - Initial push Changes: https://git.openjdk.org/jdk19/pull/131/files

Re: RFR: 8289711: Add container configuration data to mbeans [v2]

2022-07-11 Thread Alan Bateman
On Wed, 6 Jul 2022 05:59:21 GMT, Alan Bateman wrote: >> xpbob has updated the pull request incrementally with one additional commit >> since the last revision: >> >> update header > > It's not clear that introducing this as a standard API is the right thing to > do. Are you 100% confident

Re: RFR: 8289711: Add container configuration data to mbeans [v2]

2022-07-11 Thread Severin Gehwolf
On Wed, 6 Jul 2022 05:59:21 GMT, Alan Bateman wrote: >> xpbob has updated the pull request incrementally with one additional commit >> since the last revision: >> >> update header > > It's not clear that introducing this as a standard API is the right thing to > do. Are you 100% confident

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-11 Thread Chris Hegarty
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v2]

2022-07-11 Thread Сергей Цыпанов
On Fri, 8 Jul 2022 14:04:14 GMT, Roger Riggs wrote: >> But if I roll back the added constructor I'll go through existing public one >> `public String(byte[] bytes, int offset, int length, Charset charset)` doing >> bounds check twice, won't I? > > The new constructor looks very odd, especially

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v2]

2022-07-11 Thread Сергей Цыпанов
> We can skip bounds check and null check for Charset in case we use the array > entirely and the Charset is either default one or proven to be non-null. > > Benchmark results: > > before > > Benchmark Mode Cnt Score > Error Units >

Re: RFR: 8289768: Clean up unused code [v3]

2022-07-11 Thread Michael McMahon
On Fri, 8 Jul 2022 07:08:46 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings