Thanks. I'll give that a try and let you know how it goes.

If I have time I'll try to create a simple test case that can replicate
the bug and add that to the Jira ticket.

On Fri, 2006-11-03 at 12:15 +0000, Michael Neale wrote:
> try doing:
> 
> newWorkingMemory(true);
> That will bypass that back reference - of course this means if you
> update the rulebase, the rule changes won't propagate to the working
> memories (but in your case, I am guessing you probably don't care !). 
> 
> Let us know how that helps. If it does help (or even if it doesn't) -
> could you provide some more specifics perhaps in a JIRA (or email it
> to me directly and I will do it) - as this sort of things is slippery
> to reproduce. 
> 
> Michael.
> 
> On 11/3/06, Per Jacobsson <[EMAIL PROTECTED]> wrote:
>         Hi all,
>         I've been testing JBoss Rules 3.0.4 in a multi threaded
>         application and
>         often when I put some load on the system all threads hang and
>         the CPU
>         sits at 100%.
>         
>         I'm using Java 1.5_09 on Linux. The app uses 5 simultaneous
>         threads at 
>         the moment. They never share WorkingMemory instances but do
>         share the
>         same RuleBase.
>         
>         A thread dump (see below) shows all threads being stuck in
>         java.util.WeakHashMap, which is called from
>         AbstractRuleBase.addWorkingMemory .
>         
>         Has anyone seen this before? I attempted to synchronize the
>         method
>         that's the entry point to newWorkingMemory(). That definitely
>         made the
>         problem happen less often but didn't solve it completely.
>         Anyone knows 
>         any other workarounds?
>         Thanks,
>         Per
>         
>         "CW4" prio=1 tid=0x1a4fd7a8 nid=0xc44 runnable
>         [0x1a2fe000..0x1a2fefb0]
>                 at
>         java.util.WeakHashMap.expungeStaleEntries(WeakHashMap.java:289)
>                 at
>         java.util.WeakHashMap.getTable(WeakHashMap.java:297)
>                 at java.util.WeakHashMap.put(WeakHashMap.java:394)
>                 at
>         org.drools.common.AbstractRuleBase.addWorkingMemory(Unknown
>         Source)
>                 at org.drools.reteoo.ReteooRuleBase.newWorkingMemory
>         (Unknown
>         Source)
>                 at
>         org.drools.common.AbstractRuleBase.newWorkingMemory(Unknown
>         Source)
>         
>         "CW3" prio=1 tid=0x1a4fd5f0 nid=0xc43 runnable
>         [0x1a6fe000..0x1a6fee30]
>                 at java.util.WeakHashMap.put (WeakHashMap.java:397)
>                 at
>         org.drools.common.AbstractRuleBase.addWorkingMemory(Unknown
>         Source)
>                 at
>         org.drools.reteoo.ReteooRuleBase.newWorkingMemory(Unknown
>         Source)
>                 at org.drools.common.AbstractRuleBase.newWorkingMemory
>         (Unknown
>         Source)
>         
>         "CW2" prio=1 tid=0x1a4fd100 nid=0xc42 runnable
>         [0x1a8e5000..0x1a8e5eb0]
>                 at
>         java.util.WeakHashMap.expungeStaleEntries(WeakHashMap.java:289)
>                 at java.util.WeakHashMap.getTable
>         (WeakHashMap.java:297)
>                 at java.util.WeakHashMap.put(WeakHashMap.java:394)
>                 at
>         org.drools.common.AbstractRuleBase.addWorkingMemory(Unknown
>         Source)
>                 at org.drools.reteoo.ReteooRuleBase.newWorkingMemory
>         (Unknown
>         Source)
>                 at
>         org.drools.common.AbstractRuleBase.newWorkingMemory(Unknown
>         Source)
>         
>         "CW1" prio=1 tid=0x19afca78 nid=0xc41 runnable
>         [0x1a966000..0x1a967130]
>                 at
>         java.util.WeakHashMap.expungeStaleEntries
>         (WeakHashMap.java:289)
>                 at
>         java.util.WeakHashMap.getTable(WeakHashMap.java:297)
>                 at java.util.WeakHashMap.put(WeakHashMap.java:394)
>                 at
>         org.drools.common.AbstractRuleBase.addWorkingMemory(Unknown 
>         Source)
>                 at
>         org.drools.reteoo.ReteooRuleBase.newWorkingMemory(Unknown
>         Source)
>                 at
>         org.drools.common.AbstractRuleBase.newWorkingMemory(Unknown
>         Source)
>                 at
>         
>         "CW0" prio=1 tid=0x19afc7d8 nid=0xc40 runnable
>         [0x1aafe000..0x1aaff1b0] 
>                 at
>         java.util.WeakHashMap.expungeStaleEntries(WeakHashMap.java:289)
>                 at
>         java.util.WeakHashMap.getTable(WeakHashMap.java:297)
>                 at java.util.WeakHashMap.put(WeakHashMap.java:394)
>                 at
>         org.drools.common.AbstractRuleBase.addWorkingMemory(Unknown
>         Source)
>                 at
>         org.drools.reteoo.ReteooRuleBase.newWorkingMemory(Unknown
>         Source)
>                 at
>         org.drools.common.AbstractRuleBase.newWorkingMemory(Unknown 
>         Source)
>                 at
>         
>         
>         ---------------------------------------------------------------------
>         To unsubscribe from this list please visit:
>         
>             http://xircles.codehaus.org/manage_email
>         
> 

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to