myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Udo Schnurpfeil (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (TOBAGO-921) Unsynchronized access to the cache of ThemeConfig
Date Thu, 30 Sep 2010 11:01:44 GMT

    [ 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.


Mime
View raw message