Re: Deadlock Reggie - Java logging and net.jini.jeri.ssl.SslServerEndpointImpl

Ramiro Voicu <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
Hello ,

 I added a BUG report in the RIVER Jira tracking system and also tried
to include a patch. The fastest, but not most accurate solution was to
remove the synchronized block from the toString() method ...

 The second approach will be to leave the sync block in the toString()
as it is now and carefully acquire the lock for SslServerEndpointImpl
before any logging which uses the object as LogRecord parameter... but I
do not think I have the appropriate knowledge of the implications, and
still there are other objects the passed as LogRecord parameters, which
may have the same problem.

 Please remove the patch if you think the information exported by
toString() method may not be accurate.

 I mostly agree with Gregg's opinion on the java logging system. I still
don't know who to blame for this, but I also got the feeling that the
formatting should not be synchronized, and as for the publish() method
of the handler, only the actual write() method should be probably
synchronized, but there will be probably a small chance to get scrambled
LogRecords timestamps in the log file, though this can be fixed ...

Thanks,
Ramiro



Gregg Wonderly wrote:
> Ramiro Voicu wrote:
>> Hello,
>>
>>  The stack trace can be found at this URL:
>>
>> http://monalisa.cern.ch/~ramiro/Jini/reggie.log.SAVE_21Jun
>>
>>
>>  The LUS was using Jini 2.0.1, but I think Jini2.1 has the same problem.
>> The deadlock appears only if the logging level for SslServerEndpointImpl
>> is at least Level.FINE. The JVM used is the latest: 1.6.0_01 (i586) on
>> Linux (if more OS specific details will help please let me know).
>
> As a followup to this, this is a really interesting problem with the
> java.util.logging implementation, trying to lock the logger to do formatting.
> The formatting should be done without a lock asserted.  I reported this as bug
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4939307
>
> It was closed, will not fix.  I don't think the reviewer understood the real
> issue, and I didn't do a great job of explaining the who issue, assuming too
> much would be obvious I suppose.
>
> Gregg Wonderly
>
> --------------------------------------------------------------------------
> Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
> Community Web Site:  http://jini.org
> jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
> Unsubscribing:       email "signoff JINI-USERS"  to [email protected]
>

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.