You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexei Zakharov (JIRA)" <ji...@apache.org> on 2007/11/29 11:37:42 UTC
[jira] Created: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
[classlib][nio] Jetty@Harmony corrupts big static files while downloading
-------------------------------------------------------------------------
Key: HARMONY-5219
URL: https://issues.apache.org/jira/browse/HARMONY-5219
Project: Harmony
Issue Type: Bug
Components: App-Oriented Bug Reports, Classlib
Environment: linux32, linux64
Reporter: Alexei Zakharov
Priority: Critical
Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
Exact steps to reproduce are following:
1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
2. Unpack it
3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
4. Download and compile attached "TestJettyStatic.java"
5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
After doing this you most likely see:
1) Failure of both tests
2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
SIGSEGV in VM code.
Stack trace:
0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
addr2line: '[stack]': No such file
1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
2: ?? (??:-1)
3: ?? (??:-1)
4: ?? (??:-1)
5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
ctor.java:-1)
12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
14: java/lang/Thread.runImpl()V (Thread.java:683)
<end of stack trace>
3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
java.nio.channels.CancelledKeyException
at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
[1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
[2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565705#action_12565705 ]
Alexei Zakharov commented on HARMONY-5219:
------------------------------------------
Jetty scenario fails very seldom now. However, the test still fails for me also. But it always passes on RI.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison reassigned HARMONY-5219:
------------------------------------
Assignee: Tim Ellison
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison closed HARMONY-5219.
--------------------------------
Resolution: Cannot Reproduce
Fix Version/s: (was: 5.0M4)
5.0M12
Works for me too. I'm going to mark it as closed but feel free to reopen it if required.
I still think it was an OS problem.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M12
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548994 ]
Mark Hindess commented on HARMONY-5219:
---------------------------------------
After r601660 I don't get crashes but I still get ArrayIndexOutOfBounds exceptions and CancelledKeyExceptions. I also tried:
svn diff -c 587500 |patch -p0 -R
svn diff -c 586000 |patch -p0 -R
to revert the performance improvements from HARMONY-4869 but I still get a dozen or so CancelledKeyExceptions which feels like an improvement. Possibly there are synchronisation issues with the HARMONY-4869 changes?
Either way things are not looking good as I typically see very few valid responses - typically less than 10 out of 1000.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov updated HARMONY-5219:
-------------------------------------
Fix Version/s: 5.0M4
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548596 ]
Alexei Zakharov commented on HARMONY-5219:
------------------------------------------
Issue is reproducible at least on Debian 32bit and SLES 10 64bit. However, it is not reproducible on RHEL.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565739#action_12565739 ]
Tim Ellison commented on HARMONY-5219:
--------------------------------------
I am running the Jetty server on a remote Debian machine on Harmony JRE, and running the client on a Windows machine on the RI. The single test always fails, never mind the stress scenario.
When I dump out the section of received data that does not match the original data I see the following:
Dump buffers from index 34879
Original data :
333333333333
0572 3333333333333333333333333333333333333333333333333333333
0573 3333333333333333333333333333333333333333333333333333333
0574 3333333333333333333333333333333333333333333333333333333
0575 3333333333333333333333333333333333333333333333333333333
0576 3333333333333333333333333333333333333333333333333333333
05
Received data :
333333333333
0572 33HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 610000
Last-Modified: Mon, 05 Feb 2007 09:03:28 GMT
Server: Jetty(6.1.2pre1)
0000 3333333333333333333333333333333333333333333333333333333
0001 3333333333333333333333333333333333333333333333333333333
0002 33333333333333333333333333333333
i.e. our received data has a buffer that looks like the start of the data stream again, with the HTTP header and data starting at tag 0000.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546742 ]
Aleksey Shipilev commented on HARMONY-5219:
-------------------------------------------
Judging on stacktrace for epoll-based selector, the problem is accept method, which falls back to legacy Selector in this case.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548686 ]
Mark Hindess commented on HARMONY-5219:
---------------------------------------
Looks like one of the write handles is closed (IIRC hysocketP == -1 when it is closed). Will investigate further.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison updated HARMONY-5219:
---------------------------------
Priority: Major (was: Critical)
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566113#action_12566113 ]
Alexei Zakharov commented on HARMONY-5219:
------------------------------------------
BTW it was in my original report - SocketConnector and BlockingChannelConnector work fine, SelectChannelConnector fails.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565361#action_12565361 ]
Mark Hindess commented on HARMONY-5219:
---------------------------------------
I still get the test failures - i.e. corruption in the data served by jetty.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565789#action_12565789 ]
Tim Ellison commented on HARMONY-5219:
--------------------------------------
Just for the record, running the same test on Harmony Windows JRE (jetty server side) works ok.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566107#action_12566107 ]
Tim Ellison commented on HARMONY-5219:
--------------------------------------
Just another couple of data points to put on record...
Running with the /sys/epoll selector provider doesn't help (the same problem still occurs):
java -Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl -jar start.jar
But changing the Jetty configuration to avoid use of NIO connector, and the problem disappears:
org.mortbay.jetty.nio.SelectChannelConnector (has the problem)
org.mortbay.jetty.bio.SocketConnector (works ok)
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549017 ]
Aleksey Shipilev commented on HARMONY-5219:
-------------------------------------------
The major difference between RHEL and SLES tests (with epoll selectors) are:
==== RHEL (correct) =====
epoll(133): waiting on 2 channels for 60000 msecs
epoll(133): ready keys in queue: 137
epoll(133): 1 channels up, 2 total
processSelectResult(): selected = 1
epoll(133): * modifying 137 in filedescriptor list with mode 0 and event mask 0
epoll(133): waiting on 2 channels for 60000 msecs
epoll(133): ready keys in queue:
epoll(133): -1 channels up, 2 total
epoll(133): * deleting 137 from filedescriptor list
==== SLES (incorrect) =====
epoll(129): waiting on 2 channels for 60000 msecs
epoll(133): ready keys in queue: 137
epoll(133): 1 channels up, 2 total
processSelectResult(): selected = 1
epoll(133): * modifying 137 in filedescriptor list with mode 0 and event mask 0
epoll(133): waiting on 2 channels for 60000 msecs
epoll(133): ready keys in queue: 134
epoll(133): 1 channels up, 2 total
processSelectResult(): selected = 0
(endless loop)
It seems like on RHEL setting event mask to 0 _drops_ all registered events there, while SLES does not.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549021 ]
Aleksey Shipilev commented on HARMONY-5219:
-------------------------------------------
Please disregard my previous conclusion, in SLES selector wakes up when read on sink channel occurs. I'm looking further.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548964 ]
Mark Hindess commented on HARMONY-5219:
---------------------------------------
I've committed a partial fix to the native code in r601660. This covers the case when a socket in one of the arrays is closed by the time the native code constructs the pollfd structs.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548854 ]
Tim Ellison commented on HARMONY-5219:
--------------------------------------
I see some file handles being passed in when closed, as shown in my earlier comment; and a crash with a file descriptor object itself being null in the read array, e.g.
#10 <signal handler called>
#11 0xb7cd78ca in getLongField ()
from /home/tellison/Harmony/deploy/jdk/jre/bin/default/libj9vm23.so
#12 0x96db31e9 in getJavaIoFileDescriptorContentsAsAPointer (env=0x847d300, fd=0x0)
at ../shared/nethelp.c:1326
#13 0x96dcaf5e in Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (
env=0x847d300, thisClz=0x80f0030, readFDArray=0x83febfc, writeFDArray=0x83febf8,
countReadC=2, countWriteC=0, outFlags=0x83febec, timeout=1000) at OSNetworkSystemLinux.c:267
Putting an assertion into the OSNetworkSystem type for select shows that some elements are null as they are passed into the native. Seems like there is a problem in the Java code setting up the arrays.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12565339#action_12565339 ]
Tim Ellison commented on HARMONY-5219:
--------------------------------------
I'm going to close this as fixed unless we hear of any further problems.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551517 ]
Tim Ellison commented on HARMONY-5219:
--------------------------------------
Please report any further occurrences on builds > r602572.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov updated HARMONY-5219:
-------------------------------------
Attachment: TestJettyStatic.java
The test case to reproduce the issue.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12745377#action_12745377 ]
Mark Hindess commented on HARMONY-5219:
---------------------------------------
Yesterday evening I re-ran this test as I was curious if any of the fixes HARMONY-6312 in helped. However, I no longer see any failures on a vanilla build of Harmony. A binary chop on the milestone builds shows that this seems to have been fixed between M8 and M9. I'm going to narrow down the fixing commit but it looks like this JIRA can be closed.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751044#action_12751044 ]
Mark Hindess commented on HARMONY-5219:
---------------------------------------
I don't think it was an OS problem since I can reproduce it if I check out an older svn revision without changing my OS. (It was fixed by your io/nio clean up and consolidation between M8 and M9. I couldn't narrow down the exact commit because the test failed completely for several revisions.)
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M12
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548677 ]
Tim Ellison commented on HARMONY-5219:
--------------------------------------
I reproduced the failure on Debian with r601321 and the IBM VME.
Looking at the core shows invalid value for variable hysocketP, as follows...
#11 0x96de5018 in Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (env=0x95c31100, thisClz=0x823a7a0,
readFDArray=0x95c30f48, writeFDArray=0x95c30f50, countReadC=2, countWriteC=8, outFlags=0x95c30f4c, timeout=1000)
at OSNetworkSystemLinux.c:280
280 my_pollfds[countReadC + val].fd = hysocketP->sock;
(gdb)
my_pollfds= (struct pollfd *) 0x947f1c58
countReadC = 2
val = 3
my_pollfds[5].fd = 149
hysocketP = 0xffffffff
Still looking further.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[classlib] Re: [jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by Tim Ellison <t....@gmail.com>.
Moving the discussion over to the dev@ list...
Aleksey Shipilev (JIRA) wrote:
> [ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566504#action_12566504 ]
>
> Aleksey Shipilev commented on HARMONY-5219:
> -------------------------------------------
>
> This issue looks platform-dependent, because SLES suffers from it
> while RHEL does not. Probably this is upstream bug.
Maybe, but it is also possible that we have a timing problem that is not
provoked on RHEL. You see the problem on SLES and I see it on Debian,
and there is no problem running this test with the RI.
It's going to take a bit of detective work in our NIO code to figure out
what is going on, but I wouldn't be so quick to dismiss it as a platform
bug.
Regards,
Tim
>> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
>> -------------------------------------------------------------------------
>>
>> Key: HARMONY-5219
>> URL: https://issues.apache.org/jira/browse/HARMONY-5219
>> Project: Harmony
>> Issue Type: Bug
>> Components: App-Oriented Bug Reports, Classlib
>> Environment: linux32, linux64
>> Reporter: Alexei Zakharov
>> Assignee: Tim Ellison
>> Fix For: 5.0M4
[jira] Commented: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Aleksey Shipilev (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566504#action_12566504 ]
Aleksey Shipilev commented on HARMONY-5219:
-------------------------------------------
This issue looks platform-dependent, because SLES suffers from it while RHEL does not. Probably this is upstream bug.
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Assignee: Tim Ellison
> Fix For: 5.0M4
>
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-5219) [classlib][nio] Jetty@Harmony
corrupts big static files while downloading
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-5219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov updated HARMONY-5219:
-------------------------------------
Attachment: data.txt.original
golden file
> [classlib][nio] Jetty@Harmony corrupts big static files while downloading
> -------------------------------------------------------------------------
>
> Key: HARMONY-5219
> URL: https://issues.apache.org/jira/browse/HARMONY-5219
> Project: Harmony
> Issue Type: Bug
> Components: App-Oriented Bug Reports, Classlib
> Environment: linux32, linux64
> Reporter: Alexei Zakharov
> Priority: Critical
> Attachments: data.txt.original, TestJettyStatic.java
>
>
> Currently we can see JettyScenario failures in about 30% of cases when it is run by CC on Linux (both 32 and 64 bit). To be more precise the test "testStaticContent" fails with unclear message "Content is not correct." - see [1]
> I've created a reproducer for this issue - you may find it attached. The problem itself can be formulated in the following way: Jetty corrupts long static files while downloading if it is run on top of Harmony.
> Exact steps to reproduce are following:
> 1. Download one of the recent Jetty snapshots. For example it can be downloaded from here [2], this version of Jetty is used by our CC.
> 2. Unpack it
> 3. Start jetty using DRLVM: $DRLVM_HOME/bin/jar -jar start.jar
> 4. Download and compile attached "TestJettyStatic.java"
> 5. Place attached golden file "data.txt.original" into the same folder with TestJettyStatic class
> 6. Run TestJettyStatic using RI (or with Harmony - it doesn't really matter)
> After doing this you most likely see:
> 1) Failure of both tests
> 2) VM crash of the Jetty server's VM with the following stacktrace (if default NIO selector provider is used):
> SIGSEGV in VM code.
> Stack trace:
> 0: Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl (??:-1)
> addr2line: '[stack]': No such file
> 1: ?? (ava_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl:-1)
> 2: ?? (??:-1)
> 3: ?? (??:-1)
> 4: ?? (??:-1)
> 5: org/apache/harmony/luni/platform/OSNetworkSystem.selectImpl([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;II[IJ)I (OSNetworkSystem.java:-2)
> 6: org/apache/harmony/luni/platform/OSNetworkSystem.select([Ljava/io/FileDescriptor;[Ljava/io/FileDescriptor;J)[I (OSNetworkSystem.java:302)
> 7: org/apache/harmony/nio/internal/SelectorImpl.selectInternal(J)I (SelectorImpl.java:-1)
> 8: org/apache/harmony/nio/internal/SelectorImpl.select(J)I (SelectorImpl.java:437)
> 9: org/mortbay/io/nio/SelectorManager$SelectSet.doSelect()V (SelectorManager.java:-1)
> 10: org/mortbay/io/nio/SelectorManager.doSelect(I)V (SelectorManager.java:169)
> 11: org/mortbay/jetty/nio/SelectChannelConnector.accept(I)V (SelectChannelConne
> ctor.java:-1)
> 12: org/mortbay/jetty/AbstractConnector$Acceptor.run()V (AbstractConnector.java:516)
> 13: org/mortbay/thread/BoundedThreadPool$PoolThread.run()V (BoundedThreadPool.java:442)
> 14: java/lang/Thread.runImpl()V (Thread.java:683)
> <end of stack trace>
> 3) Hang (dead loop) of Jetty server's VM if alternative epoll-based NIO selector provider is used by specifying "-Djava.nio.channels.spi.SelectorProvider=org.apache.harmony.nio.internal.EpollSelectorProviderImpl":
> java.nio.channels.CancelledKeyException
> at org.apache.harmony.nio.internal.SelectionKeyImpl.checkValid(SelectionKeyImpl.java:90)
> at org.apache.harmony.nio.internal.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:55)
> at org.apache.harmony.nio.internal.SelectorImpl.prepareChannels(SelectorImpl.java:228)
> at org.apache.harmony.nio.internal.SelectorImpl.selectInternal(SelectorImpl.java:187)
> at org.apache.harmony.nio.internal.SelectorImpl.select(SelectorImpl.java:169)
> at org.mortbay.io.nio.SelectorManager$SelectSet.doSelect(SelectorManager.java)
> at org.mortbay.io.nio.SelectorManager.doSelect(SelectorManager.java:175) at org.mortbay.jetty.nio.SelectChannelConnector.accept(SelectChannelConnector.java)
> at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:498)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> However, if Jetty is reconfigured to use some other connector that does not use NIO selectors (for example SocketConnector or BlockingChannelConnector) instead of default SelectChannelConnector then everything works fine. Jetty configuration can be changes by updating "etc/jetty.xml". So it looks like the problem is in Harmony implementation of NIO selectors.
> BTW the issue is reproducible on J9 VM as well. On RI everything works fine - no hangs or crashes, both tests pass. The issue is not a regression - I was able to reproduce it on M3@linux32 build too.
> [1] http://people.apache.org/~smishura/r597436/Linux_x86/JettyScenario/
> [2] http://dist.codehaus.org/jetty/jetty-6.1.x/jetty-6.1.2pre1.zip
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.