From Carlos.Lucasius at Oracle.com Wed Feb 1 12:37:40 2012 From: Carlos.Lucasius at Oracle.com (Carlos Lucasius) Date: Wed, 01 Feb 2012 15:37:40 -0500 Subject: review request: 7114611 -- (fs) DirectoryStream fails with SIGBUS on some embedded platforms, dirent alignment Message-ID: <4F29A294.8000603@Oracle.com> An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120201/f60bb6d3/attachment.html From david.holmes at oracle.com Wed Feb 1 20:04:32 2012 From: david.holmes at oracle.com (David Holmes) Date: Thu, 02 Feb 2012 14:04:32 +1000 Subject: review request: 7114611 -- (fs) DirectoryStream fails with SIGBUS on some embedded platforms, dirent alignment In-Reply-To: <4F29A294.8000603@Oracle.com> References: <4F29A294.8000603@Oracle.com> Message-ID: <4F2A0B50.5030409@oracle.com> Hi Carlos, On 2/02/2012 6:37 AM, Carlos Lucasius wrote: > http://cr.openjdk.java.net/~clucasius/7114611/webrev.00/ As per previous emails I agree with others that it should be NAME_MAX not PATH_MAX: http://www.gnu.org/software/libc/manual/html_node/Reading_002fClosing-Directory.html David ----- > Thanks, > > /-/Carlos > From Alan.Bateman at oracle.com Thu Feb 2 06:47:30 2012 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 02 Feb 2012 14:47:30 +0000 Subject: 7041778: Move SCTP implementation out of sun.nio.ch and into its own package In-Reply-To: <4F26C912.3090203@oracle.com> References: <4F26C912.3090203@oracle.com> Message-ID: <4F2AA202.5070701@oracle.com> On 30/01/2012 16:45, Chris Hegarty wrote: > This CR will be used to move the SCTP Java implementation into its own > package, from sun.nio.ch to sun.nio.ch.sctp. There is currently no > restriction that libsctp cannot depend on libnet/nio, so the native > implementation simply needs to reflect the new Java package structure. > > As a consequence of moving the SCTP implementation into its own > package some of the package private sun.nio.ch classes need to made > public so the SCTP implementation can access them. Utility classes > like IOStatus, IOUtil, Net, and Util. The SelChImpl interface that the > SCTP channels implement, etc. > > http://cr.openjdk.java.net/~chegar/7041778/webrev.00/webrev/ > > Thanks, > -Chris. My only concern with changing the access to public on these classes is that it creates an unsupported way for channel implementations outside of the JDK to hook into the internal details of the Selector implementation. I've often thought that we should try to come up with an interface for this but it's not an easy problem. Otherwise the changes look fine and will clearly help the modularity work. -Alan. From Alan.Bateman at oracle.com Tue Feb 7 01:48:21 2012 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Tue, 07 Feb 2012 09:48:21 +0000 Subject: 7142847: TEST_BUG: java/nio/file/WatchService/SensitivityModifier.java has incorrect @run tag, runs Basic Message-ID: <4F30F365.3090407@oracle.com> This is an update to two of the tests for java.nio.file.WatchService. In the case of SensitivityModifier.java, it specifies the wrong class name in the @run tag and so is running the Basic test. The change to Basic.java is to use nanoTime rather than currentTimeMillis when testing the duration of the poll method. The webrev with the changes is here: http://cr.openjdk.java.net/~alanb/7142847/webrev/ Thanks, Alan. From chris.hegarty at oracle.com Tue Feb 7 03:11:16 2012 From: chris.hegarty at oracle.com (Chris Hegarty) Date: Tue, 07 Feb 2012 11:11:16 +0000 Subject: 7142847: TEST_BUG: java/nio/file/WatchService/SensitivityModifier.java has incorrect @run tag, runs Basic In-Reply-To: <4F30F365.3090407@oracle.com> References: <4F30F365.3090407@oracle.com> Message-ID: <4F3106D4.1090704@oracle.com> The changes look fine. Trivially, you could fix the typo in the summary of SensitivityModifier.java, while you're there ;-) sensitivyt -> sensitivity -Chris. On 02/ 7/12 09:48 AM, Alan Bateman wrote: > > This is an update to two of the tests for java.nio.file.WatchService. In > the case of SensitivityModifier.java, it specifies the wrong class name > in the @run tag and so is running the Basic test. The change to > Basic.java is to use nanoTime rather than currentTimeMillis when testing > the duration of the poll method. The webrev with the changes is here: > > http://cr.openjdk.java.net/~alanb/7142847/webrev/ > > Thanks, > Alan. From Alan.Bateman at oracle.com Tue Feb 7 03:33:01 2012 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Tue, 07 Feb 2012 11:33:01 +0000 Subject: 7142847: TEST_BUG: java/nio/file/WatchService/SensitivityModifier.java has incorrect @run tag, runs Basic In-Reply-To: <4F3106D4.1090704@oracle.com> References: <4F30F365.3090407@oracle.com> <4F3106D4.1090704@oracle.com> Message-ID: <4F310BED.90207@oracle.com> On 07/02/2012 11:11, Chris Hegarty wrote: > The changes look fine. > > Trivially, you could fix the typo in the summary of > SensitivityModifier.java, while you're there ;-) > > sensitivyt -> sensitivity > Thanks Chris. I did note the typo in the @summary tag in the bug and I'll fix that before pushing. -Alan From Carlos.Lucasius at Oracle.com Wed Feb 8 14:53:56 2012 From: Carlos.Lucasius at Oracle.com (Carlos Lucasius) Date: Wed, 08 Feb 2012 17:53:56 -0500 Subject: review request: 7114611 -- (fs) DirectoryStream fails with SIGBUS on some embedded platforms, dirent alignment Message-ID: <4F32FD04.1040703@Oracle.com> An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120208/c2d752f7/attachment.html From david.holmes at oracle.com Wed Feb 8 20:17:55 2012 From: david.holmes at oracle.com (David Holmes) Date: Thu, 09 Feb 2012 14:17:55 +1000 Subject: review request: 7114611 -- (fs) DirectoryStream fails with SIGBUS on some embedded platforms, dirent alignment In-Reply-To: <4F32FD04.1040703@Oracle.com> References: <4F32FD04.1040703@Oracle.com> Message-ID: <4F3348F3.6050002@oracle.com> On 9/02/2012 8:53 AM, Carlos Lucasius wrote: > http://cr.openjdk.java.net/~clucasius/7114611/webrev.03/ Looks fine to me. For the benefit of readers, the use of PATH_MAX may be excessive but it is no worse than what we do today. Unfortunately NAME_MAX is not guaranteed to be a compile-time constant (and isn't on Solaris) and using fpathconf to look it up introduces its own secondary problems (eg error handling). David ----- > Thanks, > > /-/Carlos > From Alan.Bateman at oracle.com Thu Feb 9 03:46:16 2012 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 09 Feb 2012 11:46:16 +0000 Subject: 7144086: TEST_BUG: java/nio/file/WatchService/SensitivityModifier.java failing intermittently Message-ID: <4F33B208.1010004@oracle.com> A few days I fixed the @run tag in this test because it was actually running a different test: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c6d6ef8ec2bf Now that the real test is running it turns out that it has a bug which causes it hang. I didn't observe this prior to pushing the above change. The hang is intermittent and is because the test doesn't drain events correctly between each iteration of the test. It is trivially fixed with the attached patch. Thanks, Alan. diff --git a/test/java/nio/file/WatchService/SensitivityModifier.java b/test/java/nio/file/WatchService/SensitivityModifier.java --- a/test/java/nio/file/WatchService/SensitivityModifier.java +++ b/test/java/nio/file/WatchService/SensitivityModifier.java @@ -96,6 +96,7 @@ public class SensitivityModifier { // drain events (to avoid interference) do { + key.pollEvents(); key.reset(); key = watcher.poll(1, TimeUnit.SECONDS); } while (key != null); From Alan.Bateman at oracle.com Thu Feb 9 05:45:20 2012 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Thu, 09 Feb 2012 13:45:20 +0000 Subject: review request: 7114611 -- (fs) DirectoryStream fails with SIGBUS on some embedded platforms, dirent alignment In-Reply-To: <4F32FD04.1040703@Oracle.com> References: <4F32FD04.1040703@Oracle.com> Message-ID: <4F33CDF0.50903@oracle.com> On 08/02/2012 22:53, Carlos Lucasius wrote: > http://cr.openjdk.java.net/~clucasius/7114611/webrev.03/ > > Thanks, > > /-/Carlos > This looks fine to me too. I'll push it for you now. -Alan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120209/59eab529/attachment.html From Carlos.Lucasius at Oracle.com Thu Feb 9 05:49:29 2012 From: Carlos.Lucasius at Oracle.com (Carlos Lucasius) Date: Thu, 09 Feb 2012 08:49:29 -0500 Subject: review request: 7114611 -- (fs) DirectoryStream fails with SIGBUS on some embedded platforms, dirent alignment In-Reply-To: <4F33CDF0.50903@oracle.com> References: <4F33CDF0.50903@oracle.com> Message-ID: <4F33CEE9.3020508@Oracle.com> Thanks Alan. -Carlos -------- Original Message -------- Subject: Re: review request: 7114611 -- (fs) DirectoryStream fails with SIGBUS on some embedded platforms, dirent alignment Date: Thu, 09 Feb 2012 13:45:20 +0000 From: Alan Bateman To: Carlos Lucasius CC: nio-dev at openjdk.java.net On 08/02/2012 22:53, Carlos Lucasius wrote: > http://cr.openjdk.java.net/~clucasius/7114611/webrev.03/ > > Thanks, > > /-/Carlos > This looks fine to me too. I'll push it for you now. -Alan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120209/b497033e/attachment.html From chris.hegarty at oracle.com Thu Feb 9 08:21:58 2012 From: chris.hegarty at oracle.com (Chris Hegarty) Date: Thu, 09 Feb 2012 16:21:58 +0000 Subject: 7144086: TEST_BUG: java/nio/file/WatchService/SensitivityModifier.java failing intermittently In-Reply-To: <4F33F008.8000402@oracle.com> References: <4F33B208.1010004@oracle.com> <4F33F008.8000402@oracle.com> Message-ID: <4F33F2A6.5010307@oracle.com> Looks good to me. -Chris. On 09/02/2012, Alan Bateman wrote: > A few days I fixed the @run tag in this test because it was actually > running a different test: > > http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c6d6ef8ec2bf > > Now that the real test is running it turns out that it has a bug which > causes it hang. I didn't observe this prior to pushing the above change. > The hang is intermittent and is because the test doesn't drain events > correctly between each iteration of the test. It is trivially fixed with > the attached patch. > > Thanks, > Alan. > > diff --git a/test/java/nio/file/WatchService/SensitivityModifier.java > b/test/java/nio/file/WatchService/SensitivityModifier.java > --- a/test/java/nio/file/WatchService/SensitivityModifier.java > +++ b/test/java/nio/file/WatchService/SensitivityModifier.java > @@ -96,6 +96,7 @@ public class SensitivityModifier { > > // drain events (to avoid interference) > do { > + key.pollEvents(); > key.reset(); > key = watcher.poll(1, TimeUnit.SECONDS); > } while (key != null); > > From littlee at linux.vnet.ibm.com Tue Feb 14 23:11:39 2012 From: littlee at linux.vnet.ibm.com (Charles Lee) Date: Wed, 15 Feb 2012 15:11:39 +0800 Subject: Please review: Add EACCES check to the return value of fcntl() Message-ID: <4F3B5AAB.40705@linux.vnet.ibm.com> Hi guys, Patch @ http://cr.openjdk.java.net/~littlee/OJDK-327/webrev.00/ The patch is mainly about add the EACCES when check the errno of fcntl with command F_SETLK. From the man page: /If a conflicting lock is held by another process, this call returns -1 and sets errno to EACCES or EAGAIN. /I propose to add the EACCES check. Would anyone help to review the patch? Thanks in advance. -- Yours Charles -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120215/a775c917/attachment.html From Alan.Bateman at oracle.com Wed Feb 15 00:06:26 2012 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Wed, 15 Feb 2012 08:06:26 +0000 Subject: Please review: Add EACCES check to the return value of fcntl() In-Reply-To: <4F3B5AAB.40705@linux.vnet.ibm.com> References: <4F3B5AAB.40705@linux.vnet.ibm.com> Message-ID: <4F3B6782.6080105@oracle.com> On 15/02/2012 07:11, Charles Lee wrote: > Hi guys, > > Patch @ http://cr.openjdk.java.net/~littlee/OJDK-327/webrev.00/ > > > The patch is mainly about add the EACCES when check the errno of fcntl > with command F_SETLK. > > From the man page: > /If a conflicting lock is held by another process, this call returns > -1 and sets errno to EACCES or EAGAIN. > > /I propose to add the EACCES check. Would anyone help to review the patch? Looks okay to me although I'm surprised we haven't run into this before (the file locking code is there since jdk1.4). Are you seeing this only on AIX or have you seen it on Linux/Solaris too? -Alan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120215/06fef546/attachment.html From littlee at linux.vnet.ibm.com Wed Feb 15 00:26:39 2012 From: littlee at linux.vnet.ibm.com (Charles Lee) Date: Wed, 15 Feb 2012 16:26:39 +0800 Subject: Please review: Add EACCES check to the return value of fcntl() In-Reply-To: <4F3B6782.6080105@oracle.com> References: <4F3B5AAB.40705@linux.vnet.ibm.com> <4F3B6782.6080105@oracle.com> Message-ID: <4F3B6C3F.3040001@linux.vnet.ibm.com> On 02/15/2012 04:06 PM, Alan Bateman wrote: > On 15/02/2012 07:11, Charles Lee wrote: >> Hi guys, >> >> Patch @ http://cr.openjdk.java.net/~littlee/OJDK-327/webrev.00/ >> >> >> The patch is mainly about add the EACCES when check the errno of >> fcntl with command F_SETLK. >> >> From the man page: >> /If a conflicting lock is held by another process, this call returns >> -1 and sets errno to EACCES or EAGAIN. >> >> /I propose to add the EACCES check. Would anyone help to review the >> patch? > Looks okay to me although I'm surprised we haven't run into this > before (the file locking code is there since jdk1.4). Are you seeing > this only on AIX or have you seen it on Linux/Solaris too? > > -Alan Hi Alan, It seems AIX has a special choice. :-) -- Yours Charles -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120215/d2391bcb/attachment.html From littlee at linux.vnet.ibm.com Fri Feb 17 00:21:22 2012 From: littlee at linux.vnet.ibm.com (Charles Lee) Date: Fri, 17 Feb 2012 16:21:22 +0800 Subject: Please review: Add EACCES check to the return value of fcntl() In-Reply-To: <4F3B6782.6080105@oracle.com> References: <4F3B5AAB.40705@linux.vnet.ibm.com> <4F3B6782.6080105@oracle.com> Message-ID: <4F3E0E02.4020401@linux.vnet.ibm.com> On 02/15/2012 04:06 PM, Alan Bateman wrote: > On 15/02/2012 07:11, Charles Lee wrote: >> Hi guys, >> >> Patch @ http://cr.openjdk.java.net/~littlee/OJDK-327/webrev.00/ >> >> >> The patch is mainly about add the EACCES when check the errno of >> fcntl with command F_SETLK. >> >> From the man page: >> /If a conflicting lock is held by another process, this call returns >> -1 and sets errno to EACCES or EAGAIN. >> >> /I propose to add the EACCES check. Would anyone help to review the >> patch? > Looks okay to me although I'm surprised we haven't run into this > before (the file locking code is there since jdk1.4). Are you seeing > this only on AIX or have you seen it on Linux/Solaris too? > > -Alan Hi Alan, Do I have your thumb up for this patch? Is it ok for me to commit it? By the way, I have create a sunbug @ http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7146506 . Should I wait for this bug coming online? -- Yours Charles -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120217/8f21a7db/attachment.html From Alan.Bateman at oracle.com Fri Feb 17 01:22:55 2012 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Fri, 17 Feb 2012 09:22:55 +0000 Subject: Please review: Add EACCES check to the return value of fcntl() In-Reply-To: <4F3E0E02.4020401@linux.vnet.ibm.com> References: <4F3B5AAB.40705@linux.vnet.ibm.com> <4F3B6782.6080105@oracle.com> <4F3E0E02.4020401@linux.vnet.ibm.com> Message-ID: <4F3E1C6F.1020204@oracle.com> On 17/02/2012 08:21, Charles Lee wrote: > : > > Do I have your thumb up for this patch? Is it ok for me to commit it? > > By the way, I have create a sunbug @ > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7146506 . Should I > wait for this bug coming online? Sorry I wasn't clear, it was a thumbs up from me. I've moved 7146506 to the right place as: 7146506: (fc) Add EACCES check to the return of fcntl native method I'll marked it as fixed once I see your change-set go in. -Alan. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120217/4b4a1c68/attachment.html From littlee at linux.vnet.ibm.com Sun Feb 19 19:36:03 2012 From: littlee at linux.vnet.ibm.com (Charles Lee) Date: Mon, 20 Feb 2012 11:36:03 +0800 Subject: Please review: Add EACCES check to the return value of fcntl() In-Reply-To: <4F3E1C6F.1020204@oracle.com> References: <4F3B5AAB.40705@linux.vnet.ibm.com> <4F3B6782.6080105@oracle.com> <4F3E0E02.4020401@linux.vnet.ibm.com> <4F3E1C6F.1020204@oracle.com> Message-ID: <4F41BFA3.20200@linux.vnet.ibm.com> On 02/17/2012 05:22 PM, Alan Bateman wrote: > On 17/02/2012 08:21, Charles Lee wrote: >> : >> >> Do I have your thumb up for this patch? Is it ok for me to commit it? >> >> By the way, I have create a sunbug @ >> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7146506 . Should I >> wait for this bug coming online? > Sorry I wasn't clear, it was a thumbs up from me. > > I've moved 7146506 to the right place as: > > 7146506: (fc) Add EACCES check to the return of fcntl native method > > I'll marked it as fixed once I see your change-set go in. > > -Alan. > > > > > > > Here it is: Changeset: de7f6d5841b6 Author: littlee Date: 2012-02-20 11:24 +0800 URL:http://hg.openjdk.java.net/jdk8/tl/jdk/rev/de7f6d5841b6 7146506: (fc) Add EACCES check to the return of fcntl native method Summary: Add EACCES check according to the spec of fcntl Reviewed-by: alanb ! src/solaris/native/sun/nio/ch/FileDispatcherImpl.c Thank you very much ! -- Yours Charles -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120220/8314bcd1/attachment.html From Alan.Bateman at oracle.com Mon Feb 20 06:52:33 2012 From: Alan.Bateman at oracle.com (Alan Bateman) Date: Mon, 20 Feb 2012 14:52:33 +0000 Subject: 6346658: (se) Selector briefly spins when asynchronously closing a registered channel [win] Message-ID: <4F425E31.30407@oracle.com> Asynchronous close has always been problematic on Windows, mostly because that platform lacks a means to close a file or connection without releasing the handle. I'd like to change the implementation so that closing a FileChannels or SocketChannel configured non-blocking works cooperatively. In the case of FileChannel this means the close is postponed until the last thread is finished doing I/O on the channel, with SocketChannels registered with Selectors it means the close is done when deregistering from the Selector. There isn't any change to SocketChannels configured blocking. The webrev with the proposed changes is here: http://cr.openjdk.java.net/~alanb/6346658/webrev/ For now I don't have any automated tests to go along with this. I have a test for FileChannel but it runs for several hours and so is not suitable for the regression suite. All existing tests pass on all platforms with these changes. -Alan. From chris.hegarty at oracle.com Mon Feb 20 08:03:04 2012 From: chris.hegarty at oracle.com (Chris Hegarty) Date: Mon, 20 Feb 2012 16:03:04 +0000 Subject: 6346658: (se) Selector briefly spins when asynchronously closing a registered channel [win] In-Reply-To: <4F425E31.30407@oracle.com> References: <4F425E31.30407@oracle.com> Message-ID: <4F426EB8.3010009@oracle.com> This looks fine to me. -Chris. On 20/02/2012 14:52, Alan Bateman wrote: > > Asynchronous close has always been problematic on Windows, mostly > because that platform lacks a means to close a file or connection > without releasing the handle. I'd like to change the implementation so > that closing a FileChannels or SocketChannel configured non-blocking > works cooperatively. In the case of FileChannel this means the close is > postponed until the last thread is finished doing I/O on the channel, > with SocketChannels registered with Selectors it means the close is done > when deregistering from the Selector. There isn't any change to > SocketChannels configured blocking. The webrev with the proposed changes > is here: > > http://cr.openjdk.java.net/~alanb/6346658/webrev/ > > For now I don't have any automated tests to go along with this. I have a > test for FileChannel but it runs for several hours and so is not > suitable for the regression suite. All existing tests pass on all > platforms with these changes. > > -Alan.