Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
On Tue, 5 Jan 2021 03:19:51 GMT, Ioi Lam wrote: > > Given that this seems to be a common problem in our code, and likely a very > > very old problem at that, why has it never been reported before? I'm not > > questioning the fix except to the extent that I'm questioning our > > understanding o

Re: RFR: 8259067: bootclasspath append takes out object lock [v2]

2021-01-04 Thread Coleen Phillimore
On Tue, 5 Jan 2021 02:03:42 GMT, Serguei Spitsyn wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Simplify with a Mutex. > > Hi Coleen, > > LGTM++ > > Thanks, > Serguei Thanks Serguei. Ioi convinced me offl

Re: RFR: 8259067: bootclasspath append takes out object lock [v2]

2021-01-04 Thread Coleen Phillimore
> See CR for details. > I made the classpath append list lock-free. Calling experts in Atomic > operations... > Tested with tier1-6. > Thanks, > Coleen Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision: Simplify with a Mutex. ---

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Ioi Lam
On Tue, 5 Jan 2021 03:07:49 GMT, Chris Plummer wrote: > Given that this seems to be a common problem in our code, and likely a very > very old problem at that, why has it never been reported before? I'm not > questioning the fix except to the extent that I'm questioning our > understanding of

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Chris Plummer
On Tue, 5 Jan 2021 02:40:29 GMT, Yasumasa Suenaga wrote: >> Marked as reviewed by iklam (Reviewer). > > @iklam Thanks for your review! > >> I looked at a cases in the JDK code where >> `Java_sun_security_pkcs11_wrapper_PKCS11_connect()` calls `FormatMessage()`. >> It eventually passes the `cha

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
On Tue, 5 Jan 2021 02:19:37 GMT, Ioi Lam wrote: >> I got garbled exception message as following when I run `livenmethods` >> CLHSDB command: >> >> sun.jvm.hotspot.debugger.DebuggerException : ?w???W >> >> My Windows laptop is set Japanese Locale, garbled message was written in >> Japanese

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Ioi Lam
On Tue, 5 Jan 2021 01:31:28 GMT, Chris Plummer wrote: > > jdk.hotspot.agent do not have `FormatMessage()` call in other place. > > Did you say about whole JDK code? I haven't checked all of them, but some > > code (e.g. net_util_md.c) uses `JNU_ThrowByName()` which is provided by > > java.dll.

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Ioi Lam
On Mon, 4 Jan 2021 09:25:55 GMT, Yasumasa Suenaga wrote: > I got garbled exception message as following when I run `livenmethods` CLHSDB > command: > > sun.jvm.hotspot.debugger.DebuggerException : ?w???W > > My Windows laptop is set Japanese Locale, garbled message was written in > Japane

Re: RFR: 8259067: bootclasspath append takes out object lock

2021-01-04 Thread Serguei Spitsyn
On Mon, 4 Jan 2021 17:28:30 GMT, Coleen Phillimore wrote: > See CR for details. > I made the classpath append list lock-free. Calling experts in Atomic > operations... > Tested with tier1-6. > Thanks, > Coleen Hi Coleen, LGTM++ Thanks, Serguei - Marked as reviewed by sspitsyn (

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
On Tue, 5 Jan 2021 01:30:07 GMT, Ioi Lam wrote: > Now the saproc DLL has an external reference to getLastErrorString, > JNU_NewStringPlatform and JNU_NewObjectByName on all platforms. Do we need to > modify the makefiles for platforms other than Windows? @iklam Agree, so I added `LIBS_unix :=

Re: RFR: 8259037: livenmethods cannot find hsdis library [v2]

2021-01-04 Thread Chris Plummer
On Tue, 5 Jan 2021 01:14:12 GMT, Yasumasa Suenaga wrote: >> `livenmethods` CLHSDB command could not find hsdis library even though it >> deployed to `$JAVA_HOME/lib/server/`. >> >> sun.jvm.hotspot.debugger.DebuggerException: >> /usr/local/jdk-15.0.1/lib/amd64/hsdis-amd64.so: cannot open shared

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Chris Plummer
On Tue, 5 Jan 2021 00:41:11 GMT, Yasumasa Suenaga wrote: > jdk.hotspot.agent do not have `FormatMessage()` call in other place. > Did you say about whole JDK code? I haven't checked all of them, but some > code (e.g. net_util_md.c) uses `JNU_ThrowByName()` which is provided by > java.dll. Yes,

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Ioi Lam
On Tue, 5 Jan 2021 00:41:11 GMT, Yasumasa Suenaga wrote: >> There are probably 25 or so places in our code where we use FormatMessage to >> get the error message. Are these all going to run into the same >> FormateMessage bug? >> >> Also, it's not clear to me why you are getting garbled text i

Re: RFR: 8259037: livenmethods cannot find hsdis library [v2]

2021-01-04 Thread Yasumasa Suenaga
On Mon, 4 Jan 2021 21:31:05 GMT, Chris Plummer wrote: >> Yasumasa Suenaga has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add some comments, remove unnecessary code > > Changes requested by cjplummer (Reviewer). @plummercj Thank you for

Re: RFR: 8259037: livenmethods cannot find hsdis library [v2]

2021-01-04 Thread Yasumasa Suenaga
> `livenmethods` CLHSDB command could not find hsdis library even though it > deployed to `$JAVA_HOME/lib/server/`. > > sun.jvm.hotspot.debugger.DebuggerException: > /usr/local/jdk-15.0.1/lib/amd64/hsdis-amd64.so: cannot open shared object > file: No such file or directory > at > jdk.h

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
On Mon, 4 Jan 2021 21:06:46 GMT, Chris Plummer wrote: > There are probably 25 or so places in our code where we use FormatMessage to > get the error message. Are these all going to run into the same > FormateMessage bug? jdk.hotspot.agent do not have `FormatMessage()` call in other place. Did

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
On Mon, 4 Jan 2021 20:58:59 GMT, Chris Plummer wrote: >> I got garbled exception message as following when I run `livenmethods` >> CLHSDB command: >> >> sun.jvm.hotspot.debugger.DebuggerException : ?w???W >> >> My Windows laptop is set Japanese Locale, garbled message was written in >> Ja

Re: RFR: 8257234 : Add gz option to SA jmap to write a gzipped heap dump [v3]

2021-01-04 Thread Chris Plummer
On Mon, 4 Jan 2021 22:00:34 GMT, Chris Plummer wrote: >> Lin Zang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> delete unnecessary print > > src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/JMap.java line 62: > >> 60:

Re: RFR: 8259067: bootclasspath append takes out object lock

2021-01-04 Thread Coleen Phillimore
On Mon, 4 Jan 2021 19:23:19 GMT, Lois Foltan wrote: >> See CR for details. >> I made the classpath append list lock-free. Calling experts in Atomic >> operations... >> Tested with tier1-6. >> Thanks, >> Coleen > > LGTM. > Lois Thanks, Lois! - PR: https://git.openjdk.java.net/jdk/

Re: RFR: 8257234 : Add gz option to SA jmap to write a gzipped heap dump [v3]

2021-01-04 Thread Chris Plummer
On Thu, 10 Dec 2020 03:08:48 GMT, Lin Zang wrote: >> 8257234 : Add gz option to SA jmap to write a gzipped heap dump > > Lin Zang has updated the pull request incrementally with one additional > commit since the last revision: > > delete unnecessary print Changes requested by cjplummer (Revi

Re: RFR: 8259037: livenmethods cannot find hsdis library

2021-01-04 Thread Chris Plummer
On Sun, 3 Jan 2021 14:31:44 GMT, Yasumasa Suenaga wrote: > `livenmethods` CLHSDB command could not find hsdis library even though it > deployed to `$JAVA_HOME/lib/server/`. > > sun.jvm.hotspot.debugger.DebuggerException: > /usr/local/jdk-15.0.1/lib/amd64/hsdis-amd64.so: cannot open shared obje

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Chris Plummer
On Mon, 4 Jan 2021 09:25:55 GMT, Yasumasa Suenaga wrote: > I got garbled exception message as following when I run `livenmethods` CLHSDB > command: > > sun.jvm.hotspot.debugger.DebuggerException : ?w???W > > My Windows laptop is set Japanese Locale, garbled message was written in > Japane

Re: RFR: 8259067: bootclasspath append takes out object lock

2021-01-04 Thread Coleen Phillimore
On Mon, 4 Jan 2021 18:59:09 GMT, Coleen Phillimore wrote: >> src/hotspot/share/classfile/classLoader.cpp line 843: >> >>> 841: assert(first_append_entry() == NULL, "boot loader's append >>> class path entry list not empty"); >>> 842: Atomic::store(&_first_append_entry_list,

Re: RFR: 8259067: bootclasspath append takes out object lock

2021-01-04 Thread Lois Foltan
On Mon, 4 Jan 2021 17:28:30 GMT, Coleen Phillimore wrote: > See CR for details. > I made the classpath append list lock-free. Calling experts in Atomic > operations... > Tested with tier1-6. > Thanks, > Coleen LGTM. Lois - Marked as reviewed by lfoltan (Reviewer). PR: https://gi

Re: RFR: 8259067: bootclasspath append takes out object lock

2021-01-04 Thread Coleen Phillimore
On Mon, 4 Jan 2021 18:45:54 GMT, Zhengyu Gu wrote: >> See CR for details. >> I made the classpath append list lock-free. Calling experts in Atomic >> operations... >> Tested with tier1-6. >> Thanks, >> Coleen > > src/hotspot/share/classfile/classLoader.cpp line 843: > >> 841: assert(

Re: RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Erik Joelsson
On Mon, 4 Jan 2021 09:25:55 GMT, Yasumasa Suenaga wrote: > I got garbled exception message as following when I run `livenmethods` CLHSDB > command: > > sun.jvm.hotspot.debugger.DebuggerException : ?w???W > > My Windows laptop is set Japanese Locale, garbled message was written in > Japane

Re: RFR: 8259067: bootclasspath append takes out object lock

2021-01-04 Thread Coleen Phillimore
On Mon, 4 Jan 2021 17:28:30 GMT, Coleen Phillimore wrote: > See CR for details. > I made the classpath append list lock-free. Calling experts in Atomic > operations... > Tested with tier1-6. > Thanks, > Coleen For the record, these tests exercise this code: vmTestbase/nsk/jvmti/AddToBootstrapC

Re: RFR: 8259067: bootclasspath append takes out object lock

2021-01-04 Thread Zhengyu Gu
On Mon, 4 Jan 2021 17:28:30 GMT, Coleen Phillimore wrote: > See CR for details. > I made the classpath append list lock-free. Calling experts in Atomic > operations... > Tested with tier1-6. > Thanks, > Coleen src/hotspot/share/classfile/classLoader.cpp line 843: > 841: assert(first

Re: RFR: 8231627: runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java fails because error occurred during printing all threads

2021-01-04 Thread Patricio Chilano Mateo
On Thu, 24 Dec 2020 17:33:21 GMT, Daniel D. Daugherty wrote: > A small robustness fix in ThreadsSMRSupport::print_info_on() to reduce the > likelihood of crashes during error reporting. Uses Threads_lock->try_lock() > for safety and restricts some reporting to when the Threads_lock has been > ac

Re: RFR: 8231627: runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java fails because error occurred during printing all threads

2021-01-04 Thread Ioi Lam
On Mon, 4 Jan 2021 16:29:20 GMT, Coleen Phillimore wrote: >> A small robustness fix in ThreadsSMRSupport::print_info_on() to reduce the >> likelihood of crashes during error reporting. Uses Threads_lock->try_lock() >> for safety and restricts some reporting to when the Threads_lock has been >> ac

RFR: 8259067: bootclasspath append takes out object lock

2021-01-04 Thread Coleen Phillimore
See CR for details. I made the classpath append list lock-free. Calling experts in Atomic operations... Tested with tier1-6. Thanks, Coleen - Commit messages: - 8259067: bootclasspath append takes out object lock Changes: https://git.openjdk.java.net/jdk/pull/1935/files Webrev: h

Re: RFR: 8231627: runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java fails because error occurred during printing all threads

2021-01-04 Thread Coleen Phillimore
On Thu, 24 Dec 2020 17:33:21 GMT, Daniel D. Daugherty wrote: > A small robustness fix in ThreadsSMRSupport::print_info_on() to reduce the > likelihood of crashes during error reporting. Uses Threads_lock->try_lock() > for safety and restricts some reporting to when the Threads_lock has been > ac

Re: RFR: 8231627: runtime/ErrorHandling/ThreadsListHandleInErrorHandlingTest.java fails because error occurred during printing all threads

2021-01-04 Thread Daniel D . Daugherty
On Thu, 24 Dec 2020 22:14:43 GMT, Erik Ă–sterlund wrote: >> Looks good. We have something similar in the precious GC log code during >> error reporting. > >> @fisk - Thanks for the review! And Merry Christmas Eve!! > > Merry Christmas to you too Dan! Ping! I could use a second review here... -

RFR: 8259045: Exception message from saproc.dll is garbled on Windows with Japanese locale

2021-01-04 Thread Yasumasa Suenaga
I got garbled exception message as following when I run `livenmethods` CLHSDB command: sun.jvm.hotspot.debugger.DebuggerException : ?w???W My Windows laptop is set Japanese Locale, garbled message was written in Japanese. saproc.dll would throw exception via [ThrowNew()](https://docs.oracl