You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Ravi P Palacherla (JIRA)" <ji...@apache.org> on 2011/03/31 18:00:05 UTC

[jira] [Created] (OPENJPA-1970) CPU spinning at TreeMap.get in Schema.java

CPU spinning at TreeMap.get in Schema.java 
-------------------------------------------

                 Key: OPENJPA-1970
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1970
             Project: OpenJPA
          Issue Type: Bug
          Components: jdbc
    Affects Versions: 1.1.1
         Environment: openJPA 1.1.x
            Reporter: Ravi P Palacherla
            Assignee: Ravi P Palacherla


CPU is spinning at TreeMap.get in schema.java.
The reason found to be because of structural modification of treemap outside a synchronized block.
Synchronizing the treemap is fixing the issue.
The issue can be reproduced with an openJPA test case but due to the nature of the problem, it is replicable intermittently on dual core machine.
Attached patch has the test case and also the test case is ignored in default runs because it will cause the tests to stuck at TreeMap.get.

This is seen in 1.1.x version of openJPA and hence uploading the patch only for that version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (OPENJPA-1970) CPU spinning forever at TreeMap.get in Schema.java

Posted by "Ravi P Palacherla (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ravi P Palacherla closed OPENJPA-1970.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.1

> CPU spinning forever at TreeMap.get in Schema.java 
> ---------------------------------------------------
>
>                 Key: OPENJPA-1970
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1970
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.1
>         Environment: openJPA 1.1.x
>            Reporter: Ravi P Palacherla
>            Assignee: Ravi P Palacherla
>             Fix For: 1.1.1
>
>         Attachments: OPENJPA-1970.diff
>
>
> CPU is spinning forever at TreeMap.get in schema.java.
> The reason found to be because of structural modification of treemap outside a synchronized block.
> Synchronizing the treemap is fixing the issue.
> The issue can be reproduced with an openJPA test case but due to the nature of the problem, it is replicable intermittently on dual core machine.
> Attached patch has the test case and also the test case is ignored in default runs because it will cause the tests to stuck at TreeMap.get.
> This is seen in 1.1.x version of openJPA and hence uploading the patch only for that version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OPENJPA-1970) CPU spinning forever at TreeMap.get in Schema.java

Posted by "Ravi P Palacherla (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ravi P Palacherla updated OPENJPA-1970:
---------------------------------------

    Attachment: OPENJPA-1970.diff

Changes in Schema.java contributed by Horoki Tateno.


> CPU spinning forever at TreeMap.get in Schema.java 
> ---------------------------------------------------
>
>                 Key: OPENJPA-1970
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1970
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.1
>         Environment: openJPA 1.1.x
>            Reporter: Ravi P Palacherla
>            Assignee: Ravi P Palacherla
>         Attachments: OPENJPA-1970.diff
>
>
> CPU is spinning forever at TreeMap.get in schema.java.
> The reason found to be because of structural modification of treemap outside a synchronized block.
> Synchronizing the treemap is fixing the issue.
> The issue can be reproduced with an openJPA test case but due to the nature of the problem, it is replicable intermittently on dual core machine.
> Attached patch has the test case and also the test case is ignored in default runs because it will cause the tests to stuck at TreeMap.get.
> This is seen in 1.1.x version of openJPA and hence uploading the patch only for that version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OPENJPA-1970) CPU spinning forever at TreeMap.get in Schema.java

Posted by "Ravi P Palacherla (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014199#comment-13014199 ] 

Ravi P Palacherla commented on OPENJPA-1970:
--------------------------------------------

Rick,

The only issue in including the test case is there is a chance of OutOfMemory.
The test case uses 10 threads out of which 6 threads continuously add elements (1million) to TreeMap and 4 threads tries to retrieve the added elements.
So there is a chance that the test can run into OutOfMemory.

Even with the above setup Iam able to replicate the issue only on a dual core machine and if the issue is reproduced 1 out of 10 runs.
I have a wrapper shell script that runs the same test 10 times and I always see that one of these tests hang (CPU spin) at TreeMap.get.

Regarding running this test case on trunk, I did not encounter the issue on trunk (using same wrapped shell script), 
can not say that the issue does not exist in trunk but I did not see it happen while running the same test case in trunk.

Regards,
Ravi.

> CPU spinning forever at TreeMap.get in Schema.java 
> ---------------------------------------------------
>
>                 Key: OPENJPA-1970
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1970
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.1
>         Environment: openJPA 1.1.x
>            Reporter: Ravi P Palacherla
>            Assignee: Ravi P Palacherla
>             Fix For: 1.1.1
>
>         Attachments: OPENJPA-1970.diff
>
>
> CPU is spinning forever at TreeMap.get in schema.java.
> The reason found to be because of structural modification of treemap outside a synchronized block.
> Synchronizing the treemap is fixing the issue.
> The issue can be reproduced with an openJPA test case but due to the nature of the problem, it is replicable intermittently on dual core machine.
> Attached patch has the test case and also the test case is ignored in default runs because it will cause the tests to stuck at TreeMap.get.
> This is seen in 1.1.x version of openJPA and hence uploading the patch only for that version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OPENJPA-1970) CPU spinning forever at TreeMap.get in Schema.java

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014187#comment-13014187 ] 

Rick Curtis commented on OPENJPA-1970:
--------------------------------------

Ravi -

If the test fails and causes the build to hang... don't we want that to happen? A test that isn't run doesn't really test much.

I see that this problem was only observed on 1.1.x, but did you try to recreate this problem on trunk?

Thanks,
Rick

> CPU spinning forever at TreeMap.get in Schema.java 
> ---------------------------------------------------
>
>                 Key: OPENJPA-1970
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1970
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.1
>         Environment: openJPA 1.1.x
>            Reporter: Ravi P Palacherla
>            Assignee: Ravi P Palacherla
>             Fix For: 1.1.1
>
>         Attachments: OPENJPA-1970.diff
>
>
> CPU is spinning forever at TreeMap.get in schema.java.
> The reason found to be because of structural modification of treemap outside a synchronized block.
> Synchronizing the treemap is fixing the issue.
> The issue can be reproduced with an openJPA test case but due to the nature of the problem, it is replicable intermittently on dual core machine.
> Attached patch has the test case and also the test case is ignored in default runs because it will cause the tests to stuck at TreeMap.get.
> This is seen in 1.1.x version of openJPA and hence uploading the patch only for that version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OPENJPA-1970) CPU spinning forever at TreeMap.get in Schema.java

Posted by "Ravi P Palacherla (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014121#comment-13014121 ] 

Ravi P Palacherla commented on OPENJPA-1970:
--------------------------------------------

Horoki Tateno has granted a license to the ASF

> CPU spinning forever at TreeMap.get in Schema.java 
> ---------------------------------------------------
>
>                 Key: OPENJPA-1970
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1970
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.1
>         Environment: openJPA 1.1.x
>            Reporter: Ravi P Palacherla
>            Assignee: Ravi P Palacherla
>         Attachments: OPENJPA-1970.diff
>
>
> CPU is spinning forever at TreeMap.get in schema.java.
> The reason found to be because of structural modification of treemap outside a synchronized block.
> Synchronizing the treemap is fixing the issue.
> The issue can be reproduced with an openJPA test case but due to the nature of the problem, it is replicable intermittently on dual core machine.
> Attached patch has the test case and also the test case is ignored in default runs because it will cause the tests to stuck at TreeMap.get.
> This is seen in 1.1.x version of openJPA and hence uploading the patch only for that version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (OPENJPA-1970) CPU spinning forever at TreeMap.get in Schema.java

Posted by "Ravi P Palacherla (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ravi P Palacherla updated OPENJPA-1970:
---------------------------------------

    Description: 
CPU is spinning forever at TreeMap.get in schema.java.
The reason found to be because of structural modification of treemap outside a synchronized block.
Synchronizing the treemap is fixing the issue.
The issue can be reproduced with an openJPA test case but due to the nature of the problem, it is replicable intermittently on dual core machine.
Attached patch has the test case and also the test case is ignored in default runs because it will cause the tests to stuck at TreeMap.get.

This is seen in 1.1.x version of openJPA and hence uploading the patch only for that version.

  was:
CPU is spinning at TreeMap.get in schema.java.
The reason found to be because of structural modification of treemap outside a synchronized block.
Synchronizing the treemap is fixing the issue.
The issue can be reproduced with an openJPA test case but due to the nature of the problem, it is replicable intermittently on dual core machine.
Attached patch has the test case and also the test case is ignored in default runs because it will cause the tests to stuck at TreeMap.get.

This is seen in 1.1.x version of openJPA and hence uploading the patch only for that version.

        Summary: CPU spinning forever at TreeMap.get in Schema.java   (was: CPU spinning at TreeMap.get in Schema.java )

> CPU spinning forever at TreeMap.get in Schema.java 
> ---------------------------------------------------
>
>                 Key: OPENJPA-1970
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1970
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 1.1.1
>         Environment: openJPA 1.1.x
>            Reporter: Ravi P Palacherla
>            Assignee: Ravi P Palacherla
>
> CPU is spinning forever at TreeMap.get in schema.java.
> The reason found to be because of structural modification of treemap outside a synchronized block.
> Synchronizing the treemap is fixing the issue.
> The issue can be reproduced with an openJPA test case but due to the nature of the problem, it is replicable intermittently on dual core machine.
> Attached patch has the test case and also the test case is ignored in default runs because it will cause the tests to stuck at TreeMap.get.
> This is seen in 1.1.x version of openJPA and hence uploading the patch only for that version.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira