[
https://jira.jboss.org/jira/browse/JBRULES-2125?page=com.atlassian.jira.p...
]
Barry Kaplan commented on JBRULES-2125:
---------------------------------------
I appear to be seeing the same problem. I'm running session.fireUntilHalt() in a
thread and inserting events in the main thread and hit a deadlock:
Thread [Thread-1] (Suspended)
Unsafe.park(boolean, long) line: not available [native method]
LockSupport.park(Object) line: not available
ReentrantLock$NonfairSync(AbstractQueuedSynchronizer).parkAndCheckInterrupt() line: not
available
ReentrantLock$NonfairSync(AbstractQueuedSynchronizer).acquireQueued(AbstractQueuedSynchronizer$Node,
int) line: not available
ReentrantLock$NonfairSync(AbstractQueuedSynchronizer).acquire(int) line: not available
ReentrantLock$NonfairSync.lock() line: not available
ReentrantLock.lock() line: not available
NamedEntryPoint.retract(FactHandle, boolean, boolean, Rule, Activation) line: 258
NamedEntryPoint.retract(FactHandle) line: 245
ReteooWorkingMemory$WorkingMemoryReteExpireAction.execute(InternalWorkingMemory) line:
350
ReteooStatefulSession(AbstractWorkingMemory).executeQueuedActions() line: 1486
DefaultAgenda.fireUntilHalt(AgendaFilter) line: 1067
ReteooStatefulSession(AbstractWorkingMemory).fireUntilHalt(AgendaFilter) line: 701
ReteooStatefulSession(AbstractWorkingMemory).fireUntilHalt() line: 678
StatefulKnowledgeSessionImpl.fireUntilHalt() line: 195
DroolsFixture$1.run() line: 59
Thread.run() line: not available
Thread [main] (Suspended)
ReteooStatefulSession(AbstractWorkingMemory).queueWorkingMemoryAction(WorkingMemoryAction)
line: 1509
PropagationQueuingNode.assertObject(InternalFactHandle, PropagationContext,
InternalWorkingMemory) line: 182
SingleObjectSinkAdapter.propagateAssertObject(InternalFactHandle, PropagationContext,
InternalWorkingMemory) line: 42
ObjectTypeNode.assertObject(InternalFactHandle, PropagationContext,
InternalWorkingMemory) line: 185
EntryPointNode.assertObject(InternalFactHandle, PropagationContext, ObjectTypeConf,
InternalWorkingMemory) line: 146
NamedEntryPoint.insert(InternalFactHandle, Object, Rule, Activation) line: 152
NamedEntryPoint.insert(Object, boolean, boolean, Rule, Activation) line: 122
NamedEntryPoint.insert(Object) line: 80
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native
method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available
Method.invoke(Object, Object...) line: not available
PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(Object, Object[]) line:
229
PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce(PojoMetaMethodSite).call(Object,
Object[]) line: 52
PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce(AbstractCallSite).call(Object,
Object) line: 124
EsperEventPatternsTest$_How_do_I_measure_the_rate_of_arrival_of_events_in_a_given_time_period_closure1.doCall(Object)
line: 21
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native
method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available
Method.invoke(Object, Object...) line: not available
CachedMethod.invoke(Object, Object[]) line: 86
CachedMethod(MetaMethod).doMethodInvoke(Object, Object[]) line: 234
ClosureMetaClass.invokeMethod(Class, Object, String, Object[], boolean, boolean) line:
272
ClosureMetaClass(MetaClassImpl).invokeMethod(Object, String, Object[]) line: 845
EsperEventPatternsTest$_How_do_I_measure_the_rate_of_arrival_of_events_in_a_given_time_period_closure1(Closure).call(Object[])
line: 280
EsperEventPatternsTest$_How_do_I_measure_the_rate_of_arrival_of_events_in_a_given_time_period_closure1(Closure).call(Object)
line: 293
DefaultGroovyMethods.each(Iterator, Closure) line: 1106
DefaultGroovyMethods.each(Object, Closure) line: 1083
dgm$85.invoke(Object, Object[]) line: not available
PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(Object, Object[]) line:
270
PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce(PojoMetaMethodSite).call(Object,
Object[]) line: 52
CallSiteArray.defaultCall(CallSite, Object, Object[]) line: 43
AbstractCallSite.call(Object, Object[]) line: 116
AbstractCallSite.call(Object, Object) line: 124
EsperEventPatternsTest.How_do_I_measure_the_rate_of_arrival_of_events_in_a_given_time_period()
line: 17
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native
method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available
Method.invoke(Object, Object...) line: not available
FrameworkMethod$1.runReflectiveCall() line: 44
FrameworkMethod$1(ReflectiveCallable).run() line: 15
FrameworkMethod.invokeExplosively(Object, Object...) line: 41
InvokeMethod.evaluate() line: 20
TestWatchman$1.evaluate() line: 48
BlockJUnit4ClassRunner.runChild(FrameworkMethod, RunNotifier) line: 76
BlockJUnit4ClassRunner.runChild(Object, RunNotifier) line: 50
ParentRunner$3.run() line: 193
ParentRunner$1.schedule(Runnable) line: 52
BlockJUnit4ClassRunner(ParentRunner<T>).runChildren(RunNotifier) line: 191
ParentRunner<T>.access$000(ParentRunner, RunNotifier) line: 42
ParentRunner$2.evaluate() line: 184
BlockJUnit4ClassRunner(ParentRunner<T>).run(RunNotifier) line: 236
JUnit4TestMethodReference(JUnit4TestReference).run(TestExecution) line: 46
TestExecution.run(ITestReference[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 467
RemoteTestRunner.runTests(TestExecution) line: 683
RemoteTestRunner.run() line: 390
RemoteTestRunner.main(String[]) line: 197
Drools core multithreading issue
--------------------------------
Key: JBRULES-2125
URL:
https://jira.jboss.org/jira/browse/JBRULES-2125
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core
Affects Versions: 5.0.1.FINAL
Environment: Java HotSpot v 1.6.0_06, WinXP SP3
Reporter: Andrey Nechaev
Assignee: Edson Tirelli
Attachments: Main.java
Attachement below is the code showing the problems.
The program hangs and nothing is displayed in the Console.
If I put lines 10-11 before the line 6, I get a NullPointerException:
Exception in thread "main" java.lang.NullPointerException
at org.drools.reteoo.ObjectSource.addObjectSink(ObjectSource.java:124)
...
But, if I comment out the lines 2&3, everything works ok.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira