You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Udo Schnurpfeil (JIRA)" <de...@myfaces.apache.org> on 2010/09/30 12:57:33 UTC
[jira] Created: (TOBAGO-921) Unsynchronized access to the cache of
ThemeConfig
Unsynchronized access to the cache of ThemeConfig
-------------------------------------------------
Key: TOBAGO-921
URL: https://issues.apache.org/jira/browse/TOBAGO-921
Project: MyFaces Tobago
Issue Type: Bug
Components: Core
Affects Versions: 1.0.29
Environment: JVM: Java HotSpot(TM) 64-Bit Server VM (16.3-b01-279, mixed mode)
Reporter: Udo Schnurpfeil
Assignee: Udo Schnurpfeil
Priority: Critical
The problem seems to occur rarely.
When writing some code to set the cache under heavy stress I have the reproducible result that two threads are hanging in the HasMap.get() method.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (TOBAGO-921) Unsynchronized access to
the cache of ThemeConfig
Posted by "Udo Schnurpfeil (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOBAGO-921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916440#action_12916440 ]
Udo Schnurpfeil edited comment on TOBAGO-921 at 9/30/10 10:07 AM:
------------------------------------------------------------------
Here is the code I call one time in each request in the tobago-example-demo application using "mvn jetty:run-exploded"
private void stress() {
LOG.info("start test theme config - " + Thread.currentThread().getName());
FacesContext facesContext = FacesContext.getCurrentInstance();
UIComponent component = ComponentUtil.createComponent(
UILabel.COMPONENT_TYPE, TobagoConstants.RENDERER_TYPE_LABEL, "dummy");
LayoutUtil.getInnerSpace(facesContext, component, 10, false);
for (int i = 0; i < 100 ; i++) {
try {
ThemeConfig.getValue(facesContext, component, "fixedWidth");
ThemeConfig.getValue(facesContext, component, "labelWidth");
ThemeConfig.getValue(facesContext, component, "not-existing-" + (int)(Math.random() * 1000000));
} catch (Exception e) {
// ignore
}
}
LOG.info("end test theme config - " + Thread.currentThread().getName()
+ " size=" + ((Map) facesContext.getExternalContext().getApplicationMap().get(
"org.apache.myfaces.tobago.config.ThemeConfig.CACHE")).size());
}
I call the URL with wget in a loop in 2 command shells.
For this test the JVM needs at least 2 GB heap space.
was (Author: lofwyr):
Here is the code I call one time in each request in the tobago-example-demo application using "mvn jetty:run-exploded"
private void stress() {
LOG.info("start test theme config - " + Thread.currentThread().getName());
FacesContext facesContext = FacesContext.getCurrentInstance();
UIComponent component = ComponentUtil.createComponent(
UILabel.COMPONENT_TYPE, TobagoConstants.RENDERER_TYPE_LABEL, "dummy");
LayoutUtil.getInnerSpace(facesContext, component, 10, false);
for (int i = 0; i < 100 ; i++) {
try {
ThemeConfig.getValue(facesContext, component, "fixedWidth");
ThemeConfig.getValue(facesContext, component, "labelWidth");
ThemeConfig.getValue(facesContext, component, "not-existing-" + (int)(Math.random() * 1000000));
} catch (Exception e) {
// ignore
}
}
LOG.info("end test theme config - " + Thread.currentThread().getName()
+ " size=" + ((Map) facesContext.getExternalContext().getApplicationMap().get(
"org.apache.myfaces.tobago.config.ThemeConfig.CACHE")).size());
}
I call the URL with wget in a loop in 2 command shells.
> Unsynchronized access to the cache of ThemeConfig
> -------------------------------------------------
>
> Key: TOBAGO-921
> URL: https://issues.apache.org/jira/browse/TOBAGO-921
> Project: MyFaces Tobago
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.29
> Environment: JVM: Java HotSpot(TM) 64-Bit Server VM (16.3-b01-279, mixed mode)
> Reporter: Udo Schnurpfeil
> Assignee: Udo Schnurpfeil
> Priority: Critical
>
> The problem seems to occur rarely.
> When writing some code to set the cache under heavy stress I have the reproducible result that two threads are hanging in the HasMap.get() method.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TOBAGO-921) Unsynchronized access to the cache
of ThemeConfig
Posted by "Udo Schnurpfeil (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOBAGO-921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916440#action_12916440 ]
Udo Schnurpfeil commented on TOBAGO-921:
----------------------------------------
Here is the code I call one time in each request in the tobago-example-demo application using "mvn jetty:run-exploded"
private void stress() {
LOG.info("start test theme config - " + Thread.currentThread().getName());
FacesContext facesContext = FacesContext.getCurrentInstance();
UIComponent component = ComponentUtil.createComponent(
UILabel.COMPONENT_TYPE, TobagoConstants.RENDERER_TYPE_LABEL, "dummy");
LayoutUtil.getInnerSpace(facesContext, component, 10, false);
for (int i = 0; i < 100 ; i++) {
try {
ThemeConfig.getValue(facesContext, component, "fixedWidth");
ThemeConfig.getValue(facesContext, component, "labelWidth");
ThemeConfig.getValue(facesContext, component, "not-existing-" + (int)(Math.random() * 1000000));
} catch (Exception e) {
// ignore
}
}
LOG.info("end test theme config - " + Thread.currentThread().getName()
+ " size=" + ((Map) facesContext.getExternalContext().getApplicationMap().get(
"org.apache.myfaces.tobago.config.ThemeConfig.CACHE")).size());
}
I call the URL with wget in a loop in 2 command shells.
> Unsynchronized access to the cache of ThemeConfig
> -------------------------------------------------
>
> Key: TOBAGO-921
> URL: https://issues.apache.org/jira/browse/TOBAGO-921
> Project: MyFaces Tobago
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.29
> Environment: JVM: Java HotSpot(TM) 64-Bit Server VM (16.3-b01-279, mixed mode)
> Reporter: Udo Schnurpfeil
> Assignee: Udo Schnurpfeil
> Priority: Critical
>
> The problem seems to occur rarely.
> When writing some code to set the cache under heavy stress I have the reproducible result that two threads are hanging in the HasMap.get() method.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (TOBAGO-921) Unsynchronized access to the cache of
ThemeConfig
Posted by "Udo Schnurpfeil (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOBAGO-921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Udo Schnurpfeil resolved TOBAGO-921.
------------------------------------
Resolution: Fixed
> Unsynchronized access to the cache of ThemeConfig
> -------------------------------------------------
>
> Key: TOBAGO-921
> URL: https://issues.apache.org/jira/browse/TOBAGO-921
> Project: MyFaces Tobago
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.29
> Environment: JVM: Java HotSpot(TM) 64-Bit Server VM (16.3-b01-279, mixed mode)
> Reporter: Udo Schnurpfeil
> Assignee: Udo Schnurpfeil
> Priority: Critical
>
> The problem seems to occur rarely.
> When writing some code to set the cache under heavy stress I have the reproducible result that two threads are hanging in the HasMap.get() method.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.