dev@glassfish.java.net

Re: deadlock in LogManager

From: Lloyd Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Mon, 27 Apr 2009 11:05:52 -0700

Tim,

Yes, one of the things I like about the new Mac pro is the ridiculous
number of cores (8 real, 16 virtual) to help find things like this!
(But a pain too).

Lloyd

On Apr 24, 2009, at 5:03 PM, Tim Quinn wrote:

> Lloyd Chambers wrote:
>>
>> I made the change, and so far it has not deadlocked.
> Hi, Lloyd. Nice of you to be the multi-core victim to find this!
>
> Synchronizing is probably a solid fix. This is from the Java SE
> source code:
>
> public static synchronized Logger getLogger
>
>
> I know that the java.util.logging.Logger and our Logger are not
> identical, but at least as far as this is concerned they're
> seemingly close enough.
>
> - Tim
>>
>>
>> llcMP:common llc$ svn diff common-util
>> Index: common-util/src/main/java/com/sun/logging/LogDomains.java
>> ===================================================================
>> --- common-util/src/main/java/com/sun/logging/LogDomains.java
>> (revision 26614)
>> +++ common-util/src/main/java/com/sun/logging/LogDomains.java
>> (working copy)
>> @@ -241,7 +241,7 @@
>> * @return
>> */
>>
>> - public static Logger getLogger(final Class clazz, final String
>> name) {
>> + public static synchronized Logger getLogger(final Class clazz,
>> final String name) {
>> final ClassLoader cloader =clazz.getClassLoader();
>> Logger l = LogManager.getLogManager().getLogger(name);
>>
>>
>>
>> Lloyd
>

Lloyd Chambers
lloyd.chambers_at_sun.com
GlassFish Team