From izmaelverhage at gmail.com Thu Feb 6 18:27:54 2020 From: izmaelverhage at gmail.com (Izmar) Date: Thu, 6 Feb 2020 19:27:54 +0100 Subject: Introduction Message-ID: Hey everyone, Today I received the great news that my OCA has been processed. I've already created a list of tickets that I find interesting. Once I get the hang of all processes involved in contributing, I would like to submit a feature proposal to add WASAPI support next to the existing DirectSound interface for the Windows hotspot, giving us lower latency audio. I started programming about 5 years ago at home, developing 2 Java desktop applications with a Swing UI. I rewrote one of those in C++ about 3 years ago. Since about a year and a half I'm a professional programmer, working with Kotlin, Java and Scala for a Dutch consultancy company called Lunatech. In my spare time I work on a React Native/Kotlin mobile app. I consider myself junior in most and medior in some respects, so guidance is highly appreciated. Cheers, Izmar From martijnverburg at gmail.com Fri Feb 7 01:31:10 2020 From: martijnverburg at gmail.com (Martijn Verburg) Date: Fri, 7 Feb 2020 14:31:10 +1300 Subject: Introduction In-Reply-To: References: Message-ID: Hi Izmar, Welcome to OpenJDK! https://openjdk.java.net/contribute/ is a good place to start :-). Cheers, Martijn On Fri, 7 Feb 2020 at 07:28, Izmar wrote: > Hey everyone, > > Today I received the great news that my OCA has been processed. > > I've already created a list of tickets that I find interesting. Once I get > the hang of all processes involved in contributing, I would like to submit > a feature proposal to add WASAPI support next to the existing DirectSound > interface for the Windows hotspot, giving us lower latency audio. > > I started programming about 5 years ago at home, developing 2 Java desktop > applications with a Swing UI. I rewrote one of those in C++ about 3 years > ago. > > Since about a year and a half I'm a professional programmer, working with > Kotlin, Java and Scala for a Dutch consultancy company called Lunatech. In > my spare time I work on a React Native/Kotlin mobile app. > > I consider myself junior in most and medior in some respects, so guidance > is highly appreciated. > > Cheers, > Izmar > From david.holmes at oracle.com Fri Feb 7 01:47:44 2020 From: david.holmes at oracle.com (David Holmes) Date: Fri, 7 Feb 2020 11:47:44 +1000 Subject: Introduction In-Reply-To: References: Message-ID: <45fa6252-6903-3ba7-b336-3c0b697d31af@oracle.com> Hi Izmar, Welcome to OpenJDK. On 7/02/2020 4:27 am, Izmar wrote: > Hey everyone, > > Today I received the great news that my OCA has been processed. > > I've already created a list of tickets that I find interesting. Once I get > the hang of all processes involved in contributing, I would like to submit > a feature proposal to add WASAPI support next to the existing DirectSound > interface for the Windows hotspot, giving us lower latency audio. sound-dev at openjdk.java.net would be the place to discuss that. Not sure that hotspot actually has any role to play there. Cheers, David > I started programming about 5 years ago at home, developing 2 Java desktop > applications with a Swing UI. I rewrote one of those in C++ about 3 years > ago. > > Since about a year and a half I'm a professional programmer, working with > Kotlin, Java and Scala for a Dutch consultancy company called Lunatech. In > my spare time I work on a React Native/Kotlin mobile app. > > I consider myself junior in most and medior in some respects, so guidance > is highly appreciated. > > Cheers, > Izmar > From lars.francke at gmail.com Fri Feb 7 09:31:06 2020 From: lars.francke at gmail.com (Lars Francke) Date: Fri, 7 Feb 2020 10:31:06 +0100 Subject: Code Conventions In-Reply-To: References: <87va0cqzzh.fsf@mid.deneb.enyo.de> <5fd33840-4b95-cdb9-bbee-1eb9d2340376@oracle.com> Message-ID: This is an old thread but it's still relevant. Is there any chance we can get Andreas' version published? It's been a DRAFT for years, there have been multiple discussions and I think he distilled most of them down into his current document. We can obviously keep discussing but there will always be differing opinions and we'll never update the old conventions. On Thu, Apr 11, 2019 at 3:47 PM Andreas Lundblad wrote: > That page has said "This section will contain a major revision of our > antiquated code conventions" like forever. We came far with that major > revision a couple of years ago. Latest draft available here: > > http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html > > I even have a version adapted to openjdk.java.net formatting. > > I suggest we take this over the finish line and get it published properly. > I > happen to have time to spare the coming weeks and am happy to contribute. > > -- Andreas > > On Thu, Apr 11, 2019 at 5:47 AM Dalibor Topic > wrote: > > > On 22.03.2019 17:13, Jean-Claude Arbaut wrote: > > > https://www.oracle.com/technetwork/java/codeconvtoc-136057.html > > > > Merci Jean-Claude, > > > > I updated the link accordingly. > > > > cheers, > > dalibor topic > > > > > Le jeu. 21 mars 2019 ? 11:33, Florian Weimer a > ?crit > > : > > > > > >> This page > > >> > > >> > > >> > > >> contains only a dead link to: > > >> > > >> > > >> > > >> Is this page archived somewhere? > > >> > > >> Right now, I'm particularly interested in formatting guidelines for > > >> exception messages. Should they begin with a capitable letter? Are > > >> there rules for producing certain clipped sentences? (Such a rule > > >> appears to exist for the first sentence in a method documentation.) > > >> > > > > -- > > Oracle > > Dalibor Topic | Principal Product Manager > > Phone: +494089091214 | Mobile: +491737185961 > > > > > > ORACLE Deutschland B.V. & Co. KG | K?hneh?fe 5 | D-22761 Hamburg > > > > ORACLE Deutschland B.V. & Co. KG > > Hauptverwaltung: Riesstr. 25, D-80992 M?nchen > > Registergericht: Amtsgericht M?nchen, HRA 95603 > > > > Komplement?rin: ORACLE Deutschland Verwaltung B.V. > > Hertogswetering 163/167, 3543 AS Utrecht, Niederlande > > Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697 > > Gesch?ftsf?hrer: Alexander van der Ven, Jan Schultheiss, Val Maher > > > > Green Oracle Oracle is committed to > > developing practices and products that help protect the environment > > > From jesper.wilhelmsson at oracle.com Fri Feb 7 15:52:57 2020 From: jesper.wilhelmsson at oracle.com (Jesper Wilhelmsson) Date: Fri, 7 Feb 2020 16:52:57 +0100 Subject: Code Conventions In-Reply-To: References: <87va0cqzzh.fsf@mid.deneb.enyo.de> <5fd33840-4b95-cdb9-bbee-1eb9d2340376@oracle.com> Message-ID: <79947A83-9933-4435-A8DD-C16EAAECC5F1@oracle.com> I have recently started to dig into The OpenJDK Developer's Guide. My goal is to have an OpenJDK project for the guide and start to add the missing information there. There is a section for code conventions in the guide. I think that once we have the project in place, that is the place to have a discussion around code conventions and finally have an updated version published in the guide. /Jesper > On 7 Feb 2020, at 10:31, Lars Francke wrote: > > This is an old thread but it's still relevant. > > Is there any chance we can get Andreas' version published? It's been a > DRAFT for years, there have been multiple discussions and I think he > distilled most of them down into his current document. > > We can obviously keep discussing but there will always be differing > opinions and we'll never update the old conventions. > > On Thu, Apr 11, 2019 at 3:47 PM Andreas Lundblad > wrote: > >> That page has said "This section will contain a major revision of our >> antiquated code conventions" like forever. We came far with that major >> revision a couple of years ago. Latest draft available here: >> >> http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html >> >> I even have a version adapted to openjdk.java.net formatting. >> >> I suggest we take this over the finish line and get it published properly. >> I >> happen to have time to spare the coming weeks and am happy to contribute. >> >> -- Andreas >> >> On Thu, Apr 11, 2019 at 5:47 AM Dalibor Topic >> wrote: >> >>> On 22.03.2019 17:13, Jean-Claude Arbaut wrote: >>>> https://www.oracle.com/technetwork/java/codeconvtoc-136057.html >>> >>> Merci Jean-Claude, >>> >>> I updated the link accordingly. >>> >>> cheers, >>> dalibor topic >>> >>>> Le jeu. 21 mars 2019 ? 11:33, Florian Weimer a >> ?crit >>> : >>>> >>>>> This page >>>>> >>>>> >>>>> >>>>> contains only a dead link to: >>>>> >>>>> >>>>> >>>>> Is this page archived somewhere? >>>>> >>>>> Right now, I'm particularly interested in formatting guidelines for >>>>> exception messages. Should they begin with a capitable letter? Are >>>>> there rules for producing certain clipped sentences? (Such a rule >>>>> appears to exist for the first sentence in a method documentation.) >>>>> >>> >>> -- >>> Oracle >>> Dalibor Topic | Principal Product Manager >>> Phone: +494089091214 | Mobile: +491737185961 >>> >>> >>> ORACLE Deutschland B.V. & Co. KG | K?hneh?fe 5 | D-22761 Hamburg >>> >>> ORACLE Deutschland B.V. & Co. KG >>> Hauptverwaltung: Riesstr. 25, D-80992 M?nchen >>> Registergericht: Amtsgericht M?nchen, HRA 95603 >>> >>> Komplement?rin: ORACLE Deutschland Verwaltung B.V. >>> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande >>> Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697 >>> Gesch?ftsf?hrer: Alexander van der Ven, Jan Schultheiss, Val Maher >>> >>> Green Oracle Oracle is committed to >>> developing practices and products that help protect the environment >>> >> From lars.francke at gmail.com Fri Feb 7 15:55:32 2020 From: lars.francke at gmail.com (Lars Francke) Date: Fri, 7 Feb 2020 16:55:32 +0100 Subject: Code Conventions In-Reply-To: <79947A83-9933-4435-A8DD-C16EAAECC5F1@oracle.com> References: <87va0cqzzh.fsf@mid.deneb.enyo.de> <5fd33840-4b95-cdb9-bbee-1eb9d2340376@oracle.com> <79947A83-9933-4435-A8DD-C16EAAECC5F1@oracle.com> Message-ID: Excellent! That'd be great. I'd be happy to follow along and contribute if needed/possible. What would be the best place for me to follow your project (or the road to your project)? On Fri, Feb 7, 2020 at 4:53 PM Jesper Wilhelmsson < jesper.wilhelmsson at oracle.com> wrote: > I have recently started to dig into The OpenJDK Developer's Guide. My goal > is to have an OpenJDK project for the guide and start to add the missing > information there. There is a section for code conventions in the guide. I > think that once we have the project in place, that is the place to have a > discussion around code conventions and finally have an updated version > published in the guide. > > /Jesper > > > On 7 Feb 2020, at 10:31, Lars Francke wrote: > > > > This is an old thread but it's still relevant. > > > > Is there any chance we can get Andreas' version published? It's been a > > DRAFT for years, there have been multiple discussions and I think he > > distilled most of them down into his current document. > > > > We can obviously keep discussing but there will always be differing > > opinions and we'll never update the old conventions. > > > > On Thu, Apr 11, 2019 at 3:47 PM Andreas Lundblad < > andreas.lundblad at gmail.com> > > wrote: > > > >> That page has said "This section will contain a major revision of our > >> antiquated code conventions" like forever. We came far with that major > >> revision a couple of years ago. Latest draft available here: > >> > >> http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html > >> > >> I even have a version adapted to openjdk.java.net formatting. > >> > >> I suggest we take this over the finish line and get it published > properly. > >> I > >> happen to have time to spare the coming weeks and am happy to > contribute. > >> > >> -- Andreas > >> > >> On Thu, Apr 11, 2019 at 5:47 AM Dalibor Topic > > >> wrote: > >> > >>> On 22.03.2019 17:13, Jean-Claude Arbaut wrote: > >>>> https://www.oracle.com/technetwork/java/codeconvtoc-136057.html > >>> > >>> Merci Jean-Claude, > >>> > >>> I updated the link accordingly. > >>> > >>> cheers, > >>> dalibor topic > >>> > >>>> Le jeu. 21 mars 2019 ? 11:33, Florian Weimer a > >> ?crit > >>> : > >>>> > >>>>> This page > >>>>> > >>>>> > >>>>> > >>>>> contains only a dead link to: > >>>>> > >>>>> > >>>>> > >>>>> Is this page archived somewhere? > >>>>> > >>>>> Right now, I'm particularly interested in formatting guidelines for > >>>>> exception messages. Should they begin with a capitable letter? Are > >>>>> there rules for producing certain clipped sentences? (Such a rule > >>>>> appears to exist for the first sentence in a method documentation.) > >>>>> > >>> > >>> -- > >>> Oracle > >>> Dalibor Topic | Principal Product Manager > >>> Phone: +494089091214 | Mobile: +491737185961 > >>> > >>> > >>> ORACLE Deutschland B.V. & Co. KG | K?hneh?fe 5 | D-22761 Hamburg > >>> > >>> ORACLE Deutschland B.V. & Co. KG > >>> Hauptverwaltung: Riesstr. 25, D-80992 M?nchen > >>> Registergericht: Amtsgericht M?nchen, HRA 95603 > >>> > >>> Komplement?rin: ORACLE Deutschland Verwaltung B.V. > >>> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande > >>> Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697 > >>> Gesch?ftsf?hrer: Alexander van der Ven, Jan Schultheiss, Val Maher > >>> > >>> Green Oracle Oracle is committed to > >>> developing practices and products that help protect the environment > >>> > >> > > From jesper.wilhelmsson at oracle.com Fri Feb 7 16:09:19 2020 From: jesper.wilhelmsson at oracle.com (Jesper Wilhelmsson) Date: Fri, 7 Feb 2020 17:09:19 +0100 Subject: Code Conventions In-Reply-To: References: <87va0cqzzh.fsf@mid.deneb.enyo.de> <5fd33840-4b95-cdb9-bbee-1eb9d2340376@oracle.com> <79947A83-9933-4435-A8DD-C16EAAECC5F1@oracle.com> Message-ID: Once the project is proposed at announce at openjdk.java.net there will be a vote and from there the discussion will be in the public mailing lists. Provided the project is accepted a mailing list for it will be created and then the work begins :-) A big leap forward in this work was taken earlier this week and I'm currently waiting for the dust to settle after JFocus before having internal discussions with the current owners of the guide. /Jesper > On 7 Feb 2020, at 16:55, Lars Francke wrote: > > Excellent! That'd be great. > I'd be happy to follow along and contribute if needed/possible. What would be the best place for me to follow your project (or the road to your project)? > > On Fri, Feb 7, 2020 at 4:53 PM Jesper Wilhelmsson > wrote: > I have recently started to dig into The OpenJDK Developer's Guide. My goal is to have an OpenJDK project for the guide and start to add the missing information there. There is a section for code conventions in the guide. I think that once we have the project in place, that is the place to have a discussion around code conventions and finally have an updated version published in the guide. > > /Jesper > > > On 7 Feb 2020, at 10:31, Lars Francke > wrote: > > > > This is an old thread but it's still relevant. > > > > Is there any chance we can get Andreas' version published? It's been a > > DRAFT for years, there have been multiple discussions and I think he > > distilled most of them down into his current document. > > > > We can obviously keep discussing but there will always be differing > > opinions and we'll never update the old conventions. > > > > On Thu, Apr 11, 2019 at 3:47 PM Andreas Lundblad > > > wrote: > > > >> That page has said "This section will contain a major revision of our > >> antiquated code conventions" like forever. We came far with that major > >> revision a couple of years ago. Latest draft available here: > >> > >> http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html > >> > >> I even have a version adapted to openjdk.java.net formatting. > >> > >> I suggest we take this over the finish line and get it published properly. > >> I > >> happen to have time to spare the coming weeks and am happy to contribute. > >> > >> -- Andreas > >> > >> On Thu, Apr 11, 2019 at 5:47 AM Dalibor Topic > > >> wrote: > >> > >>> On 22.03.2019 17:13, Jean-Claude Arbaut wrote: > >>>> https://www.oracle.com/technetwork/java/codeconvtoc-136057.html > >>> > >>> Merci Jean-Claude, > >>> > >>> I updated the link accordingly. > >>> > >>> cheers, > >>> dalibor topic > >>> > >>>> Le jeu. 21 mars 2019 ? 11:33, Florian Weimer > a > >> ?crit > >>> : > >>>> > >>>>> This page > >>>>> > >>>>> > > >>>>> > >>>>> contains only a dead link to: > >>>>> > >>>>> > > >>>>> > >>>>> Is this page archived somewhere? > >>>>> > >>>>> Right now, I'm particularly interested in formatting guidelines for > >>>>> exception messages. Should they begin with a capitable letter? Are > >>>>> there rules for producing certain clipped sentences? (Such a rule > >>>>> appears to exist for the first sentence in a method documentation.) > >>>>> > >>> > >>> -- > >>> Oracle > > >>> Dalibor Topic | Principal Product Manager > >>> Phone: +494089091214 | Mobile: +491737185961 > >>> > >>> > >>> ORACLE Deutschland B.V. & Co. KG | K?hneh?fe 5 | D-22761 Hamburg > >>> > >>> ORACLE Deutschland B.V. & Co. KG > >>> Hauptverwaltung: Riesstr. 25, D-80992 M?nchen > >>> Registergericht: Amtsgericht M?nchen, HRA 95603 > >>> > >>> Komplement?rin: ORACLE Deutschland Verwaltung B.V. > >>> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande > >>> Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697 > >>> Gesch?ftsf?hrer: Alexander van der Ven, Jan Schultheiss, Val Maher > >>> > >>> Green Oracle > Oracle is committed to > >>> developing practices and products that help protect the environment > >>> > >> > From lars.francke at gmail.com Fri Feb 7 18:26:49 2020 From: lars.francke at gmail.com (Lars Francke) Date: Fri, 7 Feb 2020 19:26:49 +0100 Subject: Code Conventions In-Reply-To: References: <87va0cqzzh.fsf@mid.deneb.enyo.de> <5fd33840-4b95-cdb9-bbee-1eb9d2340376@oracle.com> <79947A83-9933-4435-A8DD-C16EAAECC5F1@oracle.com> Message-ID: Great, I'll try to keep my eyes open. On Fri, Feb 7, 2020 at 5:09 PM Jesper Wilhelmsson < jesper.wilhelmsson at oracle.com> wrote: > Once the project is proposed at announce at openjdk.java.net there will be a > vote and from there the discussion will be in the public mailing lists. > Provided the project is accepted a mailing list for it will be created and > then the work begins :-) > > A big leap forward in this work was taken earlier this week and I'm > currently waiting for the dust to settle after JFocus before having > internal discussions with the current owners of the guide. > /Jesper > > > On 7 Feb 2020, at 16:55, Lars Francke wrote: > > Excellent! That'd be great. > I'd be happy to follow along and contribute if needed/possible. What would > be the best place for me to follow your project (or the road to your > project)? > > On Fri, Feb 7, 2020 at 4:53 PM Jesper Wilhelmsson < > jesper.wilhelmsson at oracle.com> wrote: > >> I have recently started to dig into The OpenJDK Developer's Guide. My >> goal is to have an OpenJDK project for the guide and start to add the >> missing information there. There is a section for code conventions in the >> guide. I think that once we have the project in place, that is the place to >> have a discussion around code conventions and finally have an updated >> version published in the guide. >> >> /Jesper >> >> > On 7 Feb 2020, at 10:31, Lars Francke wrote: >> > >> > This is an old thread but it's still relevant. >> > >> > Is there any chance we can get Andreas' version published? It's been a >> > DRAFT for years, there have been multiple discussions and I think he >> > distilled most of them down into his current document. >> > >> > We can obviously keep discussing but there will always be differing >> > opinions and we'll never update the old conventions. >> > >> > On Thu, Apr 11, 2019 at 3:47 PM Andreas Lundblad < >> andreas.lundblad at gmail.com> >> > wrote: >> > >> >> That page has said "This section will contain a major revision of our >> >> antiquated code conventions" like forever. We came far with that major >> >> revision a couple of years ago. Latest draft available here: >> >> >> >> http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html >> >> >> >> I even have a version adapted to openjdk.java.net formatting. >> >> >> >> I suggest we take this over the finish line and get it published >> properly. >> >> I >> >> happen to have time to spare the coming weeks and am happy to >> contribute. >> >> >> >> -- Andreas >> >> >> >> On Thu, Apr 11, 2019 at 5:47 AM Dalibor Topic < >> dalibor.topic at oracle.com> >> >> wrote: >> >> >> >>> On 22.03.2019 17:13, Jean-Claude Arbaut wrote: >> >>>> https://www.oracle.com/technetwork/java/codeconvtoc-136057.html >> >>> >> >>> Merci Jean-Claude, >> >>> >> >>> I updated the link accordingly. >> >>> >> >>> cheers, >> >>> dalibor topic >> >>> >> >>>> Le jeu. 21 mars 2019 ? 11:33, Florian Weimer a >> >> ?crit >> >>> : >> >>>> >> >>>>> This page >> >>>>> >> >>>>> >> >>>>> >> >>>>> contains only a dead link to: >> >>>>> >> >>>>> >> >>>>> >> >>>>> Is this page archived somewhere? >> >>>>> >> >>>>> Right now, I'm particularly interested in formatting guidelines for >> >>>>> exception messages. Should they begin with a capitable letter? Are >> >>>>> there rules for producing certain clipped sentences? (Such a rule >> >>>>> appears to exist for the first sentence in a method documentation.) >> >>>>> >> >>> >> >>> -- >> >>> Oracle >> >>> Dalibor Topic | Principal Product Manager >> >>> Phone: +494089091214 > | Mobile: >> +491737185961 >> >>> > >> >>> >> >>> ORACLE Deutschland B.V. & Co. KG | K?hneh?fe 5 | D-22761 Hamburg >> >>> >> >>> ORACLE Deutschland B.V. & Co. KG >> >>> Hauptverwaltung: Riesstr. 25, D-80992 M?nchen >> >>> Registergericht: Amtsgericht M?nchen, HRA 95603 >> >>> >> >>> Komplement?rin: ORACLE Deutschland Verwaltung B.V. >> >>> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande >> >>> Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697 >> >>> Gesch?ftsf?hrer: Alexander van der Ven, Jan Schultheiss, Val Maher >> >>> >> >>> Green Oracle Oracle is committed >> to >> >>> developing practices and products that help protect the environment >> >>> >> >> >> >> > From peterhull90 at gmail.com Sat Feb 15 12:52:01 2020 From: peterhull90 at gmail.com (Peter Hull) Date: Sat, 15 Feb 2020 12:52:01 +0000 Subject: JVMTI ClassFileLoadHook Message-ID: In the JVM Tool Interface there is an event for Class File Loading. In the docs (https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#ClassFileLoadHook) it says that the 'name' parameter can be NULL"if the class is defined with a NULL name or without a name specified". Under what circumstances can the class be defined like this? I am asking because, when using the Netbeans profiler and JDK 1.8 I see a load of lines in the log like Profiler Agent Warning: JVMTI classLoadHook: class name is null. and I am wondering - does the user need to know this? or should the profiler be doing something with these classes? Thanks, Peter From Alan.Bateman at oracle.com Sun Feb 16 08:47:53 2020 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Sun, 16 Feb 2020 08:47:53 +0000 Subject: JVMTI ClassFileLoadHook In-Reply-To: References: Message-ID: <58e36e89-7971-7e94-bfa3-4ec29066dab4@oracle.com> On 15/02/2020 12:52, Peter Hull wrote: > In the JVM Tool Interface there is an event for Class File Loading. In > the docs (https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#ClassFileLoadHook) > it says that the 'name' parameter can be NULL"if the class is defined > with a NULL name or without a name specified". Under what > circumstances can the class be defined like this? The class name may not be known in advance when presenting a class file to the VM. Skim through the defineClass methods that ClassLoader specified for examples. If the name is provided then the agent's CFLH needs to be defensive as it can't trust it for the class load (class_being_redefined == NULL) case. Best to follow-up on serviceability-dev if there are issues. -Alan. From peterhull90 at gmail.com Thu Feb 20 09:30:08 2020 From: peterhull90 at gmail.com (Peter Hull) Date: Thu, 20 Feb 2020 09:30:08 +0000 Subject: JVMTI ClassFileLoadHook In-Reply-To: <58e36e89-7971-7e94-bfa3-4ec29066dab4@oracle.com> References: <58e36e89-7971-7e94-bfa3-4ec29066dab4@oracle.com> Message-ID: Thanks both. I see the docs for ClassLoader explicitly say that the name parameter for defineClass is "The expected binary name of the class, or null if not known" so that does make sense now. Peter From andrucu at gmail.com Wed Feb 26 15:51:50 2020 From: andrucu at gmail.com (Andra Bennett) Date: Wed, 26 Feb 2020 10:51:50 -0500 Subject: Java 8 - pkcs11 threads hanging Message-ID: Hello, I am looking for some guidance on explaining a JDK 8 upgrade fixing a troubling pkcs11-related behavior in our application. I apologize for verbosity, any insight would be much appreciated. Our application has upgraded from Open JDK 8 191 to JDK 8 232 and one of the issues we were previously seeing - namely threads locking up in our application when creating message signatures in a multithreaded environment using Sun PKCS11 provider - has been mitigated. We know javax.crypto.Mac is no thread safe so we always created a new instance. However, at a certain thread count our application would just freeze (easily reproducible in a more focused unit test). We would like to see if there was a set of changes that would have targeted pkcs11 threads hanging on PKCS11 create/destroy object threads, e.g. sun.security.pkcs11.wrapper.PKCS11.C_DestroyObject(Native Method) sun.security.pkcs11.SessionKeyRef.dispose(P11Key.java:1138) sun.security.pkcs11.SessionKeyRef.drainRefQueueBounded(P11Key.java:1114) sun.security.pkcs11.SessionKeyRef.(P11Key.java:1129) sun.security.pkcs11.P11Key.(P11Key.java:119) sun.security.pkcs11.P11Key$P11SecretKey.(P11Key.java:405) sun.security.pkcs11.P11Key.secretKey(P11Key.java:292) sun.security.pkcs11.P11SecretKeyFactory.createKey(P11SecretKeyFactory.java:267) sun.security.pkcs11.P11SecretKeyFactory.convertKey(P11SecretKeyFactory.java:175) sun.security.pkcs11.P11SecretKeyFactory.convertKey(P11SecretKeyFactory.java:111) sun.security.pkcs11.P11Mac.engineInit(P11Mac.java:206) javax.crypto.Mac.chooseProvider(Mac.java:350) We searched the Open JDK JIRAs at https://bugs.openjdk.java.net/projects/JDK/issues with filter "project = JDK and fixVersion ~ "8u*" and summary ~ "pkcs11"" but could not find any relevant issues being addressed. Also searched for javax.crypto changes for 8u versions but even less changes were related to that. We haven't identified an actual JDK bug filed with this issue, except a RedHat bug originating the pkcs11 execution in an SSL handshake: https://access.redhat.com/solutions/312503 Thank you in advance, Andra From shade at redhat.com Wed Feb 26 16:12:56 2020 From: shade at redhat.com (Aleksey Shipilev) Date: Wed, 26 Feb 2020 17:12:56 +0100 Subject: Java 8 - pkcs11 threads hanging In-Reply-To: References: Message-ID: <63feb83a-b6b8-d7b2-93b2-a4a107523aea@redhat.com> On 2/26/20 4:51 PM, Andra Bennett wrote: > Our application has upgraded from Open JDK 8 191 to JDK 8 232 and one of > the issues we were previously seeing - namely threads locking up in our > application when creating message signatures in a multithreaded environment > using Sun PKCS11 provider - has been mitigated. > > We know javax.crypto.Mac is no thread safe so we always created a new > instance. However, at a certain thread count our application would just > freeze (easily reproducible in a more focused unit test). Have you posted that reproducer somewhere? > We would like to see if there was a set of changes that would have targeted > pkcs11 threads hanging on PKCS11 create/destroy object threads, e.g. > > sun.security.pkcs11.wrapper.PKCS11.C_DestroyObject(Native Method) > sun.security.pkcs11.SessionKeyRef.dispose(P11Key.java:1138) > sun.security.pkcs11.SessionKeyRef.drainRefQueueBounded(P11Key.java:1114) > sun.security.pkcs11.SessionKeyRef.(P11Key.java:1129) > sun.security.pkcs11.P11Key.(P11Key.java:119) > sun.security.pkcs11.P11Key$P11SecretKey.(P11Key.java:405) > sun.security.pkcs11.P11Key.secretKey(P11Key.java:292) > sun.security.pkcs11.P11SecretKeyFactory.createKey(P11SecretKeyFactory.java:267) > sun.security.pkcs11.P11SecretKeyFactory.convertKey(P11SecretKeyFactory.java:175) > sun.security.pkcs11.P11SecretKeyFactory.convertKey(P11SecretKeyFactory.java:111) > sun.security.pkcs11.P11Mac.engineInit(P11Mac.java:206) > javax.crypto.Mac.chooseProvider(Mac.java:350) These are PKCS11-related fixes in OpenJDK 8u: https://bugs.openjdk.java.net/browse/JDK-8220513 https://bugs.openjdk.java.net/browse/JDK-8216597 https://bugs.openjdk.java.net/browse/JDK-6913047 -- Thanks, -Aleksey