[JBoss JIRA] Created: (JBRULES-745) NullPointerException in modifyObject
by Dirk Bergstrom (JIRA)
NullPointerException in modifyObject
------------------------------------
Key: JBRULES-745
URL: http://jira.jboss.com/jira/browse/JBRULES-745
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.1-m2
Environment: Trunk (revision 10170)
Reporter: Dirk Bergstrom
Assigned To: Edson Tirelli
Fix For: 3.1-m2
I'm getting an exception while asserting objects into the working memory. Depending on the timing, I get different stacktraces leading up the same exception on the same generated class. I have 15 rules and three types of objects in the working memory. 2500 User objects, 37 Milestone objects, and 2000 RLI objects. If I assert all the Users and Milestones first, I get the first exception below during assertion of the RLI objects, at the 257th object asserted. If I arrange to skip that particular record, I can assert a few more before another record trips the bug. If I put a try/catch block around the assertion and continue after hitting an exception, I can assert about 1600 of the records successfully, and the others reliably throw (ie. if I try to assert them later). If I assert RLIs first, I get the second stacktrace during assertion of Milestones. Looks like the problem happens during execution of one or more rules. I'll attach the RLI class, and its parent class (which is also the parent of the other two classes).
Exception in thread "RLIs Processor" java.lang.IncompatibleClassChangeError
at net.juniper.dash.data.RLIRecordShadowProxy.hashCode(Unknown Source)
at java.util.HashMap.put(HashMap.java:418)
at java.util.HashSet.add(HashSet.java:194)
at org.drools.reteoo.CollectNode.assertTuple(CollectNode.java:135)
at org.drools.reteoo.CollectNode.assertObject(CollectNode.java:212)
at
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:304)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:176)
at org.drools.reteoo.Rete.assertObject(Rete.java:121)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:196)
at
org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:68)
at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:729)
at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:548)
Exception in thread "Milestones and NPI Processor" java.lang.IncompatibleClassChangeError
at net.juniper.dash.data.RLIRecordShadowProxy.hashCode(Unknown Source)
at java.util.HashMap.put(HashMap.java:418)
at java.util.HashSet.add(HashSet.java:194)
at org.drools.reteoo.CollectNode.assertTuple(CollectNode.java:135)
at org.drools.reteoo.CompositeTupleSinkAdapter.propagateAssertTuple(CompositeTupleSinkAdapter.java:30)
at org.drools.reteoo.JoinNode.assertTuple(JoinNode.java:116)
at org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:147)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:176)
at org.drools.reteoo.Rete.assertObject(Rete.java:121)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:196)
at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:68)
at org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:729)
at org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:548)
at net.juniper.dash.data.DataSource.reconcileAssertedRecords(DataSource.java:190)
at net.juniper.dash.data.DataSource.populateRecords(DataSource.java:150)
at net.juniper.dash.Updater$DataSourceProcessor.work(Updater.java:181)
at net.juniper.dash.Refresher.run(Refresher.java:70)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months
[JBoss JIRA] Updated: (JBCACHE-194) Provide configurable eviction thread priority boost
by Manik Surtani (JIRA)
[ http://jira.jboss.com/jira/browse/JBCACHE-194?page=all ]
Manik Surtani updated JBCACHE-194:
----------------------------------
Component/s: Eviction
> Provide configurable eviction thread priority boost
> ---------------------------------------------------
>
> Key: JBCACHE-194
> URL: http://jira.jboss.com/jira/browse/JBCACHE-194
> Project: JBoss Cache
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Eviction
> Affects Versions: 1.2, 1.2.1, 1.2.2, 1.2.3
> Reporter: Brian Dueck
> Assigned To: Manik Surtani
> Fix For: 2.1.0.GA
>
> Attachments: LRUPolicy.java, LRUPolicy.java, LRUPolicy.java
>
>
> In environments where there there are many TreeCache client threads accessing the cache concurrently, the eviction thread may become starved. In this situation, even setting the wakeupInterval to 1 or 2 seconds does not help because the OS won't allocate proportionally very much time to the waiting eviction thread in comparison to the other TreeCache client threads.
> While there are some "fancy" solutions to this problem involving client threads being put to work to perform eviction, or having multiple eviction threads, one solution that help partially alleviate the problem is to boost the thread priority of the eviction thread.
> This provides a clue to the OS that allows the eviction thread to be scheduled more CPU time relative to other threads in a CPU resource constrained situation.
> This change involves switching from using the Java Timer object to using the Oswego ClockDaemon class instead. I've attached here a protoype implementation that reads a new XML configuration parameter (evictionPriorityBoost - if you can think of a better name, go ahead and rename it) and then boosts the eviction thread priority accordingly.
> Here's an example of the new config param:
> <attribute name="EvictionPolicyConfig">
> <config>
> <attribute name="wakeUpIntervalSeconds">5</attribute>
> <!-- boost the eviction thread by 2 -->
> <attribute name="evictionPriorityBoost">2</attribute>
> <!-- Cache wide default -->
> <region name="/_default_">
> <attribute name="maxNodes">5000000</attribute>
> <attribute name="timeToLiveSeconds">10</attribute>
> </region>
> </config>
> </attribute>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
19 years, 3 months