myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject RE: 100% CPU Usage and blocking concurrent Threads when using t:saveState
Date Thu, 10 Dec 2009 07:15:31 GMT
For me, this clearly looks like concurrent usage of the request map.

All the servlet scopes (session, request, …) are not thread safe and one has
to assure that they are not accessed at the same time by multiple threads.


This turns out to be hard as e.g. there is no "standard" how to synchronize
against the session map. As a side note: I often wonder why this does not
lead to much more problems in the wild …


Anyway, in your case it seems the internal datastructure of the request map
is damaged - which in fact is strange as I do not know when the request map
will be accessed by multiple threads.


Sorry that this is not a solution, but it should give you a clue where to
look next …





Von: Jan Baudisch [] 
Gesendet: Donnerstag, 10. Dezember 2009 08:02
An: MyFaces Discussion
Betreff: 100% CPU Usage and blocking concurrent Threads when using


Hello MyFaces Community,


we are using MyFaces 1.2.0 with Tomahawk Sandbox  1.1.5 and have the
problem, that once in a while we get 100% CPU Usage and blocking concurrent
threads because of using t:saveState


A thread dump shows that the threads always stops at


        at java.util.TreeMap.put(




(The complete thread dump is attached). The problem shows up on one system
with heavy concurrent usage and JxBrowser as client.


After we kill these threads using Lambda Probe, the CPU Usage normalizes.


The problem occurs in that method:



    public void addSaveStateBean(String expressionString, Object value)



            log.debug("addSaveStateBean: " + expressionString + " value=" +

        requestBeanMap.put(expressionString, value);



    private final Map requestBeanMap = new TreeMap(); ...


As the problem is really severe for us, any hints are highly appreciated.


Many thanks in advance,

-- Jan 


View raw message