You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2010/11/30 10:52:13 UTC

[jira] Created: (CAY-1519) Application deadlock trying to guess static constant fields

Application deadlock trying to guess static constant fields
-----------------------------------------------------------

                 Key: CAY-1519
                 URL: https://issues.apache.org/jira/browse/CAY-1519
             Project: Cayenne
          Issue Type: Bug
          Components: Core Library
    Affects Versions: 3.1M1
         Environment: java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
SunOS pa-app01 5.10 Generic_142901-12 i86pc i386 i86pc


            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik
             Fix For: 3.1M1


Per CAY-1213 we are trying to guess if a String constant in an expression is a path or an enum or a constant. This code deadlocks the app for me under load on Java 6:

   java.lang.Thread.State: BLOCKED (on object monitor)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at org.apache.cayenne.util.Util.getJavaClass(Util.java:663)
        at org.apache.cayenne.util.Util.getClassFieldValue(Util.java:763)
        at org.apache.cayenne.exp.parser.ASTObjPath.evaluateNode(ASTObjPath.java:58)
        at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:335)
        at org.apache.cayenne.exp.parser.SimpleNode.evaluateChild(SimpleNode.java:323)
        at org.apache.cayenne.exp.parser.ASTEqual.evaluateNode(ASTEqual.java:66)
        at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:335)
        at org.apache.cayenne.exp.Expression.match(Expression.java:367)
        at org.apache.cayenne.exp.Expression.filter(Expression.java:389)
        at org.apache.cayenne.exp.Expression.filterObjects(Expression.java:378)

I had to locally unroll the following SVN revs to clear the problem: 998620, 1001040, 1001041
 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1519) Application deadlock trying to guess static constant fields

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965178#action_12965178 ] 

Andrus Adamchik commented on CAY-1519:
--------------------------------------

I should mention that the path causing this problem is two-step: "rel.propName"

> Application deadlock trying to guess static constant fields
> -----------------------------------------------------------
>
>                 Key: CAY-1519
>                 URL: https://issues.apache.org/jira/browse/CAY-1519
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.1M1
>         Environment: java version "1.6.0_20"
> Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
> Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
> SunOS pa-app01 5.10 Generic_142901-12 i86pc i386 i86pc
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: 3.1M1
>
>
> Per CAY-1213 we are trying to guess if a String constant in an expression is a path or an enum or a constant. This code deadlocks the app for me under load on Java 6:
>    java.lang.Thread.State: BLOCKED (on object monitor)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at org.apache.cayenne.util.Util.getJavaClass(Util.java:663)
>         at org.apache.cayenne.util.Util.getClassFieldValue(Util.java:763)
>         at org.apache.cayenne.exp.parser.ASTObjPath.evaluateNode(ASTObjPath.java:58)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:335)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluateChild(SimpleNode.java:323)
>         at org.apache.cayenne.exp.parser.ASTEqual.evaluateNode(ASTEqual.java:66)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:335)
>         at org.apache.cayenne.exp.Expression.match(Expression.java:367)
>         at org.apache.cayenne.exp.Expression.filter(Expression.java:389)
>         at org.apache.cayenne.exp.Expression.filterObjects(Expression.java:378)
> I had to locally unroll the following SVN revs to clear the problem: 998620, 1001040, 1001041
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAY-1519) Application deadlock trying to guess static constant fields

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik updated CAY-1519:
---------------------------------

    Priority: Critical  (was: Major)

> Application deadlock trying to guess static constant fields
> -----------------------------------------------------------
>
>                 Key: CAY-1519
>                 URL: https://issues.apache.org/jira/browse/CAY-1519
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.1M1
>         Environment: java version "1.6.0_20"
> Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
> Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
> SunOS pa-app01 5.10 Generic_142901-12 i86pc i386 i86pc
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Critical
>             Fix For: 3.1M1
>
>
> Per CAY-1213 we are trying to guess if a String constant in an expression is a path or an enum or a constant. This code deadlocks the app for me under load on Java 6:
>    java.lang.Thread.State: BLOCKED (on object monitor)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at org.apache.cayenne.util.Util.getJavaClass(Util.java:663)
>         at org.apache.cayenne.util.Util.getClassFieldValue(Util.java:763)
>         at org.apache.cayenne.exp.parser.ASTObjPath.evaluateNode(ASTObjPath.java:58)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:335)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluateChild(SimpleNode.java:323)
>         at org.apache.cayenne.exp.parser.ASTEqual.evaluateNode(ASTEqual.java:66)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:335)
>         at org.apache.cayenne.exp.Expression.match(Expression.java:367)
>         at org.apache.cayenne.exp.Expression.filter(Expression.java:389)
>         at org.apache.cayenne.exp.Expression.filterObjects(Expression.java:378)
> I had to locally unroll the following SVN revs to clear the problem: 998620, 1001040, 1001041
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (CAY-1519) Application deadlock trying to guess static constant fields

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-1519.
--------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 3.1M1)
                   3.1M2

> Application deadlock trying to guess static constant fields
> -----------------------------------------------------------
>
>                 Key: CAY-1519
>                 URL: https://issues.apache.org/jira/browse/CAY-1519
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.1M1
>         Environment: java version "1.6.0_20"
> Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
> Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
> SunOS pa-app01 5.10 Generic_142901-12 i86pc i386 i86pc
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Critical
>             Fix For: 3.1M2
>
>
> Per CAY-1213 we are trying to guess if a String constant in an expression is a path or an enum or a constant. This code deadlocks the app for me under load on Java 6:
>    java.lang.Thread.State: BLOCKED (on object monitor)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at org.apache.cayenne.util.Util.getJavaClass(Util.java:663)
>         at org.apache.cayenne.util.Util.getClassFieldValue(Util.java:763)
>         at org.apache.cayenne.exp.parser.ASTObjPath.evaluateNode(ASTObjPath.java:58)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:335)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluateChild(SimpleNode.java:323)
>         at org.apache.cayenne.exp.parser.ASTEqual.evaluateNode(ASTEqual.java:66)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:335)
>         at org.apache.cayenne.exp.Expression.match(Expression.java:367)
>         at org.apache.cayenne.exp.Expression.filter(Expression.java:389)
>         at org.apache.cayenne.exp.Expression.filterObjects(Expression.java:378)
> I had to locally unroll the following SVN revs to clear the problem: 998620, 1001040, 1001041
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAY-1519) Application deadlock trying to guess static constant fields

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986381#action_12986381 ] 

Andrus Adamchik commented on CAY-1519:
--------------------------------------

Also an attempt of doing reflection on every single path in every query should have a very significant impact on performance. I am leaning towards undoing CAY-1213 and reducing its scope to just enums (not constant fields), and adding a special prefix for enum constants. E.g.: 

enum:org.example.Foo.VALUE

> Application deadlock trying to guess static constant fields
> -----------------------------------------------------------
>
>                 Key: CAY-1519
>                 URL: https://issues.apache.org/jira/browse/CAY-1519
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.1M1
>         Environment: java version "1.6.0_20"
> Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
> Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
> SunOS pa-app01 5.10 Generic_142901-12 i86pc i386 i86pc
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>            Priority: Critical
>             Fix For: 3.1M1
>
>
> Per CAY-1213 we are trying to guess if a String constant in an expression is a path or an enum or a constant. This code deadlocks the app for me under load on Java 6:
>    java.lang.Thread.State: BLOCKED (on object monitor)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at org.apache.cayenne.util.Util.getJavaClass(Util.java:663)
>         at org.apache.cayenne.util.Util.getClassFieldValue(Util.java:763)
>         at org.apache.cayenne.exp.parser.ASTObjPath.evaluateNode(ASTObjPath.java:58)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:335)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluateChild(SimpleNode.java:323)
>         at org.apache.cayenne.exp.parser.ASTEqual.evaluateNode(ASTEqual.java:66)
>         at org.apache.cayenne.exp.parser.SimpleNode.evaluate(SimpleNode.java:335)
>         at org.apache.cayenne.exp.Expression.match(Expression.java:367)
>         at org.apache.cayenne.exp.Expression.filter(Expression.java:389)
>         at org.apache.cayenne.exp.Expression.filterObjects(Expression.java:378)
> I had to locally unroll the following SVN revs to clear the problem: 998620, 1001040, 1001041
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.