You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Eddie Lo (Created) (JIRA)" <ji...@apache.org> on 2011/12/15 01:09:31 UTC
[jira] [Created] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
--------------------------------------------------------------------------------------------------------------------------------------------------------
Key: TAP5-1791
URL: https://issues.apache.org/jira/browse/TAP5-1791
Project: Tapestry 5
Issue Type: Bug
Components: tapestry-core
Affects Versions: 5.3
Reporter: Eddie Lo
Priority: Critical
Some some path parameters will cause tapestry getting into infinite loop.
The exact problem is caused by the combination of 3 factors:
* [A low priority bug in JVM|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582]
* A regex generated by Tapestry 3.0
{noformat}
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
{noformat}
* A long and complex enough path parameter.
{noformat}
http://platform1-regression.qa.lithium.com/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
{noformat}
When all the the 3 factors are hit, tapestry will get into at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
{noformat}
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
{noformat}
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1791) On some JDKs, the complex regular
expression used by ComponentEventLinkEncoderImpl will cause a stack
overflow
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248590#comment-13248590 ]
Hudson commented on TAP5-1791:
------------------------------
Integrated in tapestry-trunk-freestyle #698 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/698/])
TAP5-1791: On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow (Revision 1310501)
Result = SUCCESS
hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1310501
Files :
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImpl.java
* /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventDispatcherTest.java
* /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java
> On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow
> --------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3.3, 5.4
>
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eddie Lo updated TAP5-1791:
---------------------------
Description:
Some path parameters will cause tapestry to get into infinite loop.
The exact problem is caused by the combination of 3 factors:
* A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
* A regex generated by Tapestry 3.0
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
* A long and complex enough path parameter.
/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
When all the the 3 factors are hit, tapestry will get into an infinite loop at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
was:
Some path parameters will cause tapestry to get into infinite loop.
The exact problem is caused by the combination of 3 factors:
* A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
* A regex generated by Tapestry 3.0
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
* A long and complex enough path parameter.
/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
When all the the 3 factors are hit, tapestry will get into an infinite loop at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eddie Lo updated TAP5-1791:
---------------------------
Description:
Some some path parameters will cause tapestry getting into infinite loop.
The exact problem is caused by the combination of 3 factors:
* A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
* A regex generated by Tapestry 3.0
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
* A long and complex enough path parameter.
/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
When all the the 3 factors are hit, tapestry will get into at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
was:
Some some path parameters will cause tapestry getting into infinite loop.
The exact problem is caused by the combination of 3 factors:
* [A low priority bug in JVM|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582]
* A regex generated by Tapestry 3.0
{noformat}
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
{noformat}
* A long and complex enough path parameter.
{noformat}
http://platform1-regression.qa.lithium.com/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
{noformat}
When all the the 3 factors are hit, tapestry will get into at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
{noformat}
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
{noformat}
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
>
> Some some path parameters will cause tapestry getting into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1791) On some JDKs, the complex regular
expression used by ComponentEventLinkEncoderImpl will cause a stack
overflow
Posted by "Howard M. Lewis Ship (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAP5-1791:
---------------------------------------
Summary: On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow (was: java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243)
> On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow
> --------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Howard M. Lewis Ship (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship reassigned TAP5-1791:
------------------------------------------
Assignee: Howard M. Lewis Ship
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eddie Lo updated TAP5-1791:
---------------------------
Description:
Some path parameters will cause tapestry to get into infinite loop.
The exact problem is caused by the combination of 3 factors:
* A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
* A regex generated by Tapestry 3.0
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
* A long and complex enough path parameter.
/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
When all the the 3 factors are hit, tapestry will get into an infinite loop at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
was:
Some some path parameters will cause tapestry getting into infinite loop.
The exact problem is caused by the combination of 3 factors:
* A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
* A regex generated by Tapestry 3.0
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
* A long and complex enough path parameter.
/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
When all the the 3 factors are hit, tapestry will get into at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (TAP5-1791)
java.lang.StackOverflowError was thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Howard M. Lewis Ship (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248461#comment-13248461 ]
Howard M. Lewis Ship edited comment on TAP5-1791 at 4/6/12 4:16 PM:
--------------------------------------------------------------------
Hm. I added a quick test for this:
/**
* And thanks to our friends at Lithium: TAP5-1791
*/
@Test
public void can_handle_extreme_regular_expression()
{
Request request = mockRequest();
String path = "/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg";
train_getPath(request, path);
replay();
ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(null, contextPathEncoder, null,
request, null, null, null, null, true, "", null, null);
ComponentEventRequestParameters parameters = linkEncoder.decodeComponentEventRequest(request);
assertNull(parameters);
verify();
}
And it works, so I'm not hitting the same JVM bug as you guys, maybe because I'm on a Mac.
was (Author: hlship):
Hm. I added a quick test for this:
{{{
/**
* And thanks to our friends at Lithium: TAP5-1791
*/
@Test
public void can_handle_extreme_regular_expression()
{
ComponentClassResolver resolver = mockComponentClassResolver();
Request request = mockRequest();
LocalizationSetter ls = mockLocalizationSetter();
MetaDataLocator metaDataLocator = neverWhitelistProtected();
train_getParameter(request, InternalConstants.PAGE_CONTEXT_NAME, null);
train_getParameter(request, InternalConstants.CONTAINER_PAGE_NAME, null);
train_getLocale(request, Locale.ENGLISH);
ls.setNonPeristentLocaleFromLocaleName("en");
String path = "/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg";
train_getPath(request, path);
train_setLocaleFromLocaleName(ls, "user", false);
train_isPageName(resolver, "user/UserResetPasswordPage", true);
train_canonicalizePageName(resolver, "user/UserResetPasswordPage", "user/UserResetPasswordPage");
replay();
ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls,
request, null, null, null, null, true, "", metaDataLocator, null);
ComponentEventRequestParameters parameters = linkEncoder.decodeComponentEventRequest(request);
assertNull(parameters);
verify();
}
}}}
And it works, so I'm not hitting the same JVM bug as you guys, maybe because I'm on a Mac.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (TAP5-1791) On some JDKs, the complex regular
expression used by ComponentEventLinkEncoderImpl will cause a stack
overflow
Posted by "Howard M. Lewis Ship (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1791.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.4
5.3.3
> On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow
> --------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3.3, 5.4
>
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205955#comment-13205955 ]
Eddie Lo commented on TAP5-1791:
--------------------------------
However, if we change the regex from
Pattern COMPONENT_EVENT_REQUEST_PATH_PATTERN = Pattern.compile("^/(((\\w(?:\\w|-)*)/)*(\\w+))" + "(\\.(\\w+(\\.\\w+)*))?" + "(\\:(\\w+))?" + "(/(.*))?", 4);
to
Pattern COMPONENT_EVENT_REQUEST_PATH_PATTERN = Pattern.compile("^/(((\\w(?:[a-zA-Z0-9_\\-])*)/)*(\\w+))" + "(\\.(\\w+(\\.\\w+)*))?" + "(\\:(\\w+))?" + "(/(.*))?", 4);
it will be working fine.
According to Joe, adding the "|-" is because we particularly use '-' in path parameter when you are with us. Although the semantic is a little bit different, it should ok good enough to support "-" in path parameter and avoid the stack over flow.
Can you please review it?
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Howard M. Lewis Ship (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship reassigned TAP5-1791:
------------------------------------------
Assignee: Howard M. Lewis Ship
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1791) On some JDKs, the complex regular
expression used by ComponentEventLinkEncoderImpl will cause a stack
overflow
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248590#comment-13248590 ]
Hudson commented on TAP5-1791:
------------------------------
Integrated in tapestry-trunk-freestyle #698 (See [https://builds.apache.org/job/tapestry-trunk-freestyle/698/])
TAP5-1791: On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow (Revision 1310501)
Result = SUCCESS
hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1310501
Files :
* /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImpl.java
* /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventDispatcherTest.java
* /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java
> On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow
> --------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3.3, 5.4
>
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1791) On some JDKs, the complex regular
expression used by ComponentEventLinkEncoderImpl will cause a stack
overflow
Posted by "Howard M. Lewis Ship (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship updated TAP5-1791:
---------------------------------------
Summary: On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow (was: java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243)
> On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow
> --------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248461#comment-13248461 ]
Howard M. Lewis Ship commented on TAP5-1791:
--------------------------------------------
Hm. I added a quick test for this:
{{{
/**
* And thanks to our friends at Lithium: TAP5-1791
*/
@Test
public void can_handle_extreme_regular_expression()
{
ComponentClassResolver resolver = mockComponentClassResolver();
Request request = mockRequest();
LocalizationSetter ls = mockLocalizationSetter();
MetaDataLocator metaDataLocator = neverWhitelistProtected();
train_getParameter(request, InternalConstants.PAGE_CONTEXT_NAME, null);
train_getParameter(request, InternalConstants.CONTAINER_PAGE_NAME, null);
train_getLocale(request, Locale.ENGLISH);
ls.setNonPeristentLocaleFromLocaleName("en");
String path = "/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg";
train_getPath(request, path);
train_setLocaleFromLocaleName(ls, "user", false);
train_isPageName(resolver, "user/UserResetPasswordPage", true);
train_canonicalizePageName(resolver, "user/UserResetPasswordPage", "user/UserResetPasswordPage");
replay();
ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls,
request, null, null, null, null, true, "", metaDataLocator, null);
ComponentEventRequestParameters parameters = linkEncoder.decodeComponentEventRequest(request);
assertNull(parameters);
verify();
}
}}}
And it works, so I'm not hitting the same JVM bug as you guys, maybe because I'm on a Mac.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eddie Lo updated TAP5-1791:
---------------------------
Attachment: LIA25066Test.java
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205955#comment-13205955 ]
Eddie Lo commented on TAP5-1791:
--------------------------------
However, if we change the regex from
Pattern COMPONENT_EVENT_REQUEST_PATH_PATTERN = Pattern.compile("^/(((\\w(?:\\w|-)*)/)*(\\w+))" + "(\\.(\\w+(\\.\\w+)*))?" + "(\\:(\\w+))?" + "(/(.*))?", 4);
to
Pattern COMPONENT_EVENT_REQUEST_PATH_PATTERN = Pattern.compile("^/(((\\w(?:[a-zA-Z0-9_\\-])*)/)*(\\w+))" + "(\\.(\\w+(\\.\\w+)*))?" + "(\\:(\\w+))?" + "(/(.*))?", 4);
it will be working fine.
According to Joe, adding the "|-" is because we particularly use '-' in path parameter when you are with us. Although the semantic is a little bit different, it should ok good enough to support "-" in path parameter and avoid the stack over flow.
Can you please review it?
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205953#comment-13205953 ]
Eddie Lo commented on TAP5-1791:
--------------------------------
It is consistently reproducible using jdk1.6.0_30-x64. It cannot be reproduced using 32 bit however.
Please use following small java program and a few simple steps:
Download the attached java file.
Compile it and run it.
javac LIA25066Test.java
java -classpath . -Xms64m -Xmx1280m -Xss192k -XX:MaxPermSize=288m -Xfuture -XX:+UseCompressedOops -XX:NewRatio=7 -XX:-DoEscapeAnalysis -XX:-TieredCompilation LIA25066Test
You will get the java.lang.StackOverflowError exception.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (TAP5-1791) On some JDKs, the complex regular
expression used by ComponentEventLinkEncoderImpl will cause a stack
overflow
Posted by "Howard M. Lewis Ship (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1791.
--------------------------------------
Resolution: Fixed
Fix Version/s: 5.4
5.3.3
> On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow
> --------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3.3, 5.4
>
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1791) On some JDKs, the complex regular
expression used by ComponentEventLinkEncoderImpl will cause a stack
overflow
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248642#comment-13248642 ]
Hudson commented on TAP5-1791:
------------------------------
Integrated in tapestry-5.3-freestyle #20 (See [https://builds.apache.org/job/tapestry-5.3-freestyle/20/])
TAP5-1791: On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow (Revision 1310502)
Result = FAILURE
hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1310502
Files :
* /tapestry/tapestry5/branches/5.3/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImpl.java
* /tapestry/tapestry5/branches/5.3/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventDispatcherTest.java
* /tapestry/tapestry5/branches/5.3/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java
> On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow
> --------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3.3, 5.4
>
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eddie Lo updated TAP5-1791:
---------------------------
Description:
Some path parameters will cause tapestry to get into infinite loop.
The exact problem is caused by the combination of 3 factors:
* A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
* A regex generated by Tapestry 3.0
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
* A long and complex enough path parameter.
/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
When all the the 3 factors are hit, tapestry will get into an infinite loop at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
was:
Some some path parameters will cause tapestry getting into infinite loop.
The exact problem is caused by the combination of 3 factors:
* A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
* A regex generated by Tapestry 3.0
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
* A long and complex enough path parameter.
/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
When all the the 3 factors are hit, tapestry will get into at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eddie Lo updated TAP5-1791:
---------------------------
Description:
Some path parameters will cause tapestry to get into infinite loop.
The exact problem is caused by the combination of 3 factors:
* A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
* A regex generated by Tapestry 3.0
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
* A long and complex enough path parameter.
/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
When all the the 3 factors are hit, tapestry will get into an infinite loop at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
was:
Some path parameters will cause tapestry to get into infinite loop.
The exact problem is caused by the combination of 3 factors:
* A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
* A regex generated by Tapestry 3.0
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
* A long and complex enough path parameter.
/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
When all the the 3 factors are hit, tapestry will get into an infinite loop at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Howard M. Lewis Ship (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248461#comment-13248461 ]
Howard M. Lewis Ship commented on TAP5-1791:
--------------------------------------------
Hm. I added a quick test for this:
{{{
/**
* And thanks to our friends at Lithium: TAP5-1791
*/
@Test
public void can_handle_extreme_regular_expression()
{
ComponentClassResolver resolver = mockComponentClassResolver();
Request request = mockRequest();
LocalizationSetter ls = mockLocalizationSetter();
MetaDataLocator metaDataLocator = neverWhitelistProtected();
train_getParameter(request, InternalConstants.PAGE_CONTEXT_NAME, null);
train_getParameter(request, InternalConstants.CONTAINER_PAGE_NAME, null);
train_getLocale(request, Locale.ENGLISH);
ls.setNonPeristentLocaleFromLocaleName("en");
String path = "/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg";
train_getPath(request, path);
train_setLocaleFromLocaleName(ls, "user", false);
train_isPageName(resolver, "user/UserResetPasswordPage", true);
train_canonicalizePageName(resolver, "user/UserResetPasswordPage", "user/UserResetPasswordPage");
replay();
ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls,
request, null, null, null, null, true, "", metaDataLocator, null);
ComponentEventRequestParameters parameters = linkEncoder.decodeComponentEventRequest(request);
assertNull(parameters);
verify();
}
}}}
And it works, so I'm not hitting the same JVM bug as you guys, maybe because I'm on a Mac.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205953#comment-13205953 ]
Eddie Lo commented on TAP5-1791:
--------------------------------
It is consistently reproducible using jdk1.6.0_30-x64. It cannot be reproduced using 32 bit however.
Please use following small java program and a few simple steps:
Download the attached java file.
Compile it and run it.
javac LIA25066Test.java
java -classpath . -Xms64m -Xmx1280m -Xss192k -XX:MaxPermSize=288m -Xfuture -XX:+UseCompressedOops -XX:NewRatio=7 -XX:-DoEscapeAnalysis -XX:-TieredCompilation LIA25066Test
You will get the java.lang.StackOverflowError exception.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eddie Lo updated TAP5-1791:
---------------------------
Description:
Some some path parameters will cause tapestry getting into infinite loop.
The exact problem is caused by the combination of 3 factors:
* A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
* A regex generated by Tapestry 3.0
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
* A long and complex enough path parameter.
/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
When all the the 3 factors are hit, tapestry will get into at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
was:
Some some path parameters will cause tapestry getting into infinite loop.
The exact problem is caused by the combination of 3 factors:
* [A low priority bug in JVM|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582]
* A regex generated by Tapestry 3.0
{noformat}
^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
{noformat}
* A long and complex enough path parameter.
{noformat}
http://platform1-regression.qa.lithium.com/t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
{noformat}
When all the the 3 factors are hit, tapestry will get into at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
and following exception is thrown
{noformat}
[5DAC745F] java.lang.StackOverflowError
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
...
{noformat}
There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
>
> Some some path parameters will cause tapestry getting into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (TAP5-1791)
java.lang.StackOverflowError was thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Howard M. Lewis Ship (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248461#comment-13248461 ]
Howard M. Lewis Ship edited comment on TAP5-1791 at 4/6/12 4:16 PM:
--------------------------------------------------------------------
Hm. I added a quick test for this:
/**
* And thanks to our friends at Lithium: TAP5-1791
*/
@Test
public void can_handle_extreme_regular_expression()
{
Request request = mockRequest();
String path = "/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg";
train_getPath(request, path);
replay();
ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(null, contextPathEncoder, null,
request, null, null, null, null, true, "", null, null);
ComponentEventRequestParameters parameters = linkEncoder.decodeComponentEventRequest(request);
assertNull(parameters);
verify();
}
And it works, so I'm not hitting the same JVM bug as you guys, maybe because I'm on a Mac.
was (Author: hlship):
Hm. I added a quick test for this:
{{{
/**
* And thanks to our friends at Lithium: TAP5-1791
*/
@Test
public void can_handle_extreme_regular_expression()
{
ComponentClassResolver resolver = mockComponentClassResolver();
Request request = mockRequest();
LocalizationSetter ls = mockLocalizationSetter();
MetaDataLocator metaDataLocator = neverWhitelistProtected();
train_getParameter(request, InternalConstants.PAGE_CONTEXT_NAME, null);
train_getParameter(request, InternalConstants.CONTAINER_PAGE_NAME, null);
train_getLocale(request, Locale.ENGLISH);
ls.setNonPeristentLocaleFromLocaleName("en");
String path = "/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg";
train_getPath(request, path);
train_setLocaleFromLocaleName(ls, "user", false);
train_isPageName(resolver, "user/UserResetPasswordPage", true);
train_canonicalizePageName(resolver, "user/UserResetPasswordPage", "user/UserResetPasswordPage");
replay();
ComponentEventLinkEncoderImpl linkEncoder = new ComponentEventLinkEncoderImpl(resolver, contextPathEncoder, ls,
request, null, null, null, null, true, "", metaDataLocator, null);
ComponentEventRequestParameters parameters = linkEncoder.decodeComponentEventRequest(request);
assertNull(parameters);
verify();
}
}}}
And it works, so I'm not hitting the same JVM bug as you guys, maybe because I'm on a Mac.
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TAP5-1791) java.lang.StackOverflowError was
thrown at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
Posted by "Eddie Lo (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eddie Lo updated TAP5-1791:
---------------------------
Attachment: LIA25066Test.java
> java.lang.StackOverflowError was thrown at org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Priority: Critical
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TAP5-1791) On some JDKs, the complex regular
expression used by ComponentEventLinkEncoderImpl will cause a stack
overflow
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248642#comment-13248642 ]
Hudson commented on TAP5-1791:
------------------------------
Integrated in tapestry-5.3-freestyle #20 (See [https://builds.apache.org/job/tapestry-5.3-freestyle/20/])
TAP5-1791: On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow (Revision 1310502)
Result = FAILURE
hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1310502
Files :
* /tapestry/tapestry5/branches/5.3/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImpl.java
* /tapestry/tapestry5/branches/5.3/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventDispatcherTest.java
* /tapestry/tapestry5/branches/5.3/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentEventLinkEncoderImplTest.java
> On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow
> --------------------------------------------------------------------------------------------------------------
>
> Key: TAP5-1791
> URL: https://issues.apache.org/jira/browse/TAP5-1791
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Eddie Lo
> Assignee: Howard M. Lewis Ship
> Priority: Critical
> Fix For: 5.3.3, 5.4
>
> Attachments: LIA25066Test.java
>
>
> Some path parameters will cause tapestry to get into infinite loop.
> The exact problem is caused by the combination of 3 factors:
> * A low priority bug in JVM -- http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6882582
> * A regex generated by Tapestry 3.0
> ^/(((\w(?:\w|-)*)/)*(\w+))(\.(\w+(\.\w+)*))?(\:(\w+))?(/(.*))?
> * A long and complex enough path parameter.
> /t5/user/UserResetPasswordPage/user-id/22/reset-password-token/bHLQiMR3VD6eFTQ7Txj2y4u_HyGKiHwC9bF6dazuuf3__qhKpK3rtSbZHwB6W2dbmGCmPS1By1uq-rcZXO-Ooxd6Ire1vwPpxXUAlx3Mf15ShvJEf8r9MfWEMATS3Pyr-HaGiqqcjN2IhDtJtxnypanQkBrVPMC_APwDp7aWWZLajUAXbLn8d4-evXGarDqbUQvUGQ9oqzEAEPRt0hL5oDPwDg
> When all the the 3 factors are hit, tapestry will get into an infinite loop at
> org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> and following exception is thrown
> [5DAC745F] java.lang.StackOverflowError
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
> at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
> at java.util.regex.Pattern$Loop.match(Pattern.java:4295)
> at java.util.regex.Pattern$GroupTail.match(Pattern.java:4227)
> at java.util.regex.Pattern$BranchConn.match(Pattern.java:4078)
> at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366)
> ...
> There is a limit in java only holding the top 1024 stacks. As the frame is small this time, it have far more that 1024, the bottom is truncated and lost.
> However, I used a debugger to confirm that it is thrown from org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodeComponentEventRequest(Request):243
> While the problem is caused by JVM bug (Oracle) and a long complex path parameters (us), it is recommended to also fix this in Tapestry to use a simpler regex.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira