[JBoss JIRA] (JBRULES-3528) Deadlock when using pseudo session clock
by Cyril Sochor (JIRA)
Cyril Sochor created JBRULES-3528:
-------------------------------------
Summary: Deadlock when using pseudo session clock
Key: JBRULES-3528
URL: https://issues.jboss.org/browse/JBRULES-3528
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (fusion)
Affects Versions: 5.4.0.Final, 5.3.0.Final
Reporter: Cyril Sochor
Assignee: Mark Proctor
Deadlock when using fireUntilHalt in one thread and PseudoClockScheduler.advanceTime() in second thread.
Surroundings:
I read many events from JMS queue, each event has timestamp. I need temporal operations measured by time in timestamps. E.g. SomeEvent() over window:time(10s) means events with timestamps in interval 10s, not events inserted in interval 10s. So, I must use pseudo session clock and advance time before event insert into statefull session. Sometimes deadlock occured or NullPointerException is thrown.
I created test case.
Deadlock stacktraces:
Name: Thread-1
State: BLOCKED on org.drools.time.impl.PseudoClockScheduler@4599d5b owned by: Thread-0
Total blocked: 6 Total waited: 3
Stack trace:
org.drools.time.impl.PseudoClockScheduler.getCurrentTime(PseudoClockScheduler.java:104)
org.drools.common.AbstractWorkingMemory.endOperation(AbstractWorkingMemory.java:1345)
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1240)
- locked org.drools.common.DefaultAgenda@57e2793d
org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1126)
org.drools.common.DefaultAgenda.fireUntilHalt(DefaultAgenda.java:1327)
org.drools.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:754)
- locked org.drools.reteoo.ReteooStatefulSession@31d8d237
org.drools.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:730)
org.drools.impl.StatefulKnowledgeSessionImpl.fireUntilHalt(StatefulKnowledgeSessionImpl.java:245)
org.drools.integrationtests.StreamsTest$1.run(StreamsTest.java:526)
java.lang.Thread.run(Thread.java:662)
Name: Thread-0
State: BLOCKED on org.drools.common.DefaultAgenda@57e2793d owned by: Thread-1
Total blocked: 2 Total waited: 0
Stack trace:
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1168)
org.drools.common.Scheduler$ActivationTimerJob.execute(Scheduler.java:86)
org.drools.time.impl.DefaultTimerJobInstance.call(DefaultTimerJobInstance.java:47)
org.drools.time.impl.DefaultTimerJobInstance.call(DefaultTimerJobInstance.java:1)
org.drools.time.impl.PseudoClockScheduler.runCallBacks(PseudoClockScheduler.java:203)
org.drools.time.impl.PseudoClockScheduler.advanceTime(PseudoClockScheduler.java:156)
- locked org.drools.time.impl.PseudoClockScheduler@4599d5b
org.drools.integrationtests.StreamsTest.processStocks(StreamsTest.java:533)
org.drools.integrationtests.StreamsTest.testEvenFirePseudoClockRulesAB(StreamsTest.java:500)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
org.junit.internal.runners.statements.FailOnTimeout$1.run(FailOnTimeout.java:28)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] (JGRP-1401) RELAY: messages lost when relay coordinator crashes
by Bela Ban (Created) (JIRA)
RELAY: messages lost when relay coordinator crashes
---------------------------------------------------
Key: JGRP-1401
URL: https://issues.jboss.org/browse/JGRP-1401
Project: JGroups
Issue Type: Feature Request
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 3.1
When we have sites {A,B,C} and {X,Y,Z} (with relay coords A and X), during the time X leaves (or crashes) and Y taking over, all messages sent by the first site are not relayed to the second site.
Because the sites are autonomous, there won't be any retransmission of the dropped messages.
This can have an adverse affect, e.g. in Infinispan:
- Say key K is stored on A, B and Z
- Now we're updating K, on A and B, but before the change is relayed to the other site, X crashes
- If there is no rebalancing, e.g. because K is still to be stored on A, B and Z, since the update on Z was dropped, Z has a stale value !
SOLUTION 1:
- Have a backup coordinator B cache the last N messages in memory (with overflow to disk)
- A numbers relayed messages
- As soon as A has relayed message #50, it sends this info to B. Or, alternatively, this could be done periodically, or based on the number of relayed messages (e.g. every 10 messages)
- B can then purge those messages
- When A crashes, B runs a reconciliation protocol with X to determine whether to relay some backed up messages
- C now starts acting as backup relay to B
This solution is probably the simplest to implement, and doesn't require any code changes in Infinispan. However, there is still a chance of message loss if both the relay *and* the backup relay crash at the same time.
SOLUTION 2:
- After a crash (not a graceful leave !) of a relay coordinator, there has to be a full rebalancing of all keys
- This is wasteful though
- May not be needed, perhaps Infinispan could check whether a full rebalancing is required ?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] (AS7-3081) Misplaced @PersistenceContext Causes Untraceable Deployment Failure
by Jim Brownfield (Created) (JIRA)
Misplaced @PersistenceContext Causes Untraceable Deployment Failure
-------------------------------------------------------------------
Key: AS7-3081
URL: https://issues.jboss.org/browse/AS7-3081
Project: Application Server 7
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 7.0.2.Final
Environment: Macintosh 10.7.2
Reporter: Jim Brownfield
Assignee: Scott Marlow
When deploying an ear file that contains an Entity bean with an inappropriate @PersistenceContext annotation, the following stacktrace is generated, and the deployment fails:
15:36:16,322 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-9) MSC00001: Failed to start service jboss.deployment.subunit."xxx.xxxxxx.xxxxx.deploy.ear"."xxx.xxxxxx.xxxxx.ejb-0.0.1-SNAPSHOT.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."xxx.xxxxxx.xxxxx.deploy.ear"."xxx.xxxxxx.xxxxx.ejb-0.0.1-SNAPSHOT.jar".PARSE: Failed to process phase PARSE of subdeployment "xxx.xxxxxx.xxxxx.ejb-0.0.1-SNAPSHOT.jar" of deployment "xxx.xxxxxx.xxxxx.deploy.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_29]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_29]
at java.lang.Thread.run(Thread.java:680) [:1.6.0_29]
Caused by: java.lang.IllegalArgumentException: Class level annotations must provide a name.
at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.processClass(JPAAnnotationParseProcessor.java:233)
at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.processPersistenceAnnotations(JPAAnnotationParseProcessor.java:127)
at org.jboss.as.jpa.processor.JPAAnnotationParseProcessor.deploy(JPAAnnotationParseProcessor.java:90)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
... 5 more
The IllegalArgumentException gives no data for the annotation, the class, or any relevant data to the cause. I built JBoss debug from source to discover that the culprit in my case was a misplaced PersistenceContext annotation in an entity bean. The offending annotation had actually existed in a version of our code running in JBoss 4 without error.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] (JBWEB-232) Allow StandardContext to expose start problems to callers instead of logging them
by Brian Stansberry (JIRA)
Brian Stansberry created JBWEB-232:
--------------------------------------
Summary: Allow StandardContext to expose start problems to callers instead of logging them
Key: JBWEB-232
URL: https://issues.jboss.org/browse/JBWEB-232
Project: JBoss Web
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Affects Versions: JBossWeb-7.0.10.GA
Reporter: Brian Stansberry
Assignee: Remy Maucherat
See discussion of the log.txt attached to AS7-2322. That JIRA is about how AS7 handles exceptions, but in the case of the example the user attached, there is not much the AS can do. StandardContext is catching any exceptions that occur, logging at error, and then discarding the exception.
I can see how this behavior might be appropriate for some usages, e.g. standalone Tomcat. And the logic after an exception is caught is complex, so I can see why just throwing a LifecycleException is not an option. But is it possible to have a configuration property on StandardContext such that instead of logging and discarding exceptions, it would *not* log them and retain the exception so the caller to start() could access it? Or perhaps throw it on in a LifecycleException at the end? Basically some mechanism such that the AS' WebDeploymentService could take responsibility for reporting the exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[JBoss JIRA] Created: (JBAS-8316) Simple command line installer
by Brian Stansberry (JIRA)
Simple command line installer
-----------------------------
Key: JBAS-8316
URL: https://jira.jboss.org/browse/JBAS-8316
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Domain Management
Reporter: Brian Stansberry
Fix For: 7.0.0.M1
The AS is going to support two different running modes (see "Standalone Server" vs the rest of the discussion on http://community.jboss.org/docs/DOC-15215) and a flexible configuration for defining the "profile" a server will run. Profiles will not be represented via filesystem directories; rather they will be pure configuration.
The two different running modes will result in slightly different filesystem layouts -- see discussion in http://community.jboss.org/thread/153858.
The upshot of all this is using AS 7 will not be like previous versions where you could download the distribution, unzip, cd to bin/ and type ./run.sh -c some-std-config". Rather, I envision something like this:
1) download, unzip, cd bin
2) ./install.sh --someparamstotellitwhatyouwant
Params to tell it what you want would be whether you're running in standalone mode or full domain, which of a set of pre-packaged profiles you want, maybe some more stuff. From this, installer would create the appropriate filesystem layout, generate a domain.xml+host.mxl or standalone.xml
3) ./run.sh
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months