Re: OpenJDK Forum: Core Libraries Round Table
2009/4/14 Max (Weijun) Wang weijun.w...@sun.com: On Apr 14, 2009, at 7:44 PM, Dalibor Topic wrote: Kevin Bourrillion wrote: Curious if anyone is transcribing the call into text yet? Word-for-word not necessary, but understandable? If no one says they've already done that or at least started, I could volunteer. That would be great, Kevin - the list of speakers in order of first appearance is: To ease your acquaintance with them, comments are added: Alan Bateman: the NIO2 guy http://blogs.sun.com/alanb/ Chris Hegarty: the SCTP guy Vincent Ryan: the ECC guy Michael McMahon: the HTTP server guy http://blogs.sun.com/michaelmcm/ Xueming (Sherman) Shen: the corelib guy (sorry I forget what he said in the conf) Ulf Ziebis: I don't know who this is. Sorry. Doug Lea: the concurrency guy http://en.wikipedia.org/wiki/Doug_Lea Andrew Haley: the RedHat guy Red Hat http://www.advogato.org/person/aph/ Josh Bloch: the sort guy http://en.wikipedia.org/wiki/Joshua_Bloch Dalibor Topic: the ambassador I thought Dalibor opened the call... was that not recorded? Mark Reinhold: the chief http://blogs.sun.com/mr/ Hope this helps. Max cheers, dalibor topic On Thu, Apr 9, 2009 at 4:23 PM, Tom Hawtin thomas.haw...@sun.com mailto:thomas.haw...@sun.com wrote: Dalibor Topic wrote: Tom Hawtin wrote: Dalibor Topic wrote: A recording of the call is available on http://mediacast.sun.com/users/robilad/media/openjdk6-core-libs.ogg Any chance of getting that in a mainstream format? Windows doesn't understand it. Rhythmbox under VirtualBox freezes. http://mediacast.sun.com/users/robilad/media/openjdk-core-libraries-roundup.mp3 Thanks for that, Dalibor. (I'm no fan of software patents, but it's nice when things just work.) Tom -- Kevin Bourrillion @ Google internal: http://go/javalibraries google-collections.googlecode.com http://google-collections.googlecode.com google-guice.googlecode.com http://google-guice.googlecode.com -- *** Dalibor Topic Tel: (+49 40) 23 646 738 Java F/OSS Ambassador AIM: robiladonaim Sun Microsystems GmbH Mobile: (+49 177) 2664 192 Nagelsweg 55 http://openjdk.java.net D-20097 Hamburg mailto:dalibor.to...@sun.com Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht München: HRB 161028 Geschäftsführer: Thomas Schröder, Wolfgang Engels, Dr. Roland Bömer Vorsitzender des Aufsichtsrates: Martin Häring -- Andrew :-) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
Re: PATCH: ShutdownHooks and LoggingDeadlock2
Mandy Chung wrote: Hi Martin, Thanks for catching the regression. I created a Sun bug # 6829503 for bug 2. With the fix for 6829503, ApplicationShutdownHook and DeleteOnExitHook are both lazily initialized. Since it is possible that a file could be added to the list for DeletedOnExit during shutdown, perhaps we also need to change the Shutdown.add method to allow DeleteOnExitHook to be added during shutdown. I should pick up this bug since my fix caused this regression. Or do you want to revise the patch? I also missed this case when reviewing the changes (sorry) but at least it has been caught in good time I think you will need to allow hooks be added during the shutdown, if only to allow deleteOnExit to register a first file for deletion when invoked from a shutdown hook (I realize this isn't the issue that Martin ran into but I see we've got this issue also). One idea is for Shutdown#add to not check the state but instead return a boolean to indicate if shutdown is in progress. ApplicationShutdownHooks.clinit could use this to determine if its hooks map should be initialized or not. That way, addShutdownHook will behave as expected and throw IllegalStateException during shutdown. If addShutdownHook is first invoked during shutdown it will be harmless because its runHooks will simply process an empty map. As you said, deleteOnExit also has a problem in that DeleteOnExitHook.clinit can fail to register its hook. You'll actually be fixing a second (and I think unreported) bug that has existed for some time. That bug is that deleteOnExit is throwing IllegalStateException during shutdown when it shouldn't. That bug has been there for a while but has been masked by 6526376 (fixed early in jdk7). -Alan.
Re: OpenJDK Forum: Core Libraries Round Table
Am 14.04.2009 13:52, Max (Weijun) Wang schrieb: To ease your acquaintance with them, comments are added: Alan Bateman: the NIO2 guy Chris Hegarty: the SCTP guy Vincent Ryan: the ECC guy Michael McMahon: the HTTP server guy Xueming (Sherman) Shen: the corelib guy (sorry I forget what he said in the conf) Ulf Ziebis: I don't know who this is. Sorry. Correction: Ulf Zibis: the charset-enhanced guy https://java-nio-charset-enhanced.dev.java.net/ Doug Lea: the concurrency guy Andrew Haley: the RedHat guy Josh Bloch: the sort guy Dalibor Topic: the ambassador Mark Reinhold: the chief
Re: OpenJDK Forum: Core Libraries Round Table
On 04/14/09 13:21, Andrew John Hughes wrote: 2009/4/14 Max (Weijun) Wang weijun.w...@sun.com: On Apr 14, 2009, at 7:44 PM, Dalibor Topic wrote: Kevin Bourrillion wrote: Curious if anyone is transcribing the call into text yet? Word-for-word not necessary, but understandable? If no one says they've already done that or at least started, I could volunteer. That would be great, Kevin - the list of speakers in order of first appearance is: To ease your acquaintance with them, comments are added: Alan Bateman: the NIO2 guy http://blogs.sun.com/alanb/ Chris Hegarty: the SCTP guy http://openjdk.java.net/projects/sctp/ -Chris. Vincent Ryan: the ECC guy Michael McMahon: the HTTP server guy http://blogs.sun.com/michaelmcm/ Xueming (Sherman) Shen: the corelib guy (sorry I forget what he said in the conf) Ulf Ziebis: I don't know who this is. Sorry. Doug Lea: the concurrency guy http://en.wikipedia.org/wiki/Doug_Lea Andrew Haley: the RedHat guy Red Hat http://www.advogato.org/person/aph/ Josh Bloch: the sort guy http://en.wikipedia.org/wiki/Joshua_Bloch Dalibor Topic: the ambassador I thought Dalibor opened the call... was that not recorded? Mark Reinhold: the chief http://blogs.sun.com/mr/ Hope this helps. Max cheers, dalibor topic On Thu, Apr 9, 2009 at 4:23 PM, Tom Hawtin thomas.haw...@sun.com mailto:thomas.haw...@sun.com wrote: Dalibor Topic wrote: Tom Hawtin wrote: Dalibor Topic wrote: A recording of the call is available on http://mediacast.sun.com/users/robilad/media/openjdk6-core-libs.ogg Any chance of getting that in a mainstream format? Windows doesn't understand it. Rhythmbox under VirtualBox freezes. http://mediacast.sun.com/users/robilad/media/openjdk-core-libraries-roundup.mp3 Thanks for that, Dalibor. (I'm no fan of software patents, but it's nice when things just work.) Tom -- Kevin Bourrillion @ Google internal: http://go/javalibraries google-collections.googlecode.com http://google-collections.googlecode.com google-guice.googlecode.com http://google-guice.googlecode.com -- *** Dalibor Topic Tel: (+49 40) 23 646 738 Java F/OSS Ambassador AIM: robiladonaim Sun Microsystems GmbH Mobile: (+49 177) 2664 192 Nagelsweg 55http://openjdk.java.net D-20097 Hamburg mailto:dalibor.to...@sun.com Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht München: HRB 161028 Geschäftsführer: Thomas Schröder, Wolfgang Engels, Dr. Roland Bömer Vorsitzender des Aufsichtsrates: Martin Häring
Re: OpenJDK Forum: Core Libraries Round Table
Ulf Zibis wrote: Am 14.04.2009 13:52, Max (Weijun) Wang schrieb: To ease your acquaintance with them, comments are added: Alan Bateman: the NIO2 guy Chris Hegarty: the SCTP guy Vincent Ryan: the ECC guy Michael McMahon: the HTTP server guy Xueming (Sherman) Shen: the corelib guy (sorry I forget what he said in the conf) Ulf Ziebis: I don't know who this is. Sorry. Correction: Ulf Zibis: the charset-enhanced guy https://java-nio-charset-enhanced.dev.java.net/ Doug Lea: the concurrency guy Andrew Haley: the RedHat guy Josh Bloch: the sort guy Dalibor Topic: the ambassador Mark Reinhold: the chief Thanks, everyone, I added most of the links to http://robilad.livejournal.com/46797.html , and I'll add a pointer to the minutes, once they are available. cheers, dalibor topic -- *** Dalibor Topic Tel: (+49 40) 23 646 738 Java F/OSS Ambassador AIM: robiladonaim Sun Microsystems GmbH Mobile: (+49 177) 2664 192 Nagelsweg 55http://openjdk.java.net D-20097 Hamburg mailto:dalibor.to...@sun.com Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht München: HRB 161028 Geschäftsführer: Thomas Schröder, Wolfgang Engels, Dr. Roland Bömer Vorsitzender des Aufsichtsrates: Martin Häring
Re: PATCH: ShutdownHooks and LoggingDeadlock2
Dear all, Seem you guy are fixing the bug about shutdown of logger, can you please also take a look at the bug I filed in Sun database (#6774110) Thanks.
Re: Source of sun.nio.cs.StandardCharsets.java - Please help!
Am 14.04.2009 00:16, Xueming Shen schrieb: I'm still using MKS ksh, but it should not matter. For that particular script, you can copy/paste the command from the the makefile, so it should look like sh -e genCharsetprovider.sh {TheDirOf}/standard-charsets {DestinateDir} before that you should also (1)copy Mark's Hasher to current dir and compile it (2)do something to the addNotices.sh script, it would be easy to simply remove it from the script for now (3)add HASHER='java Hasher' at the beginning of the script (4)add NAWK=awk at the beginning. Then start your awk hack. Much thanks, I will try to get this running. I would be happy to do the following for you, but I'm still not quite sure about (2), it might be easy if you just send me the result you would like to see. This would be much easier for me, if I would have the current source for StandardCharsets class. I only can find the class file in rt.jar. So I asked you, if you can send it to me, but it seems to be difficult for you !? Having this, I could easily edit it, to show, you what I want to change. -Ulf
Re: PATCH: ShutdownHooks and LoggingDeadlock2
Alan Bateman wrote: That bug is that deleteOnExit is throwing IllegalStateException during shutdown when it shouldn't. That bug has been there for a while but has been masked by 6526376 (fixed early in jdk7). Before the fix for 6829503 (after 6526376 was fixed), DeleteOnExitHook#add never throws IllegalStateException since the files field is never null as it is initialized in the static initializer. I'll fix this bug. Mandy Alan Bateman wrote: Mandy Chung wrote: Hi Martin, Thanks for catching the regression. I created a Sun bug # 6829503 for bug 2. With the fix for 6829503, ApplicationShutdownHook and DeleteOnExitHook are both lazily initialized. Since it is possible that a file could be added to the list for DeletedOnExit during shutdown, perhaps we also need to change the Shutdown.add method to allow DeleteOnExitHook to be added during shutdown. I should pick up this bug since my fix caused this regression. Or do you want to revise the patch? I also missed this case when reviewing the changes (sorry) but at least it has been caught in good time I think you will need to allow hooks be added during the shutdown, if only to allow deleteOnExit to register a first file for deletion when invoked from a shutdown hook (I realize this isn't the issue that Martin ran into but I see we've got this issue also). One idea is for Shutdown#add to not check the state but instead return a boolean to indicate if shutdown is in progress. ApplicationShutdownHooks.clinit could use this to determine if its hooks map should be initialized or not. That way, addShutdownHook will behave as expected and throw IllegalStateException during shutdown. If addShutdownHook is first invoked during shutdown it will be harmless because its runHooks will simply process an empty map. As you said, deleteOnExit also has a problem in that DeleteOnExitHook.clinit can fail to register its hook. You'll actually be fixing a second (and I think unreported) bug that has existed for some time. That bug is that deleteOnExit is throwing IllegalStateException during shutdown when it shouldn't. That bug has been there for a while but has been masked by 6526376 (fixed early in jdk7). -Alan.
Re: Logger.log should call getHandlers
I've updated my PATCH with more self-flagellation penance tests, but which also have an ulterior motive, as will be revealed in a followon msg. PATCH to my patch http://cr.openjdk.java.net/~martin/getHandlers follows: diff --git a/test/java/util/logging/LoggerSubclass.java b/test/java/util/logging/LoggerSubclass.java --- a/test/java/util/logging/LoggerSubclass.java +++ b/test/java/util/logging/LoggerSubclass.java @@ -32,12 +32,15 @@ import java.util.logging.Logger; import java.util.logging.LogRecord; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicLong; public class LoggerSubclass { void test(String[] args) { final String name = myLogger; final String message = myMessage; final AtomicInteger getHandlerCount = new AtomicInteger(0); +final AtomicLong lastSequenceNumber = new AtomicLong(-1L); +final AtomicInteger lastThreadID = new AtomicInteger(-1); final Logger logger = new Logger(name, null) { public Handler[] getHandlers() { getHandlerCount.getAndIncrement(); @@ -59,6 +62,15 @@ equal(l.getSourceMethodName(), test); equal(l.getThrown(), null); equal(l.getLevel(), Level.WARNING); + +if (lastSequenceNumber.get() != -1) { +equal(lastSequenceNumber.get() + 1, + l.getSequenceNumber()); +equal(lastThreadID.get(), + l.getThreadID()); +} +lastSequenceNumber.set(l.getSequenceNumber()); +lastThreadID.set(l.getThreadID()); }}); for (int i = 1; i 4; i++) { logger.warning(message); // Should invoke getHandlers() Martin On Mon, Apr 13, 2009 at 19:15, Martin Buchholz marti...@google.com wrote: Hi Swamy Our recent change changeset: 810:6eac3829cb41 user: martin date: Tue Jan 27 15:04:30 2009 -0800 summary: 6797480: Remove synchronization bottleneck in logger unfortunately introduced a serious bug. Logger.log should call Logger.getHandlers(), not Logger.handlers, because getHandlers may be overriden in a subclass. Notably, the root logger is such a subclass with a non-trivial getHandlers method. Here's the obvious fix, with a regression test that includes penance for our having broken j.u.l. by adding some much-needed tests for never-before-exercised code. Please review and file a bug. PATCH is here: http://cr.openjdk.java.net/~martin/getHandlers Martin
Re: PATCH: ShutdownHooks and LoggingDeadlock2
It does look like we're taking over maintainership of java.util.logging, and there is a current flurry of activity, but probably no one here is thinking along those lines. Martin On Tue, Apr 14, 2009 at 06:38, Franz Wong franzp...@gmail.com wrote: Dear all, Seem you guy are fixing the bug about shutdown of logger, can you please also take a look at the bug I filed in Sun database (#6774110) Thanks.
Re: Logger.log should call getHandlers
Martin, Good catch! Your fix looks good to me. Bug id for this issue is:6830220). -Swamy Martin Buchholz wrote: Hi Swamy Our recent change changeset: 810:6eac3829cb41 user:martin date:Tue Jan 27 15:04:30 2009 -0800 summary: 6797480: Remove synchronization bottleneck in logger unfortunately introduced a serious bug. Logger.log should call Logger.getHandlers(), not Logger.handlers, because getHandlers may be overriden in a subclass. Notably, the root logger is such a subclass with a non-trivial getHandlers method. Here's the obvious fix, with a regression test that includes penance for our having broken j.u.l. by adding some much-needed tests for never-before-exercised code. Please review and file a bug. PATCH is here: http://cr.openjdk.java.net/~martin/getHandlers Martin
Re: java-nio-charset-enhanced -- Milestone 4 is released
(Sorry for my continuing extreme communications lag) On Mon, Apr 6, 2009 at 20:45, Mark Reinhold m...@sun.com wrote: Date: Mon, 06 Apr 2009 17:27:41 -0700 From: Martin Buchholz marti...@google.com On Mon, Mar 30, 2009 at 21:51, Mark Reinhold m...@sun.com wrote: Date: Sun, 29 Mar 2009 11:27:26 -0700 From: Martin Buchholz marti...@google.com The problem is more human. One would like to give credit for good ideas or good analysis, but the only official way to give credit in a commit message is via a simple Contributed-by: email-address which raises legal doubts even when there is no copyrighted material. Exactly what sort of legal doubts do you have in mind here? We already require the contributor of any nontrivial change to submit an SCA prior to that change being integrated. Is that not sufficient? I am worried about: - contributions that do not require a copyright assignment, e.g. an excellent bug report Bug reports submitted to bugs.sun.com, to bugs.openjdk.java.net, or in e-mail to an openjdk.java.net list are covered by appropriate Terms of Use (ToU) statements. Are they not sufficient? The problem is not that *I* have any legal doubts about whether a contribution is legally acceptable, but that I worry that *others* will have doubts if I put anyone's name in a Contributed-by: when that name cannot be found in the SCA signers list. The phrase Contributed-by: *sounds* like it has legal meaning. I understand why the Guide imposes draconian restrictions on the format of a changeset comment, but I'd like to see some loosening of those restrictions. I would like the ability to add free form text to the commit messages, even with the risk of teams adopting local conventions about their use. But if we're going to allow just one loosening, it would be to allow *multiple* *free-form* Thank-you: freeformtexthere lines. Thanks, Martin - contributions from a Google employee, because of repeated institutional amnesia that Google has a blanket SCA, which is not reflected in https://sca.dev.java.net/CA_signatories.htm I'm not sure why that is, but I'll look into it. I guess one can abuse the Summary: field to squeeze in thank-yous, but it's pretty obvious that you are circumventing the process. Perhaps -- but if we need to fix the process, then we can do that. It seems that for changes for which I have an external contributor, there is a large variety in the nature of the contribution; sometimes an off-hand remark will cause an avalanche of work on my part. The nature of the collaboration cannot be expressed in the commit comment. Perhaps we could have a Thank-you: with free-form content in addition to a Contributed-by: with the latter reflecting a legal copyright author to keep the lawyers happy. You seem to think that the Contributed-by line exists in order to keep Sun's lawyers happy. It doesn't. Sun's lawyers actually know nothing about it. We defined the Contributed-by line in order to give credit to non-author contributors in a visible and permanent way. We could equally well have called it the Thank-you line, but we didn't. As a changeset author you're free to list anyone whom you think worthy of credit in the Contributed-by line. Is the problem here that you assumed otherwise? If so then we just need to improve the documentation. Speaking of which -- hopefully jcheck will soon be open-sourced?! Yes. - Mark