Return-Path: X-Original-To: apmail-tapestry-commits-archive@minotaur.apache.org Delivered-To: apmail-tapestry-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 35E8291C9 for ; Fri, 6 Apr 2012 17:47:44 +0000 (UTC) Received: (qmail 50047 invoked by uid 500); 6 Apr 2012 17:47:44 -0000 Delivered-To: apmail-tapestry-commits-archive@tapestry.apache.org Received: (qmail 50008 invoked by uid 500); 6 Apr 2012 17:47:44 -0000 Mailing-List: contact commits-help@tapestry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tapestry.apache.org Delivered-To: mailing list commits@tapestry.apache.org Received: (qmail 50001 invoked by uid 99); 6 Apr 2012 17:47:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2012 17:47:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2012 17:47:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 783AC35CA96 for ; Fri, 6 Apr 2012 17:47:22 +0000 (UTC) Date: Fri, 6 Apr 2012 17:47:22 +0000 (UTC) From: "Howard M. Lewis Ship (Closed) (JIRA)" To: commits@tapestry.apache.org Message-ID: <671343935.24515.1333734442493.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <640693852.13449.1323907771157.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (TAP5-1791) On some JDKs, the complex regular expression used by ComponentEventLinkEncoderImpl will cause a stack overflow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on 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